xref: /aosp_15_r20/external/googleapis/google/cloud/automl/v1beta1/model.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.automl.v1beta1;
18
19import "google/api/resource.proto";
20import "google/cloud/automl/v1beta1/image.proto";
21import "google/cloud/automl/v1beta1/tables.proto";
22import "google/cloud/automl/v1beta1/text.proto";
23import "google/cloud/automl/v1beta1/translation.proto";
24import "google/cloud/automl/v1beta1/video.proto";
25import "google/protobuf/timestamp.proto";
26
27option go_package = "cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb";
28option java_multiple_files = true;
29option java_package = "com.google.cloud.automl.v1beta1";
30option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
31option ruby_package = "Google::Cloud::AutoML::V1beta1";
32
33// API proto representing a trained machine learning model.
34message Model {
35  option (google.api.resource) = {
36    type: "automl.googleapis.com/Model"
37    pattern: "projects/{project}/locations/{location}/models/{model}"
38  };
39
40  // Deployment state of the model.
41  enum DeploymentState {
42    // Should not be used, an un-set enum has this value by default.
43    DEPLOYMENT_STATE_UNSPECIFIED = 0;
44
45    // Model is deployed.
46    DEPLOYED = 1;
47
48    // Model is not deployed.
49    UNDEPLOYED = 2;
50  }
51
52  // Required.
53  // The model metadata that is specific to the problem type.
54  // Must match the metadata type of the dataset used to train the model.
55  oneof model_metadata {
56    // Metadata for translation models.
57    TranslationModelMetadata translation_model_metadata = 15;
58
59    // Metadata for image classification models.
60    ImageClassificationModelMetadata image_classification_model_metadata = 13;
61
62    // Metadata for text classification models.
63    TextClassificationModelMetadata text_classification_model_metadata = 14;
64
65    // Metadata for image object detection models.
66    ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20;
67
68    // Metadata for video classification models.
69    VideoClassificationModelMetadata video_classification_model_metadata = 23;
70
71    // Metadata for video object tracking models.
72    VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21;
73
74    // Metadata for text extraction models.
75    TextExtractionModelMetadata text_extraction_model_metadata = 19;
76
77    // Metadata for Tables models.
78    TablesModelMetadata tables_model_metadata = 24;
79
80    // Metadata for text sentiment models.
81    TextSentimentModelMetadata text_sentiment_model_metadata = 22;
82  }
83
84  // Output only. Resource name of the model.
85  // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
86  string name = 1;
87
88  // Required. The name of the model to show in the interface. The name can be
89  // up to 32 characters long and can consist only of ASCII Latin letters A-Z
90  // and a-z, underscores
91  // (_), and ASCII digits 0-9. It must start with a letter.
92  string display_name = 2;
93
94  // Required. The resource ID of the dataset used to create the model. The dataset must
95  // come from the same ancestor project and location.
96  string dataset_id = 3;
97
98  // Output only. Timestamp when the model training finished  and can be used for prediction.
99  google.protobuf.Timestamp create_time = 7;
100
101  // Output only. Timestamp when this model was last updated.
102  google.protobuf.Timestamp update_time = 11;
103
104  // Output only. Deployment state of the model. A model can only serve
105  // prediction requests after it gets deployed.
106  DeploymentState deployment_state = 8;
107}
108