Class: Google::Apis::MlV1::CloudMachineLearningEngineService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/ml_v1/service.rb

Overview

Google Cloud Machine Learning Engine

An API to enable creating and using machine learning models.

Examples:

require 'google/apis/ml_v1'

Ml = Google::Apis::MlV1 # Alias the module
service = Ml::CloudMachineLearningEngineService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeCloudMachineLearningEngineService

Returns a new instance of CloudMachineLearningEngineService



45
46
47
48
# File 'generated/google/apis/ml_v1/service.rb', line 45

def initialize
  super('https://ml.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/ml_v1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



43
44
45
# File 'generated/google/apis/ml_v1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#cancel_project_job(name, google_cloud_ml_v1__cancel_job_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleProtobufEmpty

Cancels a running job.

Parameters:

  • name (String)

    Required. The name of the job to cancel. Authorization: requires Editor role on the parent project.

  • google_cloud_ml_v1__cancel_job_request_object (Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



639
640
641
642
643
644
645
646
647
648
649
# File 'generated/google/apis/ml_v1/service.rb', line 639

def cancel_project_job(name, google_cloud_ml_v1__cancel_job_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest::Representation
  command.request_object = google_cloud_ml_v1__cancel_job_request_object
  command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#cancel_project_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleProtobufEmpty

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters:

  • name (String)

    The name of the operation resource to be cancelled.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



148
149
150
151
152
153
154
155
156
# File 'generated/google/apis/ml_v1/service.rb', line 148

def cancel_project_operation(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#create_project_job(parent, google_cloud_ml_v1__job_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1Job

Creates a training or a batch prediction job.

Parameters:

  • parent (String)

    Required. The project name. Authorization: requires Editor role on the specified project.

  • google_cloud_ml_v1__job_object (Google::Apis::MlV1::GoogleCloudMlV1Job) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



749
750
751
752
753
754
755
756
757
758
759
# File 'generated/google/apis/ml_v1/service.rb', line 749

def create_project_job(parent, google_cloud_ml_v1__job_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+parent}/jobs', options)
  command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
  command.request_object = google_cloud_ml_v1__job_object
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
  command.params['parent'] = parent unless parent.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#create_project_model(parent, google_cloud_ml_v1__model_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1Model

Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create.

Parameters:

  • parent (String)

    Required. The project name. Authorization: requires Editor role on the specified project.

  • google_cloud_ml_v1__model_object (Google::Apis::MlV1::GoogleCloudMlV1Model) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



368
369
370
371
372
373
374
375
376
377
378
# File 'generated/google/apis/ml_v1/service.rb', line 368

def create_project_model(parent, google_cloud_ml_v1__model_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+parent}/models', options)
  command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
  command.request_object = google_cloud_ml_v1__model_object
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model
  command.params['parent'] = parent unless parent.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#create_project_model_version(parent, google_cloud_ml_v1__version_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleLongrunningOperation

Creates a new version of a model from a trained TensorFlow model. If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDefault.

Parameters:

  • parent (String)

    Required. The name of the model. Authorization: requires Editor role on the parent project.

  • google_cloud_ml_v1__version_object (Google::Apis::MlV1::GoogleCloudMlV1Version) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



563
564
565
566
567
568
569
570
571
572
573
# File 'generated/google/apis/ml_v1/service.rb', line 563

def create_project_model_version(parent, google_cloud_ml_v1__version_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+parent}/versions', options)
  command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
  command.request_object = google_cloud_ml_v1__version_object
  command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
  command.params['parent'] = parent unless parent.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_model(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleLongrunningOperation

Deletes a model. You can only delete a model if there are no versions in it. You can delete versions by calling projects.models.versions.delete.

Parameters:

  • name (String)

    Required. The name of the model. Authorization: requires Editor role on the parent project.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



405
406
407
408
409
410
411
412
413
# File 'generated/google/apis/ml_v1/service.rb', line 405

def delete_project_model(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_model_version(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleLongrunningOperation

Deletes a model version. Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version. Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version.

Parameters:

  • name (String)

    Required. The name of the version. You can get the names of all the versions of a model by calling projects.models.versions.list. Authorization: requires Editor role on the parent project.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



443
444
445
446
447
448
449
450
451
# File 'generated/google/apis/ml_v1/service.rb', line 443

def delete_project_model_version(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleProtobufEmpty

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation resource to be deleted.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



181
182
183
184
185
186
187
188
189
# File 'generated/google/apis/ml_v1/service.rb', line 181

def delete_project_operation(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
  command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_config(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse

Get the service account information associated with your project. You need this information in order to grant the service account persmissions for the Google Cloud Storage location where you put your model training code for training the model with Google Cloud Machine Learning.

Parameters:

  • name (String)

    Required. The project name. Authorization: requires Viewer role on the specified project.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



109
110
111
112
113
114
115
116
117
# File 'generated/google/apis/ml_v1/service.rb', line 109

def get_project_config(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}:getConfig', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_job(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1Job

Describes a job.

Parameters:

  • name (String)

    Required. The name of the job to get the description of. Authorization: requires Viewer role on the parent project.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



717
718
719
720
721
722
723
724
725
# File 'generated/google/apis/ml_v1/service.rb', line 717

def get_project_job(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_model(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1Model

Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed).

Parameters:

  • name (String)

    Required. The name of the model. Authorization: requires Viewer role on the parent project.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



332
333
334
335
336
337
338
339
340
# File 'generated/google/apis/ml_v1/service.rb', line 332

def get_project_model(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_model_version(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1Version

Gets information about a model version. Models can have multiple versions. You can call projects.models.versions.list to get the same information that this method returns for all of the versions of a model.

Parameters:

  • name (String)

    Required. The name of the version. Authorization: requires Viewer role on the parent project.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



524
525
526
527
528
529
530
531
532
# File 'generated/google/apis/ml_v1/service.rb', line 524

def get_project_model_version(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_operation(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleLongrunningOperation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:

  • name (String)

    The name of the operation resource.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



255
256
257
258
259
260
261
262
263
# File 'generated/google/apis/ml_v1/service.rb', line 255

def get_project_operation(name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
  command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_project_jobs(parent, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse

Lists the jobs in the project.

Parameters:

  • parent (String)

    Required. The name of the project for which to list jobs. Authorization: requires Viewer role on the specified project.

  • page_size (Fixnum)

    Optional. The number of jobs to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the next_page_token field. The default value is 20, and the maximum page size is 100.

  • filter (String)

    Optional. Specifies the subset of jobs to retrieve.

  • page_token (String)

    Optional. A page token to request the next page of results. You get the token from the next_page_token field of the response from the previous call.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



683
684
685
686
687
688
689
690
691
692
693
694
# File 'generated/google/apis/ml_v1/service.rb', line 683

def list_project_jobs(parent, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+parent}/jobs', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_project_model_versions(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse

Gets basic information about all the versions of a model. If you expect that a model has a lot of versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages):

Parameters:

  • parent (String)

    Required. The name of the model for which to list the version. Authorization: requires Viewer role on the parent project.

  • page_token (String)

    Optional. A page token to request the next page of results. You get the token from the next_page_token field of the response from the previous call.

  • page_size (Fixnum)

    Optional. The number of versions to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the next_page_token field. The default value is 20, and the maximum page size is 100.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



486
487
488
489
490
491
492
493
494
495
496
# File 'generated/google/apis/ml_v1/service.rb', line 486

def list_project_model_versions(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+parent}/versions', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_project_models(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse

Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions.

Parameters:

  • parent (String)

    Required. The name of the project whose models are to be listed. Authorization: requires Viewer role on the specified project.

  • page_token (String)

    Optional. A page token to request the next page of results. You get the token from the next_page_token field of the response from the previous call.

  • page_size (Fixnum)

    Optional. The number of models to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the next_page_token field. The default value is 20, and the maximum page size is 100.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



297
298
299
300
301
302
303
304
305
306
307
# File 'generated/google/apis/ml_v1/service.rb', line 297

def list_project_models(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+parent}/models', options)
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_project_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleLongrunningListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. NOTE: the name binding below allows API services to override the binding to use different resource name schemes, such as users/*/operations.

Parameters:

  • name (String)

    The name of the operation collection.

  • filter (String)

    The standard list filter.

  • page_token (String)

    The standard list page token.

  • page_size (Fixnum)

    The standard list page size.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



220
221
222
223
224
225
226
227
228
229
230
231
# File 'generated/google/apis/ml_v1/service.rb', line 220

def list_project_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}/operations', options)
  command.response_representation = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse::Representation
  command.response_class = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse
  command.params['name'] = name unless name.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#predict_project(name, google_cloud_ml_v1__predict_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleApiHttpBody

Performs prediction on the data in the request. **** REMOVE FROM GENERATED DOCUMENTATION

Parameters:

  • name (String)

    Required. The resource name of a model or a version. Authorization: requires Viewer role on the parent project.

  • google_cloud_ml_v1__predict_request_object (Google::Apis::MlV1::GoogleCloudMlV1PredictRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



73
74
75
76
77
78
79
80
81
82
83
# File 'generated/google/apis/ml_v1/service.rb', line 73

def predict_project(name, google_cloud_ml_v1__predict_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}:predict', options)
  command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1PredictRequest::Representation
  command.request_object = google_cloud_ml_v1__predict_request_object
  command.response_representation = Google::Apis::MlV1::GoogleApiHttpBody::Representation
  command.response_class = Google::Apis::MlV1::GoogleApiHttpBody
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#set_project_model_version_default(name, google_cloud_ml_v1__set_default_version_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MlV1::GoogleCloudMlV1Version

Designates a version to be the default for the model. The default version is used for prediction requests made against the model that don't specify a version. The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method.

Parameters:

  • name (String)

    Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling projects.models.versions.list. Authorization: requires Editor role on the parent project.

  • google_cloud_ml_v1__set_default_version_request_object (Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



605
606
607
608
609
610
611
612
613
614
615
# File 'generated/google/apis/ml_v1/service.rb', line 605

def set_project_model_version_default(name, google_cloud_ml_v1__set_default_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}:setDefault', options)
  command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest::Representation
  command.request_object = google_cloud_ml_v1__set_default_version_request_object
  command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
  command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end