# Cloud AutoML V1 API - Class Google::Cloud::AutoML::V1::Model (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.0 1.5.1 1.4.0 1.3.1 1.2.1 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.1 0.4.8 Reference documentation and code samples for the Cloud AutoML V1 API class Google::Cloud::AutoML::V1::Model.

API proto representing a trained machine learning model.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Timestamp when the model training finished and can be used for prediction.

### #create_time=

    def create_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Timestamp when the model training finished and can be used for prediction.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Timestamp when the model training finished and can be used for prediction.

### #dataset_id

    def dataset_id() -> ::String

**Returns**

- (::String) --- Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location.

### #dataset_id=

    def dataset_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location.
**Returns**

- (::String) --- Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location.

### #deployment_state

    def deployment_state() -> ::Google::Cloud::AutoML::V1::Model::DeploymentState

**Returns**

- ([::Google::Cloud::AutoML::V1::Model::DeploymentState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Model-DeploymentState)) --- Output only. Deployment state of the model. A model can only serve prediction requests after it gets deployed.

### #deployment_state=

    def deployment_state=(value) -> ::Google::Cloud::AutoML::V1::Model::DeploymentState

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::Model::DeploymentState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Model-DeploymentState)) --- Output only. Deployment state of the model. A model can only serve prediction requests after it gets deployed.
**Returns**

- ([::Google::Cloud::AutoML::V1::Model::DeploymentState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Model-DeploymentState)) --- Output only. Deployment state of the model. A model can only serve prediction requests after it gets deployed.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- Required. The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. It must start with a letter.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. It must start with a letter.
**Returns**

- (::String) --- Required. The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. It must start with a letter.

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.

### #etag=

    def etag=(value) -> ::String

**Parameter**

- **value** (::String) --- Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
**Returns**

- (::String) --- Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.

### #image_classification_model_metadata

    def image_classification_model_metadata() -> ::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata

**Returns**

- ([::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-ImageClassificationModelMetadata)) --- Metadata for image classification models.


  Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #image_classification_model_metadata=

    def image_classification_model_metadata=(value) -> ::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-ImageClassificationModelMetadata)) --- Metadata for image classification models.


  Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AutoML::V1::ImageClassificationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-ImageClassificationModelMetadata)) --- Metadata for image classification models.


  Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #image_object_detection_model_metadata

    def image_object_detection_model_metadata() -> ::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata

**Returns**

- ([::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-ImageObjectDetectionModelMetadata)) --- Metadata for image object detection models.


  Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #image_object_detection_model_metadata=

    def image_object_detection_model_metadata=(value) -> ::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-ImageObjectDetectionModelMetadata)) --- Metadata for image object detection models.


  Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AutoML::V1::ImageObjectDetectionModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-ImageObjectDetectionModelMetadata)) --- Metadata for image object detection models.


  Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. The labels with user-defined metadata to organize your model.

  Label keys and values can be no longer than 64 characters
  (Unicode codepoints), can only contain lowercase letters, numeric
  characters, underscores and dashes. International characters are allowed.
  Label values are optional. Label keys must start with a letter.

  See https://goo.gl/xmQnxf for more information on and examples of labels.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. The labels with user-defined metadata to organize your model.


  Label keys and values can be no longer than 64 characters
  (Unicode codepoints), can only contain lowercase letters, numeric
  characters, underscores and dashes. International characters are allowed.
  Label values are optional. Label keys must start with a letter.

  See https://goo.gl/xmQnxf for more information on and examples of labels.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. The labels with user-defined metadata to organize your model.

  Label keys and values can be no longer than 64 characters
  (Unicode codepoints), can only contain lowercase letters, numeric
  characters, underscores and dashes. International characters are allowed.
  Label values are optional. Label keys must start with a letter.

  See https://goo.gl/xmQnxf for more information on and examples of labels.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. Resource name of the model. Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. Resource name of the model. Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
**Returns**

- (::String) --- Output only. Resource name of the model. Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`

### #text_classification_model_metadata

    def text_classification_model_metadata() -> ::Google::Cloud::AutoML::V1::TextClassificationModelMetadata

**Returns**

- ([::Google::Cloud::AutoML::V1::TextClassificationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextClassificationModelMetadata)) --- Metadata for text classification models.


  Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text_classification_model_metadata=

    def text_classification_model_metadata=(value) -> ::Google::Cloud::AutoML::V1::TextClassificationModelMetadata

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::TextClassificationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextClassificationModelMetadata)) --- Metadata for text classification models.


  Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AutoML::V1::TextClassificationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextClassificationModelMetadata)) --- Metadata for text classification models.


  Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text_extraction_model_metadata

    def text_extraction_model_metadata() -> ::Google::Cloud::AutoML::V1::TextExtractionModelMetadata

**Returns**

- ([::Google::Cloud::AutoML::V1::TextExtractionModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextExtractionModelMetadata)) --- Metadata for text extraction models.


  Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text_extraction_model_metadata=

    def text_extraction_model_metadata=(value) -> ::Google::Cloud::AutoML::V1::TextExtractionModelMetadata

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::TextExtractionModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextExtractionModelMetadata)) --- Metadata for text extraction models.


  Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AutoML::V1::TextExtractionModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextExtractionModelMetadata)) --- Metadata for text extraction models.


  Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text_sentiment_model_metadata

    def text_sentiment_model_metadata() -> ::Google::Cloud::AutoML::V1::TextSentimentModelMetadata

**Returns**

- ([::Google::Cloud::AutoML::V1::TextSentimentModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSentimentModelMetadata)) --- Metadata for text sentiment models.


  Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #text_sentiment_model_metadata=

    def text_sentiment_model_metadata=(value) -> ::Google::Cloud::AutoML::V1::TextSentimentModelMetadata

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::TextSentimentModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSentimentModelMetadata)) --- Metadata for text sentiment models.


  Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AutoML::V1::TextSentimentModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSentimentModelMetadata)) --- Metadata for text sentiment models.


  Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #translation_model_metadata

    def translation_model_metadata() -> ::Google::Cloud::AutoML::V1::TranslationModelMetadata

**Returns**

- ([::Google::Cloud::AutoML::V1::TranslationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TranslationModelMetadata)) --- Metadata for translation models.


  Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #translation_model_metadata=

    def translation_model_metadata=(value) -> ::Google::Cloud::AutoML::V1::TranslationModelMetadata

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::TranslationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TranslationModelMetadata)) --- Metadata for translation models.


  Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::AutoML::V1::TranslationModelMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TranslationModelMetadata)) --- Metadata for translation models.


  Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Timestamp when this model was last updated.

### #update_time=

    def update_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Timestamp when this model was last updated.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Timestamp when this model was last updated.