class Google::Cloud::AutoML::V1beta1::AutoML::Client

Client for the AutoMl service.

AutoML Server API.

The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.

An ID of a resource is the last element of the item's resource name. For `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then the id for the item is `{dataset_id}`.

Currently the only supported `location_id` is “us-central1”.

On any input that is documented to expect a string parameter in snake_case or kebab-case, either of those cases is accepted.

Attributes

auto_ml_stub[R]

@private

operations_client[R]

Get the associated client for long-running operations.

@return [::Google::Cloud::AutoML::V1beta1::AutoML::Operations]

Public Class Methods

configure() { |configure| ... } click to toggle source

Configure the AutoMl Client class.

See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} for a description of the configuration fields.

@example

# Modify the configuration for all AutoMl clients
::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config|
  config.timeout = 10.0
end

@yield [config] Configure the Client client. @yieldparam config [Client::Configuration]

@return [Client::Configuration]

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 69
def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "AutoML", "V1beta1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.create_dataset.timeout = 5.0

    default_config.rpcs.get_dataset.timeout = 5.0
    default_config.rpcs.get_dataset.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.list_datasets.timeout = 5.0
    default_config.rpcs.list_datasets.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.update_dataset.timeout = 5.0

    default_config.rpcs.delete_dataset.timeout = 5.0
    default_config.rpcs.delete_dataset.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.import_data.timeout = 5.0

    default_config.rpcs.export_data.timeout = 5.0

    default_config.rpcs.get_annotation_spec.timeout = 5.0
    default_config.rpcs.get_annotation_spec.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.get_table_spec.timeout = 5.0
    default_config.rpcs.get_table_spec.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.list_table_specs.timeout = 5.0
    default_config.rpcs.list_table_specs.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.update_table_spec.timeout = 5.0

    default_config.rpcs.get_column_spec.timeout = 5.0
    default_config.rpcs.get_column_spec.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.list_column_specs.timeout = 5.0
    default_config.rpcs.list_column_specs.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.update_column_spec.timeout = 5.0

    default_config.rpcs.create_model.timeout = 5.0

    default_config.rpcs.get_model.timeout = 5.0
    default_config.rpcs.get_model.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.list_models.timeout = 5.0
    default_config.rpcs.list_models.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.delete_model.timeout = 5.0
    default_config.rpcs.delete_model.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.deploy_model.timeout = 5.0

    default_config.rpcs.undeploy_model.timeout = 5.0

    default_config.rpcs.export_model.timeout = 5.0

    default_config.rpcs.export_evaluated_examples.timeout = 5.0

    default_config.rpcs.get_model_evaluation.timeout = 5.0
    default_config.rpcs.get_model_evaluation.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
    }

    default_config.rpcs.list_model_evaluations.timeout = 5.0

    default_config
  end
  yield @configure if block_given?
  @configure
end
new() { |config| ... } click to toggle source

Create a new AutoMl client object.

@example

# Create a client using the default configuration
client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config|
  config.timeout = 10.0
end

@yield [config] Configure the AutoMl client. @yieldparam config [Client::Configuration]

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 206
def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/automl/v1beta1/service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
                           !@config.endpoint.split(".").first.include?("-")
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.endpoint = @config.endpoint
  end

  @auto_ml_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::AutoML::V1beta1::AutoMl::Stub,
    credentials:  credentials,
    endpoint:     @config.endpoint,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors
  )
end

Public Instance Methods

configure() { |config| ... } click to toggle source

Configure the AutoMl Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on {Client.configure}.

See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} for a description of the configuration fields.

@yield [config] Configure the Client client. @yieldparam config [Client::Configuration]

@return [Client::Configuration]

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 185
def configure
  yield @config if block_given?
  @config
end
create_dataset(request, options = nil) { |response, operation| ... } click to toggle source

Creates a dataset.

@overload create_dataset(request, options = nil)

Pass arguments to `create_dataset` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_dataset(parent: nil, dataset: nil)

Pass arguments to `create_dataset` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The resource name of the project to create the dataset for.
@param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash]
  Required. The dataset to create.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::Dataset]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 287
def create_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_dataset.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_dataset.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
create_model(request, options = nil) { |response, operation| ... } click to toggle source

Creates a model. Returns a Model in the {::Google::Longrunning::Operation#response response} field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.

@overload create_model(request, options = nil)

Pass arguments to `create_model` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_model(parent: nil, model: nil)

Pass arguments to `create_model` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Resource name of the parent project where the model is being created.
@param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash]
  Required. The model to create.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1321
def create_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_model.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_model.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_dataset(request, options = nil) { |response, operation| ... } click to toggle source

Deletes a dataset and all of its contents. Returns empty response in the {::Google::Longrunning::Operation#response response} field when it completes, and `delete_details` in the {::Google::Longrunning::Operation#metadata metadata} field.

@overload delete_dataset(request, options = nil)

Pass arguments to `delete_dataset` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_dataset(name: nil)

Pass arguments to `delete_dataset` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the dataset to delete.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 582
def delete_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_dataset.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_dataset.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_model(request, options = nil) { |response, operation| ... } click to toggle source

Deletes a model. Returns `google.protobuf.Empty` in the {::Google::Longrunning::Operation#response response} field when it completes, and `delete_details` in the {::Google::Longrunning::Operation#metadata metadata} field.

@overload delete_model(request, options = nil)

Pass arguments to `delete_model` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_model(name: nil)

Pass arguments to `delete_model` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. Resource name of the model being deleted.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1548
def delete_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_model.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_model.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
deploy_model(request, options = nil) { |response, operation| ... } click to toggle source

Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing

[node_number])

will reset the deployment state without pausing the model's availability.

Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.

Returns an empty response in the {::Google::Longrunning::Operation#response response} field when it completes.

@overload deploy_model(request, options = nil)

Pass arguments to `deploy_model` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil)

Pass arguments to `deploy_model` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash]
  Model deployment metadata specific to Image Object Detection.
@param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash]
  Model deployment metadata specific to Image Classification.
@param name [::String]
  Required. Resource name of the model to deploy.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1632
def deploy_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.deploy_model.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.deploy_model.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.deploy_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
export_data(request, options = nil) { |response, operation| ... } click to toggle source

Exports dataset's data to the provided output location. Returns an empty response in the {::Google::Longrunning::Operation#response response} field when it completes.

@overload export_data(request, options = nil)

Pass arguments to `export_data` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload export_data(name: nil, output_config: nil)

Pass arguments to `export_data` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the dataset.
@param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash]
  Required. The desired output location.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 736
def export_data request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.export_data.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_data.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.export_data.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
export_evaluated_examples(request, options = nil) { |response, operation| ... } click to toggle source

Exports examples on which the model was evaluated (i.e. which were in the TEST set of the dataset the model was created from), together with their ground truth annotations and the annotations created (predicted) by the model. The examples, ground truth and predictions are exported in the state they were at the moment the model was evaluated.

This export is available only for 30 days since the model evaluation is created.

Currently only available for Tables.

Returns an empty response in the {::Google::Longrunning::Operation#response response} field when it completes.

@overload export_evaluated_examples(request, options = nil)

Pass arguments to `export_evaluated_examples` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload export_evaluated_examples(name: nil, output_config: nil)

Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the model whose evaluated examples are to
  be exported.
@param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash]
  Required. The desired output location and configuration.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1870
def export_evaluated_examples request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.export_evaluated_examples.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_evaluated_examples.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.export_evaluated_examples.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :export_evaluated_examples, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
export_model(request, options = nil) { |response, operation| ... } click to toggle source

Exports a trained, “export-able”, model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in

{::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}.

Returns an empty response in the {::Google::Longrunning::Operation#response response} field when it completes.

@overload export_model(request, options = nil)

Pass arguments to `export_model` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload export_model(name: nil, output_config: nil)

Pass arguments to `export_model` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the model to export.
@param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash]
  Required. The desired output location and configuration.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1785
def export_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.export_model.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_model.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.export_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_annotation_spec(request, options = nil) { |response, operation| ... } click to toggle source

Gets an annotation spec.

@overload get_annotation_spec(request, options = nil)

Pass arguments to `get_annotation_spec` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_annotation_spec(name: nil)

Pass arguments to `get_annotation_spec` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the annotation spec to retrieve.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 805
def get_annotation_spec request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_annotation_spec.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_annotation_spec.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_annotation_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :get_annotation_spec, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_column_spec(request, options = nil) { |response, operation| ... } click to toggle source

Gets a column spec.

@overload get_column_spec(request, options = nil)

Pass arguments to `get_column_spec` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_column_spec(name: nil, field_mask: nil)

Pass arguments to `get_column_spec` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the column spec to retrieve.
@param field_mask [::Google::Protobuf::FieldMask, ::Hash]
  Mask specifying which fields to read.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::ColumnSpec]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1096
def get_column_spec request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_column_spec.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_column_spec.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_column_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :get_column_spec, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_dataset(request, options = nil) { |response, operation| ... } click to toggle source

Gets a dataset.

@overload get_dataset(request, options = nil)

Pass arguments to `get_dataset` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_dataset(name: nil)

Pass arguments to `get_dataset` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the dataset to retrieve.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::Dataset]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 355
def get_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_dataset.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_dataset.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :get_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_model(request, options = nil) { |response, operation| ... } click to toggle source

Gets a model.

@overload get_model(request, options = nil)

Pass arguments to `get_model` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_model(name: nil)

Pass arguments to `get_model` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. Resource name of the model.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::Model] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::Model]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1390
def get_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_model.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_model.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :get_model, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_model_evaluation(request, options = nil) { |response, operation| ... } click to toggle source

Gets a model evaluation.

@overload get_model_evaluation(request, options = nil)

Pass arguments to `get_model_evaluation` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_model_evaluation(name: nil)

Pass arguments to `get_model_evaluation` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. Resource name for the model evaluation.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1939
def get_model_evaluation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_model_evaluation.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_model_evaluation.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_model_evaluation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_table_spec(request, options = nil) { |response, operation| ... } click to toggle source

Gets a table spec.

@overload get_table_spec(request, options = nil)

Pass arguments to `get_table_spec` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_table_spec(name: nil, field_mask: nil)

Pass arguments to `get_table_spec` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the table spec to retrieve.
@param field_mask [::Google::Protobuf::FieldMask, ::Hash]
  Mask specifying which fields to read.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::TableSpec]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 875
def get_table_spec request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_table_spec.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_table_spec.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_table_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :get_table_spec, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
import_data(request, options = nil) { |response, operation| ... } click to toggle source

Imports data into a dataset. For Tables this method can only be called on an empty Dataset.

For Tables:

  • A

{::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version}

parameter must be explicitly set.

Returns an empty response in the {::Google::Longrunning::Operation#response response} field when it completes.

@overload import_data(request, options = nil)

Pass arguments to `import_data` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload import_data(name: nil, input_config: nil)

Pass arguments to `import_data` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. Dataset name. Dataset must already exist. All imported
  annotations and examples will be added.
@param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash]
  Required. The desired input location and its domain specific semantics,
  if any.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 663
def import_data request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.import_data.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.import_data.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.import_data.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_column_specs(request, options = nil) { |response, operation| ... } click to toggle source

Lists column specs in a table spec.

@overload list_column_specs(request, options = nil)

Pass arguments to `list_column_specs` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil)

Pass arguments to `list_column_specs` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The resource name of the table spec to list column specs from.
@param field_mask [::Google::Protobuf::FieldMask, ::Hash]
  Mask specifying which fields to read.
@param filter [::String]
  Filter expression, see go/filtering.
@param page_size [::Integer]
  Requested page size. The server can return fewer results than requested.
  If unspecified, the server will pick a default size.
@param page_token [::String]
  A token identifying a page of results for the server to return.
  Typically obtained from the
  {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous
  {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1176
def list_column_specs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_column_specs.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_column_specs.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_column_specs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :list_column_specs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_column_specs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_datasets(request, options = nil) { |response, operation| ... } click to toggle source

Lists datasets in a project.

@overload list_datasets(request, options = nil)

Pass arguments to `list_datasets` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil)

Pass arguments to `list_datasets` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The resource name of the project from which to list datasets.
@param filter [::String]
  An expression for filtering the results of the request.

    * `dataset_metadata` - for existence of the case (e.g.
              image_classification_dataset_metadata:*). Some examples of using the filter are:

    * `translation_dataset_metadata:*` --> The dataset has
                                           translation_dataset_metadata.
@param page_size [::Integer]
  Requested page size. Server may return fewer results than requested.
  If unspecified, server will pick a default size.
@param page_token [::String]
  A token identifying a page of results for the server to return
  Typically obtained via
  {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous
  {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 439
def list_datasets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_datasets.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_datasets.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_datasets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_model_evaluations(request, options = nil) { |response, operation| ... } click to toggle source

Lists model evaluations.

@overload list_model_evaluations(request, options = nil)

Pass arguments to `list_model_evaluations` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil)

Pass arguments to `list_model_evaluations` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Resource name of the model to list the model evaluations for.
  If modelId is set as "-", this will list model evaluations from across all
  models of the parent location.
@param filter [::String]
  An expression for filtering the results of the request.

    * `annotation_spec_id` - for =, !=  or existence. See example below for
                           the last.

  Some examples of using the filter are:

    * `annotation_spec_id!=4` --> The model evaluation was done for
                              annotation spec with ID different than 4.
    * `NOT annotation_spec_id:*` --> The model evaluation was done for
                                 aggregate of all annotation specs.
@param page_size [::Integer]
  Requested page size.
@param page_token [::String]
  A token identifying a page of results for the server to return.
  Typically obtained via
  {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous
  {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 2028
def list_model_evaluations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_model_evaluations.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_model_evaluations.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_model_evaluations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_models(request, options = nil) { |response, operation| ... } click to toggle source

Lists models.

@overload list_models(request, options = nil)

Pass arguments to `list_models` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil)

Pass arguments to `list_models` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Resource name of the project, from which to list the models.
@param filter [::String]
  An expression for filtering the results of the request.

    * `model_metadata` - for existence of the case (e.g.
              video_classification_model_metadata:*).
    * `dataset_id` - for = or !=. Some examples of using the filter are:

    * `image_classification_model_metadata:*` --> The model has
                                         image_classification_model_metadata.
    * `dataset_id=5` --> The model was created from a dataset with ID 5.
@param page_size [::Integer]
  Requested page size.
@param page_token [::String]
  A token identifying a page of results for the server to return
  Typically obtained via
  {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous
  {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1475
def list_models request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_models.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_models.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_models.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_table_specs(request, options = nil) { |response, operation| ... } click to toggle source

Lists table specs in a dataset.

@overload list_table_specs(request, options = nil)

Pass arguments to `list_table_specs` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil)

Pass arguments to `list_table_specs` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The resource name of the dataset to list table specs from.
@param field_mask [::Google::Protobuf::FieldMask, ::Hash]
  Mask specifying which fields to read.
@param filter [::String]
  Filter expression, see go/filtering.
@param page_size [::Integer]
  Requested page size. The server can return fewer results than requested.
  If unspecified, the server will pick a default size.
@param page_token [::String]
  A token identifying a page of results for the server to return.
  Typically obtained from the
  {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous
  {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 955
def list_table_specs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_table_specs.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_table_specs.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_table_specs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :list_table_specs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_table_specs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
undeploy_model(request, options = nil) { |response, operation| ... } click to toggle source

Undeploys a model. If the model is not deployed this method has no effect.

Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.

Returns an empty response in the {::Google::Longrunning::Operation#response response} field when it completes.

@overload undeploy_model(request, options = nil)

Pass arguments to `undeploy_model` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload undeploy_model(name: nil)

Pass arguments to `undeploy_model` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. Resource name of the model to undeploy.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::Operation]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1707
def undeploy_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.undeploy_model.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.undeploy_model.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.undeploy_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_column_spec(request, options = nil) { |response, operation| ... } click to toggle source

Updates a column spec.

@overload update_column_spec(request, options = nil)

Pass arguments to `update_column_spec` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_column_spec(column_spec: nil, update_mask: nil)

Pass arguments to `update_column_spec` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash]
  Required. The column spec which replaces the resource on the server.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  The update mask applies to the resource.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::ColumnSpec]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1247
def update_column_spec request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_column_spec.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "column_spec.name" => request.column_spec.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_column_spec.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_column_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :update_column_spec, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_dataset(request, options = nil) { |response, operation| ... } click to toggle source

Updates a dataset.

@overload update_dataset(request, options = nil)

Pass arguments to `update_dataset` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_dataset(dataset: nil, update_mask: nil)

Pass arguments to `update_dataset` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash]
  Required. The dataset which replaces the resource on the server.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  The update mask applies to the resource.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::Dataset]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 510
def update_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_dataset.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "dataset.name" => request.dataset.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_dataset.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :update_dataset, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_table_spec(request, options = nil) { |response, operation| ... } click to toggle source

Updates a table spec.

@overload update_table_spec(request, options = nil)

Pass arguments to `update_table_spec` via a request object, either of type
{::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash.

@param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_table_spec(table_spec: nil, update_mask: nil)

Pass arguments to `update_table_spec` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash]
  Required. The table spec which replaces the resource on the server.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  The update mask applies to the resource.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Cloud::AutoML::V1beta1::TableSpec]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/cloud/automl/v1beta1/automl/client.rb, line 1026
def update_table_spec request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_table_spec.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "table_spec.name" => request.table_spec.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_table_spec.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_table_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @auto_ml_stub.call_rpc :update_table_spec, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end