# Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::ModelService::Client (v1.44.0)

1.43.0 (latest) 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.1 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.1 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.64.0 0.63.0 0.62.0 0.61.0 0.60.0 0.59.0 0.58.0 0.57.0 0.56.0 0.55.0 0.54.0 0.53.0 0.52.0 0.51.0 0.50.0 0.49.0 0.48.0 0.47.0 0.46.0 0.45.0 0.44.0 0.43.0 0.42.0 0.41.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.35.0 0.34.0 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::ModelService::Client.

Client for the ModelService service.


<br />

A service for managing Vertex AI's machine learning Models.

## Inherits

- Object

## Includes

- [Google::Cloud::AIPlatform::V1::ModelService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the ModelService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration "Google::Cloud::AIPlatform::V1::ModelService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all ModelService clients
::Google::Cloud::AIPlatform::V1::ModelService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #batch_import_evaluated_annotations

    def batch_import_evaluated_annotations(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse
    def batch_import_evaluated_annotations(parent: nil, evaluated_annotations: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse

Imports a list of externally generated EvaluatedAnnotations.
**Overloads**

    def batch_import_evaluated_annotations(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse

Pass arguments to `batch_import_evaluated_annotations` via a request object, either of type [BatchImportEvaluatedAnnotationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportEvaluatedAnnotationsRequest "Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportEvaluatedAnnotationsRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def batch_import_evaluated_annotations(parent: nil, evaluated_annotations: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse

Pass arguments to `batch_import_evaluated_annotations` 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). **Parameters**

- **parent** (::String) --- Required. The name of the parent ModelEvaluationSlice resource. Format: `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
- **evaluated_annotations** (::Array\<[::Google::Cloud::AIPlatform::V1::EvaluatedAnnotation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-EvaluatedAnnotation), ::Hash\>) --- Required. Evaluated annotations resource to be imported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportEvaluatedAnnotationsResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportEvaluatedAnnotationsResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest.new

# Call the batch_import_evaluated_annotations method.
result = client.batch_import_evaluated_annotations request

# The returned object is of type Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse.
p result
```

### #batch_import_model_evaluation_slices

    def batch_import_model_evaluation_slices(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse
    def batch_import_model_evaluation_slices(parent: nil, model_evaluation_slices: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse

Imports a list of externally generated ModelEvaluationSlice.
**Overloads**

    def batch_import_model_evaluation_slices(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse

Pass arguments to `batch_import_model_evaluation_slices` via a request object, either of type [BatchImportModelEvaluationSlicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportModelEvaluationSlicesRequest "Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportModelEvaluationSlicesRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def batch_import_model_evaluation_slices(parent: nil, model_evaluation_slices: nil) -> ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse

Pass arguments to `batch_import_model_evaluation_slices` 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). **Parameters**

- **parent** (::String) --- Required. The name of the parent ModelEvaluation resource. Format: `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
- **model_evaluation_slices** (::Array\<[::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluationSlice), ::Hash\>) --- Required. Model evaluation slice resource to be imported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportModelEvaluationSlicesResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-BatchImportModelEvaluationSlicesResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest.new

# Call the batch_import_model_evaluation_slices method.
result = client.batch_import_model_evaluation_slices request

# The returned object is of type Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse.
p result
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the ModelService 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_configure_class_ "Google::Cloud::AIPlatform::V1::ModelService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration "Google::Cloud::AIPlatform::V1::ModelService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration))

### #copy_model

    def copy_model(request, options = nil) -> ::Gapic::Operation
    def copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil, custom_service_account: nil) -> ::Gapic::Operation

Copies an already existing Vertex AI Model into the specified Location.
The source Model must exist in the same Project.
When copying custom Models, the users themselves are responsible for
[Model.metadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model#Google__Cloud__AIPlatform__V1__Model_metadata_instance_ "Google::Cloud::AIPlatform::V1::Model#metadata (method)") content to be
region-agnostic, as well as making sure that any resources (e.g. files) it
depends on remain accessible.
**Overloads**

    def copy_model(request, options = nil) -> ::Gapic::Operation

Pass arguments to `copy_model` via a request object, either of type [CopyModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CopyModelRequest "Google::Cloud::AIPlatform::V1::CopyModelRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::CopyModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CopyModelRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil, custom_service_account: nil) -> ::Gapic::Operation

Pass arguments to `copy_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). **Parameters**

- **model_id** (::String) --- Optional. Copy source_model into a new Model with this ID. The ID will become the final component of the model resource name.


  This value may be up to 63 characters, and valid characters are
  `[a-z0-9_-]`. The first character cannot be a number or hyphen.

  Note: The following parameters are mutually exclusive: `model_id`, `parent_model`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **parent_model** (::String) --- Optional. Specify this field to copy source_model into this existing Model as a new version. Format: `projects/{project}/locations/{location}/models/{model}`


  Note: The following parameters are mutually exclusive: `parent_model`, `model_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **parent** (::String) --- Required. The resource name of the Location into which to copy the Model. Format: `projects/{project}/locations/{location}`
- **source_model** (::String) --- Required. The resource name of the Model to copy. That Model must be in the same Project. Format: `projects/{project}/locations/{location}/models/{model}`
- **encryption_spec** ([::Google::Cloud::AIPlatform::V1::EncryptionSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-EncryptionSpec), ::Hash) --- Customer-managed encryption key options. If this is set, then the Model copy will be encrypted with the provided encryption key.
- **custom_service_account** (::String) --- Optional. The user-provided custom service account to use to do the copy model. If empty, [Vertex AI Service
  Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used to access resources needed to upload the model. This account must belong to the destination project where the model is copied to, i.e., the project specified in the `parent` field of this request and have the Vertex AI Service Agent role in the source project.


  Requires the user copying the Model to have the
  `iam.serviceAccounts.actAs` permission on this service account.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CopyModelRequest.new

# Call the copy_model method.
result = client.copy_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #delete_model

    def delete_model(request, options = nil) -> ::Gapic::Operation
    def delete_model(name: nil) -> ::Gapic::Operation

Deletes a Model.


<br />

A model cannot be deleted if any
[Endpoint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Endpoint "Google::Cloud::AIPlatform::V1::Endpoint (class)") resource has a
[DeployedModel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeployedModel "Google::Cloud::AIPlatform::V1::DeployedModel (class)") based on the
model in its
[deployed_models](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Endpoint#Google__Cloud__AIPlatform__V1__Endpoint_deployed_models_instance_ "Google::Cloud::AIPlatform::V1::Endpoint#deployed_models (method)")
field.
**Overloads**

    def delete_model(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_model` via a request object, either of type [DeleteModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeleteModelRequest "Google::Cloud::AIPlatform::V1::DeleteModelRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::DeleteModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_model(name: nil) -> ::Gapic::Operation

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). **Parameter**

- **name** (::String) --- Required. The name of the Model resource to be deleted. Format: `projects/{project}/locations/{location}/models/{model}`
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteModelRequest.new

# Call the delete_model method.
result = client.delete_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #delete_model_version

    def delete_model_version(request, options = nil) -> ::Gapic::Operation
    def delete_model_version(name: nil) -> ::Gapic::Operation

Deletes a Model version.


<br />

Model version can only be deleted if there are no
[DeployedModels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeployedModel "Google::Cloud::AIPlatform::V1::DeployedModel (class)") created from it.
Deleting the only version in the Model is not allowed. Use
[DeleteModel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_delete_model_instance_ "Google::Cloud::AIPlatform::V1::ModelService::Client#delete_model (method)") for
deleting the Model instead.
**Overloads**

    def delete_model_version(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_model_version` via a request object, either of type [DeleteModelVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeleteModelVersionRequest "Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeleteModelVersionRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_model_version(name: nil) -> ::Gapic::Operation

Pass arguments to `delete_model_version` 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). **Parameter**

- **name** (::String) --- Required. The name of the model version to be deleted, with a version ID explicitly included.


  Example: `projects/{project}/locations/{location}/models/{model}@1234`
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest.new

# Call the delete_model_version method.
result = client.delete_model_version request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #export_model

    def export_model(request, options = nil) -> ::Gapic::Operation
    def export_model(name: nil, output_config: nil) -> ::Gapic::Operation

Exports a trained, exportable Model to a location specified by the
user. A Model is considered to be exportable if it has at least one
\[supported export
format\]\[google.cloud.aiplatform.v1.Model.supported_export_formats\].
**Overloads**

    def export_model(request, options = nil) -> ::Gapic::Operation

Pass arguments to `export_model` via a request object, either of type [ExportModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ExportModelRequest "Google::Cloud::AIPlatform::V1::ExportModelRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ExportModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def export_model(name: nil, output_config: nil) -> ::Gapic::Operation

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). **Parameters**

- **name** (::String) --- Required. The resource name of the Model to export. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.
- **output_config** ([::Google::Cloud::AIPlatform::V1::ExportModelRequest::OutputConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ExportModelRequest-OutputConfig), ::Hash) --- Required. The desired output location and configuration.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ExportModelRequest.new

# Call the export_model method.
result = client.export_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #get_model

    def get_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
    def get_model(name: nil) -> ::Google::Cloud::AIPlatform::V1::Model

Gets a Model.
**Overloads**

    def get_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model

Pass arguments to `get_model` via a request object, either of type [GetModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GetModelRequest "Google::Cloud::AIPlatform::V1::GetModelRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::GetModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_model(name: nil) -> ::Google::Cloud::AIPlatform::V1::Model

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). **Parameter**

- **name** (::String) --- Required. The name of the Model resource. Format: `projects/{project}/locations/{location}/models/{model}`


  In order to retrieve a specific version of the model, also provide
  the version ID or version alias.
  Example: `projects/{project}/locations/{location}/models/{model}@2`
  or
  `projects/{project}/locations/{location}/models/{model}@golden`
  If no version ID or alias is specified, the "default" version will be
  returned. The "default" version alias is created for the first version of
  the model, and can be moved to other versions later on. There will be
  exactly one default version.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetModelRequest.new

# Call the get_model method.
result = client.get_model request

# The returned object is of type Google::Cloud::AIPlatform::V1::Model.
p result
```

### #get_model_evaluation

    def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
    def get_model_evaluation(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation

Gets a ModelEvaluation.
**Overloads**

    def get_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation

Pass arguments to `get_model_evaluation` via a request object, either of type [GetModelEvaluationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GetModelEvaluationRequest "Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_model_evaluation(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation

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). **Parameter**

- **name** (::String) --- Required. The name of the ModelEvaluation resource. Format: `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest.new

# Call the get_model_evaluation method.
result = client.get_model_evaluation request

# The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation.
p result
```

### #get_model_evaluation_slice

    def get_model_evaluation_slice(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice
    def get_model_evaluation_slice(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice

Gets a ModelEvaluationSlice.
**Overloads**

    def get_model_evaluation_slice(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice

Pass arguments to `get_model_evaluation_slice` via a request object, either of type [GetModelEvaluationSliceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GetModelEvaluationSliceRequest "Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GetModelEvaluationSliceRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_model_evaluation_slice(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice

Pass arguments to `get_model_evaluation_slice` 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). **Parameter**

- **name** (::String) --- Required. The name of the ModelEvaluationSlice resource. Format: `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluationSlice))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluationSlice))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest.new

# Call the get_model_evaluation_slice method.
result = client.get_model_evaluation_slice request

# The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluationSlice.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.
**Returns**

- (Google::Iam::V1::IAMPolicy::Client)

### #import_model_evaluation

    def import_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation
    def import_model_evaluation(parent: nil, model_evaluation: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation

Imports an externally generated ModelEvaluation.
**Overloads**

    def import_model_evaluation(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation

Pass arguments to `import_model_evaluation` via a request object, either of type [ImportModelEvaluationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ImportModelEvaluationRequest "Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ImportModelEvaluationRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def import_model_evaluation(parent: nil, model_evaluation: nil) -> ::Google::Cloud::AIPlatform::V1::ModelEvaluation

Pass arguments to `import_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). **Parameters**

- **parent** (::String) --- Required. The name of the parent model resource. Format: `projects/{project}/locations/{location}/models/{model}`
- **model_evaluation** ([::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation), ::Hash) --- Required. Model evaluation resource to be imported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest.new

# Call the import_model_evaluation method.
result = client.import_model_evaluation request

# The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation.
p result
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new ModelService client object.
**Yields**

- (config) --- Configure the ModelService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_model_evaluation_slices

    def list_model_evaluation_slices(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>
    def list_model_evaluation_slices(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>

Lists ModelEvaluationSlices in a ModelEvaluation.
**Overloads**

    def list_model_evaluation_slices(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>

Pass arguments to `list_model_evaluation_slices` via a request object, either of type [ListModelEvaluationSlicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelEvaluationSlicesRequest "Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelEvaluationSlicesRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_model_evaluation_slices(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>

Pass arguments to `list_model_evaluation_slices` 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). **Parameters**

- **parent** (::String) --- Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices from. Format: `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
- **filter** (::String) ---

  The standard list filter.
  - `slice.dimension` - for =.
- **page_size** (::Integer) --- The standard list page size.
- **page_token** (::String) --- The standard list page token. Typically obtained via [ListModelEvaluationSlicesResponse.next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelEvaluationSlicesResponse#Google__Cloud__AIPlatform__V1__ListModelEvaluationSlicesResponse_next_page_token_instance_ "Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesResponse#next_page_token (method)") of the previous [ModelService.ListModelEvaluationSlices](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_list_model_evaluation_slices_instance_ "Google::Cloud::AIPlatform::V1::ModelService::Client#list_model_evaluation_slices (method)") call.
- **read_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Mask specifying which fields to read.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluationSlice)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluationSlice)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest.new

# Call the list_model_evaluation_slices method.
result = client.list_model_evaluation_slices request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice.
  p item
end
```

### #list_model_evaluations

    def list_model_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>
    def list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>

Lists ModelEvaluations in a Model.
**Overloads**

    def list_model_evaluations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>

Pass arguments to `list_model_evaluations` via a request object, either of type [ListModelEvaluationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelEvaluationsRequest "Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>

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). **Parameters**

- **parent** (::String) --- Required. The resource name of the Model to list the ModelEvaluations from. Format: `projects/{project}/locations/{location}/models/{model}`
- **filter** (::String) --- The standard list filter.
- **page_size** (::Integer) --- The standard list page size.
- **page_token** (::String) --- The standard list page token. Typically obtained via [ListModelEvaluationsResponse.next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelEvaluationsResponse#Google__Cloud__AIPlatform__V1__ListModelEvaluationsResponse_next_page_token_instance_ "Google::Cloud::AIPlatform::V1::ListModelEvaluationsResponse#next_page_token (method)") of the previous [ModelService.ListModelEvaluations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_list_model_evaluations_instance_ "Google::Cloud::AIPlatform::V1::ModelService::Client#list_model_evaluations (method)") call.
- **read_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Mask specifying which fields to read.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::ModelEvaluation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelEvaluation)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest.new

# Call the list_model_evaluations method.
result = client.list_model_evaluations request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluation.
  p item
end
```

### #list_model_version_checkpoints

    def list_model_version_checkpoints(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint>
    def list_model_version_checkpoints(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint>

Lists checkpoints of the specified model version.
**Overloads**

    def list_model_version_checkpoints(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint>

Pass arguments to `list_model_version_checkpoints` via a request object, either of type [ListModelVersionCheckpointsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelVersionCheckpointsRequest "Google::Cloud::AIPlatform::V1::ListModelVersionCheckpointsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ListModelVersionCheckpointsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelVersionCheckpointsRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_model_version_checkpoints(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint>

Pass arguments to `list_model_version_checkpoints` 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). **Parameters**

- **name** (::String) --- Required. The name of the model version to list checkpoints for. `projects/{project}/locations/{location}/models/{model}@{version}` Example: `projects/{project}/locations/{location}/models/{model}@2` or `projects/{project}/locations/{location}/models/{model}@golden` If no version ID or alias is specified, the latest version will be used.
- **page_size** (::Integer) --- Optional. The standard list page size.
- **page_token** (::String) --- Optional. The standard list page token. Typically obtained via [next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelVersionCheckpointsResponse#Google__Cloud__AIPlatform__V1__ListModelVersionCheckpointsResponse_next_page_token_instance_ "Google::Cloud::AIPlatform::V1::ListModelVersionCheckpointsResponse#next_page_token (method)") of the previous [ListModelVersionCheckpoints](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_list_model_version_checkpoints_instance_ "Google::Cloud::AIPlatform::V1::ModelService::Client#list_model_version_checkpoints (method)") call.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelVersionCheckpoint)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelVersionCheckpoint)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListModelVersionCheckpointsRequest.new

# Call the list_model_version_checkpoints method.
result = client.list_model_version_checkpoints request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelVersionCheckpoint.
  p item
end
```

### #list_model_versions

    def list_model_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
    def list_model_versions(name: nil, page_size: nil, page_token: nil, filter: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>

Lists versions of the specified model.
**Overloads**

    def list_model_versions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>

Pass arguments to `list_model_versions` via a request object, either of type [ListModelVersionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelVersionsRequest "Google::Cloud::AIPlatform::V1::ListModelVersionsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ListModelVersionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelVersionsRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_model_versions(name: nil, page_size: nil, page_token: nil, filter: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>

Pass arguments to `list_model_versions` 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). **Parameters**

- **name** (::String) --- Required. The name of the model to list versions for.
- **page_size** (::Integer) --- The standard list page size.
- **page_token** (::String) --- The standard list page token. Typically obtained via [next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelVersionsResponse#Google__Cloud__AIPlatform__V1__ListModelVersionsResponse_next_page_token_instance_ "Google::Cloud::AIPlatform::V1::ListModelVersionsResponse#next_page_token (method)") of the previous [ListModelVersions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_list_model_versions_instance_ "Google::Cloud::AIPlatform::V1::ModelService::Client#list_model_versions (method)") call.
- **filter** (::String) ---

  An expression for filtering the results of the request. For field names
  both snake_case and camelCase are supported.
  - `labels` supports general map functions that is:
    - `labels.key=value` - key:value equality
    - \`labels.key:\* or labels:key - key existence
    - A key including a space must be quoted. `labels."a key"`.

  Some examples:
  - `labels.myKey="myValue"`
- **read_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Mask specifying which fields to read.
- **order_by** (::String) --- A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields:


  - `create_time`
  - `update_time`

  Example: `update_time asc, create_time desc`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListModelVersionsRequest.new

# Call the list_model_versions method.
result = client.list_model_versions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::Model.
  p item
end
```

### #list_models

    def list_models(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>
    def list_models(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>

Lists Models in a Location.
**Overloads**

    def list_models(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>

Pass arguments to `list_models` via a request object, either of type [ListModelsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelsRequest "Google::Cloud::AIPlatform::V1::ListModelsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::ListModelsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_models(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>

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). **Parameters**

- **parent** (::String) --- Required. The resource name of the Location to list the Models from. Format: `projects/{project}/locations/{location}`
- **filter** (::String) ---

  An expression for filtering the results of the request. For field names
  both snake_case and camelCase are supported.
  - `model` supports = and !=. `model` represents the Model ID, i.e. the last segment of the Model's \[resource name\]\[google.cloud.aiplatform.v1.Model.name\].
  - `display_name` supports = and !=
  - `labels` supports general map functions that is:
    - `labels.key=value` - key:value equality
    - \`labels.key:\* or labels:key - key existence
    - A key including a space must be quoted. `labels."a key"`.
  - `base_model_name` only supports =

  Some examples:
  - `model=1234`
  - `displayName="myDisplayName"`
  - `labels.myKey="myValue"`
  - `baseModelName="text-bison"`
- **page_size** (::Integer) --- The standard list page size.
- **page_token** (::String) --- The standard list page token. Typically obtained via [ListModelsResponse.next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListModelsResponse#Google__Cloud__AIPlatform__V1__ListModelsResponse_next_page_token_instance_ "Google::Cloud::AIPlatform::V1::ListModelsResponse#next_page_token (method)") of the previous [ModelService.ListModels](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Client#Google__Cloud__AIPlatform__V1__ModelService__Client_list_models_instance_ "Google::Cloud::AIPlatform::V1::ModelService::Client#list_models (method)") call.
- **read_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Mask specifying which fields to read.
- **order_by** (::String) --- A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields:


  - `display_name`
  - `create_time`
  - `update_time`

  Example: `display_name, create_time desc`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListModelsRequest.new

# Call the list_models method.
result = client.list_models request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::Model.
  p item
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #merge_version_aliases

    def merge_version_aliases(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
    def merge_version_aliases(name: nil, version_aliases: nil) -> ::Google::Cloud::AIPlatform::V1::Model

Merges a set of aliases for a Model version.
**Overloads**

    def merge_version_aliases(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model

Pass arguments to `merge_version_aliases` via a request object, either of type [Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-MergeVersionAliasesRequest "Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-MergeVersionAliasesRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def merge_version_aliases(name: nil, version_aliases: nil) -> ::Google::Cloud::AIPlatform::V1::Model

Pass arguments to `merge_version_aliases` 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). **Parameters**

- **name** (::String) --- Required. The name of the model version to merge aliases, with a version ID explicitly included.


  Example: `projects/{project}/locations/{location}/models/{model}@1234`
- **version_aliases** (::Array\<::String\>) --- Required. The set of version aliases to merge. The alias should be at most 128 characters, and match `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to an alias means removing that alias from the version. `-` is NOT counted in the 128 characters. Example: `-golden` means removing the `golden` alias from the version.


  There is NO ordering in aliases, which means
  1) The aliases returned from GetModel API might not have the exactly same
  order from this MergeVersionAliases API. 2) Adding and deleting the same
  alias in the request is not recommended, and the 2 operations will be
  cancelled out.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest.new

# Call the merge_version_aliases method.
result = client.merge_version_aliases request

# The returned object is of type Google::Cloud::AIPlatform::V1::Model.
p result
```

### #operations_client

    def operations_client() -> ::Google::Cloud::AIPlatform::V1::ModelService::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::AIPlatform::V1::ModelService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ModelService-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_explanation_dataset

    def update_explanation_dataset(request, options = nil) -> ::Gapic::Operation
    def update_explanation_dataset(model: nil, examples: nil) -> ::Gapic::Operation

Incrementally update the dataset used for an examples model.
**Overloads**

    def update_explanation_dataset(request, options = nil) -> ::Gapic::Operation

Pass arguments to `update_explanation_dataset` via a request object, either of type [UpdateExplanationDatasetRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-UpdateExplanationDatasetRequest "Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-UpdateExplanationDatasetRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_explanation_dataset(model: nil, examples: nil) -> ::Gapic::Operation

Pass arguments to `update_explanation_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). **Parameters**

- **model** (::String) --- Required. The resource name of the Model to update. Format: `projects/{project}/locations/{location}/models/{model}`
- **examples** ([::Google::Cloud::AIPlatform::V1::Examples](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Examples), ::Hash) --- The example config containing the location of the dataset.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest.new

# Call the update_explanation_dataset method.
result = client.update_explanation_dataset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #update_model

    def update_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model
    def update_model(model: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Model

Updates a Model.
**Overloads**

    def update_model(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Model

Pass arguments to `update_model` via a request object, either of type [UpdateModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-UpdateModelRequest "Google::Cloud::AIPlatform::V1::UpdateModelRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::UpdateModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-UpdateModelRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_model(model: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Model

Pass arguments to `update_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). **Parameters**

- **model** ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model), ::Hash) ---

  Required. The Model which replaces the resource on the server.
  When Model Versioning is enabled, the model.name will be used to determine
  whether to update the model or model version.
  1. model.name with the @ value, e.g. models/123@1, refers to a version specific update.
  2. model.name without the @ value, e.g. models/123, refers to a model update.
  3. model.name with @-, e.g. models/123@-, refers to a model update.
  4. Supported model fields: display_name, description; supported version-specific fields: version_description. Labels are supported in both scenarios. Both the model labels and the version labels are merged when a model is returned. When updating labels, if the request is for model-specific update, model label gets updated. Otherwise, version labels get updated.
  5. A model name or model version name fields update mismatch will cause a precondition error.
  6. One request cannot update both the model and the version fields. You must update them separately.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. The update mask applies to the resource. For the `FieldMask` definition, see [google.protobuf.FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-FieldMask "Google::Protobuf::FieldMask (class)").
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::UpdateModelRequest.new

# Call the update_model method.
result = client.update_model request

# The returned object is of type Google::Cloud::AIPlatform::V1::Model.
p result
```

### #upload_model

    def upload_model(request, options = nil) -> ::Gapic::Operation
    def upload_model(parent: nil, parent_model: nil, model_id: nil, model: nil, service_account: nil) -> ::Gapic::Operation

Uploads a Model artifact into Vertex AI.
**Overloads**

    def upload_model(request, options = nil) -> ::Gapic::Operation

Pass arguments to `upload_model` via a request object, either of type [UploadModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-UploadModelRequest "Google::Cloud::AIPlatform::V1::UploadModelRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::AIPlatform::V1::UploadModelRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-UploadModelRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def upload_model(parent: nil, parent_model: nil, model_id: nil, model: nil, service_account: nil) -> ::Gapic::Operation

Pass arguments to `upload_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). **Parameters**

- **parent** (::String) --- Required. The resource name of the Location into which to upload the Model. Format: `projects/{project}/locations/{location}`
- **parent_model** (::String) --- Optional. The resource name of the model into which to upload the version. Only specify this field when uploading a new version.
- **model_id** (::String) --- Optional. The ID to use for the uploaded Model, which will become the final component of the model resource name.


  This value may be up to 63 characters, and valid characters are
  `[a-z0-9_-]`. The first character cannot be a number or hyphen.
- **model** ([::Google::Cloud::AIPlatform::V1::Model](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Model), ::Hash) --- Required. The Model to create.
- **service_account** (::String) --- Optional. The user-provided custom service account to use to do the model upload. If empty, [Vertex AI Service
  Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used to access resources needed to upload the model. This account must belong to the target project where the model is uploaded to, i.e., the project specified in the `parent` field of this request and have necessary read permissions (to Google Cloud Storage, Artifact Registry, etc.).
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::ModelService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::UploadModelRequest.new

# Call the upload_model method.
result = client.upload_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```