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/cloud/automl/v1beta1/io.proto";
20import "google/cloud/automl/v1beta1/model.proto";
21import "google/cloud/automl/v1beta1/model_evaluation.proto";
22import "google/protobuf/timestamp.proto";
23import "google/rpc/status.proto";
24
25option go_package = "cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb";
26option java_multiple_files = true;
27option java_package = "com.google.cloud.automl.v1beta1";
28option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
29option ruby_package = "Google::Cloud::AutoML::V1beta1";
30
31// Metadata used across all long running operations returned by AutoML API.
32message OperationMetadata {
33  // Ouptut only. Details of specific operation. Even if this field is empty,
34  // the presence allows to distinguish different types of operations.
35  oneof details {
36    // Details of a Delete operation.
37    DeleteOperationMetadata delete_details = 8;
38
39    // Details of a DeployModel operation.
40    DeployModelOperationMetadata deploy_model_details = 24;
41
42    // Details of an UndeployModel operation.
43    UndeployModelOperationMetadata undeploy_model_details = 25;
44
45    // Details of CreateModel operation.
46    CreateModelOperationMetadata create_model_details = 10;
47
48    // Details of ImportData operation.
49    ImportDataOperationMetadata import_data_details = 15;
50
51    // Details of BatchPredict operation.
52    BatchPredictOperationMetadata batch_predict_details = 16;
53
54    // Details of ExportData operation.
55    ExportDataOperationMetadata export_data_details = 21;
56
57    // Details of ExportModel operation.
58    ExportModelOperationMetadata export_model_details = 22;
59
60    // Details of ExportEvaluatedExamples operation.
61    ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26;
62  }
63
64  // Output only. Progress of operation. Range: [0, 100].
65  // Not used currently.
66  int32 progress_percent = 13;
67
68  // Output only. Partial failures encountered.
69  // E.g. single files that couldn't be read.
70  // This field should never exceed 20 entries.
71  // Status details field will contain standard GCP error details.
72  repeated google.rpc.Status partial_failures = 2;
73
74  // Output only. Time when the operation was created.
75  google.protobuf.Timestamp create_time = 3;
76
77  // Output only. Time when the operation was updated for the last time.
78  google.protobuf.Timestamp update_time = 4;
79}
80
81// Details of operations that perform deletes of any entities.
82message DeleteOperationMetadata {
83
84}
85
86// Details of DeployModel operation.
87message DeployModelOperationMetadata {
88
89}
90
91// Details of UndeployModel operation.
92message UndeployModelOperationMetadata {
93
94}
95
96// Details of CreateModel operation.
97message CreateModelOperationMetadata {
98
99}
100
101// Details of ImportData operation.
102message ImportDataOperationMetadata {
103
104}
105
106// Details of ExportData operation.
107message ExportDataOperationMetadata {
108  // Further describes this export data's output.
109  // Supplements
110  // [OutputConfig][google.cloud.automl.v1beta1.OutputConfig].
111  message ExportDataOutputInfo {
112    // The output location to which the exported data is written.
113    oneof output_location {
114      // The full path of the Google Cloud Storage directory created, into which
115      // the exported data is written.
116      string gcs_output_directory = 1;
117
118      // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
119      // format, into which the exported data is written.
120      string bigquery_output_dataset = 2;
121    }
122  }
123
124  // Output only. Information further describing this export data's output.
125  ExportDataOutputInfo output_info = 1;
126}
127
128// Details of BatchPredict operation.
129message BatchPredictOperationMetadata {
130  // Further describes this batch predict's output.
131  // Supplements
132  //
133  // [BatchPredictOutputConfig][google.cloud.automl.v1beta1.BatchPredictOutputConfig].
134  message BatchPredictOutputInfo {
135    // The output location into which prediction output is written.
136    oneof output_location {
137      // The full path of the Google Cloud Storage directory created, into which
138      // the prediction output is written.
139      string gcs_output_directory = 1;
140
141      // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
142      // format, into which the prediction output is written.
143      string bigquery_output_dataset = 2;
144    }
145  }
146
147  // Output only. The input config that was given upon starting this
148  // batch predict operation.
149  BatchPredictInputConfig input_config = 1;
150
151  // Output only. Information further describing this batch predict's output.
152  BatchPredictOutputInfo output_info = 2;
153}
154
155// Details of ExportModel operation.
156message ExportModelOperationMetadata {
157  // Further describes the output of model export.
158  // Supplements
159  //
160  // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
161  message ExportModelOutputInfo {
162    // The full path of the Google Cloud Storage directory created, into which
163    // the model will be exported.
164    string gcs_output_directory = 1;
165  }
166
167  // Output only. Information further describing the output of this model
168  // export.
169  ExportModelOutputInfo output_info = 2;
170}
171
172// Details of EvaluatedExamples operation.
173message ExportEvaluatedExamplesOperationMetadata {
174  // Further describes the output of the evaluated examples export.
175  // Supplements
176  //
177  // [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig].
178  message ExportEvaluatedExamplesOutputInfo {
179    // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
180    // format, into which the output of export evaluated examples is written.
181    string bigquery_output_dataset = 2;
182  }
183
184  // Output only. Information further describing the output of this evaluated
185  // examples export.
186  ExportEvaluatedExamplesOutputInfo output_info = 2;
187}
188