service.proto 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  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. syntax = "proto3";
  15. package google.cloud.automl.v1beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/automl/v1beta1/annotation_payload.proto";
  21. import "google/cloud/automl/v1beta1/annotation_spec.proto";
  22. import "google/cloud/automl/v1beta1/column_spec.proto";
  23. import "google/cloud/automl/v1beta1/dataset.proto";
  24. import "google/cloud/automl/v1beta1/image.proto";
  25. import "google/cloud/automl/v1beta1/io.proto";
  26. import "google/cloud/automl/v1beta1/model.proto";
  27. import "google/cloud/automl/v1beta1/model_evaluation.proto";
  28. import "google/cloud/automl/v1beta1/operations.proto";
  29. import "google/cloud/automl/v1beta1/table_spec.proto";
  30. import "google/longrunning/operations.proto";
  31. import "google/protobuf/field_mask.proto";
  32. option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
  33. option java_multiple_files = true;
  34. option java_outer_classname = "AutoMlProto";
  35. option java_package = "com.google.cloud.automl.v1beta1";
  36. option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
  37. option ruby_package = "Google::Cloud::AutoML::V1beta1";
  38. // AutoML Server API.
  39. //
  40. // The resource names are assigned by the server.
  41. // The server never reuses names that it has created after the resources with
  42. // those names are deleted.
  43. //
  44. // An ID of a resource is the last element of the item's resource name. For
  45. // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
  46. // the id for the item is `{dataset_id}`.
  47. //
  48. // Currently the only supported `location_id` is "us-central1".
  49. //
  50. // On any input that is documented to expect a string parameter in
  51. // snake_case or kebab-case, either of those cases is accepted.
  52. service AutoMl {
  53. option (google.api.default_host) = "automl.googleapis.com";
  54. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  55. // Creates a dataset.
  56. rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
  57. option (google.api.http) = {
  58. post: "/v1beta1/{parent=projects/*/locations/*}/datasets"
  59. body: "dataset"
  60. };
  61. option (google.api.method_signature) = "parent,dataset";
  62. }
  63. // Gets a dataset.
  64. rpc GetDataset(GetDatasetRequest) returns (Dataset) {
  65. option (google.api.http) = {
  66. get: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
  67. };
  68. option (google.api.method_signature) = "name";
  69. }
  70. // Lists datasets in a project.
  71. rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
  72. option (google.api.http) = {
  73. get: "/v1beta1/{parent=projects/*/locations/*}/datasets"
  74. };
  75. option (google.api.method_signature) = "parent";
  76. }
  77. // Updates a dataset.
  78. rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
  79. option (google.api.http) = {
  80. patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}"
  81. body: "dataset"
  82. };
  83. option (google.api.method_signature) = "dataset";
  84. }
  85. // Deletes a dataset and all of its contents.
  86. // Returns empty response in the
  87. // [response][google.longrunning.Operation.response] field when it completes,
  88. // and `delete_details` in the
  89. // [metadata][google.longrunning.Operation.metadata] field.
  90. rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) {
  91. option (google.api.http) = {
  92. delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
  93. };
  94. option (google.api.method_signature) = "name";
  95. option (google.longrunning.operation_info) = {
  96. response_type: "google.protobuf.Empty"
  97. metadata_type: "OperationMetadata"
  98. };
  99. }
  100. // Imports data into a dataset.
  101. // For Tables this method can only be called on an empty Dataset.
  102. //
  103. // For Tables:
  104. // * A
  105. // [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params]
  106. // parameter must be explicitly set.
  107. // Returns an empty response in the
  108. // [response][google.longrunning.Operation.response] field when it completes.
  109. rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
  110. option (google.api.http) = {
  111. post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData"
  112. body: "*"
  113. };
  114. option (google.api.method_signature) = "name,input_config";
  115. option (google.longrunning.operation_info) = {
  116. response_type: "google.protobuf.Empty"
  117. metadata_type: "OperationMetadata"
  118. };
  119. }
  120. // Exports dataset's data to the provided output location.
  121. // Returns an empty response in the
  122. // [response][google.longrunning.Operation.response] field when it completes.
  123. rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
  124. option (google.api.http) = {
  125. post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData"
  126. body: "*"
  127. };
  128. option (google.api.method_signature) = "name,output_config";
  129. option (google.longrunning.operation_info) = {
  130. response_type: "google.protobuf.Empty"
  131. metadata_type: "OperationMetadata"
  132. };
  133. }
  134. // Gets an annotation spec.
  135. rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) {
  136. option (google.api.http) = {
  137. get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}"
  138. };
  139. option (google.api.method_signature) = "name";
  140. }
  141. // Gets a table spec.
  142. rpc GetTableSpec(GetTableSpecRequest) returns (TableSpec) {
  143. option (google.api.http) = {
  144. get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}"
  145. };
  146. option (google.api.method_signature) = "name";
  147. }
  148. // Lists table specs in a dataset.
  149. rpc ListTableSpecs(ListTableSpecsRequest) returns (ListTableSpecsResponse) {
  150. option (google.api.http) = {
  151. get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs"
  152. };
  153. option (google.api.method_signature) = "parent";
  154. }
  155. // Updates a table spec.
  156. rpc UpdateTableSpec(UpdateTableSpecRequest) returns (TableSpec) {
  157. option (google.api.http) = {
  158. patch: "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}"
  159. body: "table_spec"
  160. };
  161. option (google.api.method_signature) = "table_spec";
  162. }
  163. // Gets a column spec.
  164. rpc GetColumnSpec(GetColumnSpecRequest) returns (ColumnSpec) {
  165. option (google.api.http) = {
  166. get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}"
  167. };
  168. option (google.api.method_signature) = "name";
  169. }
  170. // Lists column specs in a table spec.
  171. rpc ListColumnSpecs(ListColumnSpecsRequest) returns (ListColumnSpecsResponse) {
  172. option (google.api.http) = {
  173. get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs"
  174. };
  175. option (google.api.method_signature) = "parent";
  176. }
  177. // Updates a column spec.
  178. rpc UpdateColumnSpec(UpdateColumnSpecRequest) returns (ColumnSpec) {
  179. option (google.api.http) = {
  180. patch: "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}"
  181. body: "column_spec"
  182. };
  183. option (google.api.method_signature) = "column_spec";
  184. }
  185. // Creates a model.
  186. // Returns a Model in the [response][google.longrunning.Operation.response]
  187. // field when it completes.
  188. // When you create a model, several model evaluations are created for it:
  189. // a global evaluation, and one evaluation for each annotation spec.
  190. rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) {
  191. option (google.api.http) = {
  192. post: "/v1beta1/{parent=projects/*/locations/*}/models"
  193. body: "model"
  194. };
  195. option (google.api.method_signature) = "parent,model";
  196. option (google.longrunning.operation_info) = {
  197. response_type: "Model"
  198. metadata_type: "OperationMetadata"
  199. };
  200. }
  201. // Gets a model.
  202. rpc GetModel(GetModelRequest) returns (Model) {
  203. option (google.api.http) = {
  204. get: "/v1beta1/{name=projects/*/locations/*/models/*}"
  205. };
  206. option (google.api.method_signature) = "name";
  207. }
  208. // Lists models.
  209. rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
  210. option (google.api.http) = {
  211. get: "/v1beta1/{parent=projects/*/locations/*}/models"
  212. };
  213. option (google.api.method_signature) = "parent";
  214. }
  215. // Deletes a model.
  216. // Returns `google.protobuf.Empty` in the
  217. // [response][google.longrunning.Operation.response] field when it completes,
  218. // and `delete_details` in the
  219. // [metadata][google.longrunning.Operation.metadata] field.
  220. rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
  221. option (google.api.http) = {
  222. delete: "/v1beta1/{name=projects/*/locations/*/models/*}"
  223. };
  224. option (google.api.method_signature) = "name";
  225. option (google.longrunning.operation_info) = {
  226. response_type: "google.protobuf.Empty"
  227. metadata_type: "OperationMetadata"
  228. };
  229. }
  230. // Deploys a model. If a model is already deployed, deploying it with the
  231. // same parameters has no effect. Deploying with different parametrs
  232. // (as e.g. changing
  233. //
  234. // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number])
  235. // will reset the deployment state without pausing the model's availability.
  236. //
  237. // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
  238. // deployment automatically.
  239. //
  240. // Returns an empty response in the
  241. // [response][google.longrunning.Operation.response] field when it completes.
  242. rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) {
  243. option (google.api.http) = {
  244. post: "/v1beta1/{name=projects/*/locations/*/models/*}:deploy"
  245. body: "*"
  246. };
  247. option (google.api.method_signature) = "name";
  248. option (google.longrunning.operation_info) = {
  249. response_type: "google.protobuf.Empty"
  250. metadata_type: "OperationMetadata"
  251. };
  252. }
  253. // Undeploys a model. If the model is not deployed this method has no effect.
  254. //
  255. // Only applicable for Text Classification, Image Object Detection and Tables;
  256. // all other domains manage deployment automatically.
  257. //
  258. // Returns an empty response in the
  259. // [response][google.longrunning.Operation.response] field when it completes.
  260. rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) {
  261. option (google.api.http) = {
  262. post: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy"
  263. body: "*"
  264. };
  265. option (google.api.method_signature) = "name";
  266. option (google.longrunning.operation_info) = {
  267. response_type: "google.protobuf.Empty"
  268. metadata_type: "OperationMetadata"
  269. };
  270. }
  271. // Exports a trained, "export-able", model to a user specified Google Cloud
  272. // Storage location. A model is considered export-able if and only if it has
  273. // an export format defined for it in
  274. //
  275. // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
  276. //
  277. // Returns an empty response in the
  278. // [response][google.longrunning.Operation.response] field when it completes.
  279. rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) {
  280. option (google.api.http) = {
  281. post: "/v1beta1/{name=projects/*/locations/*/models/*}:export"
  282. body: "*"
  283. };
  284. option (google.api.method_signature) = "name,output_config";
  285. option (google.longrunning.operation_info) = {
  286. response_type: "google.protobuf.Empty"
  287. metadata_type: "OperationMetadata"
  288. };
  289. }
  290. // Exports examples on which the model was evaluated (i.e. which were in the
  291. // TEST set of the dataset the model was created from), together with their
  292. // ground truth annotations and the annotations created (predicted) by the
  293. // model.
  294. // The examples, ground truth and predictions are exported in the state
  295. // they were at the moment the model was evaluated.
  296. //
  297. // This export is available only for 30 days since the model evaluation is
  298. // created.
  299. //
  300. // Currently only available for Tables.
  301. //
  302. // Returns an empty response in the
  303. // [response][google.longrunning.Operation.response] field when it completes.
  304. rpc ExportEvaluatedExamples(ExportEvaluatedExamplesRequest) returns (google.longrunning.Operation) {
  305. option (google.api.http) = {
  306. post: "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples"
  307. body: "*"
  308. };
  309. option (google.api.method_signature) = "name,output_config";
  310. option (google.longrunning.operation_info) = {
  311. response_type: "google.protobuf.Empty"
  312. metadata_type: "OperationMetadata"
  313. };
  314. }
  315. // Gets a model evaluation.
  316. rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
  317. option (google.api.http) = {
  318. get: "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}"
  319. };
  320. option (google.api.method_signature) = "name";
  321. }
  322. // Lists model evaluations.
  323. rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) {
  324. option (google.api.http) = {
  325. get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations"
  326. };
  327. option (google.api.method_signature) = "parent";
  328. }
  329. }
  330. // Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset].
  331. message CreateDatasetRequest {
  332. // Required. The resource name of the project to create the dataset for.
  333. string parent = 1 [
  334. (google.api.field_behavior) = REQUIRED,
  335. (google.api.resource_reference) = {
  336. type: "locations.googleapis.com/Location"
  337. }
  338. ];
  339. // Required. The dataset to create.
  340. Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
  341. }
  342. // Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset].
  343. message GetDatasetRequest {
  344. // Required. The resource name of the dataset to retrieve.
  345. string name = 1 [
  346. (google.api.field_behavior) = REQUIRED,
  347. (google.api.resource_reference) = {
  348. type: "automl.googleapis.com/Dataset"
  349. }
  350. ];
  351. }
  352. // Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
  353. message ListDatasetsRequest {
  354. // Required. The resource name of the project from which to list datasets.
  355. string parent = 1 [
  356. (google.api.field_behavior) = REQUIRED,
  357. (google.api.resource_reference) = {
  358. type: "locations.googleapis.com/Location"
  359. }
  360. ];
  361. // An expression for filtering the results of the request.
  362. //
  363. // * `dataset_metadata` - for existence of the case (e.g.
  364. // image_classification_dataset_metadata:*). Some examples of using the filter are:
  365. //
  366. // * `translation_dataset_metadata:*` --> The dataset has
  367. // translation_dataset_metadata.
  368. string filter = 3;
  369. // Requested page size. Server may return fewer results than requested.
  370. // If unspecified, server will pick a default size.
  371. int32 page_size = 4;
  372. // A token identifying a page of results for the server to return
  373. // Typically obtained via
  374. // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
  375. // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
  376. string page_token = 6;
  377. }
  378. // Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
  379. message ListDatasetsResponse {
  380. // The datasets read.
  381. repeated Dataset datasets = 1;
  382. // A token to retrieve next page of results.
  383. // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page.
  384. string next_page_token = 2;
  385. }
  386. // Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset]
  387. message UpdateDatasetRequest {
  388. // Required. The dataset which replaces the resource on the server.
  389. Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
  390. // The update mask applies to the resource.
  391. google.protobuf.FieldMask update_mask = 2;
  392. }
  393. // Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
  394. message DeleteDatasetRequest {
  395. // Required. The resource name of the dataset to delete.
  396. string name = 1 [
  397. (google.api.field_behavior) = REQUIRED,
  398. (google.api.resource_reference) = {
  399. type: "automl.googleapis.com/Dataset"
  400. }
  401. ];
  402. }
  403. // Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
  404. message ImportDataRequest {
  405. // Required. Dataset name. Dataset must already exist. All imported
  406. // annotations and examples will be added.
  407. string name = 1 [
  408. (google.api.field_behavior) = REQUIRED,
  409. (google.api.resource_reference) = {
  410. type: "automl.googleapis.com/Dataset"
  411. }
  412. ];
  413. // Required. The desired input location and its domain specific semantics,
  414. // if any.
  415. InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED];
  416. }
  417. // Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
  418. message ExportDataRequest {
  419. // Required. The resource name of the dataset.
  420. string name = 1 [
  421. (google.api.field_behavior) = REQUIRED,
  422. (google.api.resource_reference) = {
  423. type: "automl.googleapis.com/Dataset"
  424. }
  425. ];
  426. // Required. The desired output location.
  427. OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  428. }
  429. // Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec].
  430. message GetAnnotationSpecRequest {
  431. // Required. The resource name of the annotation spec to retrieve.
  432. string name = 1 [
  433. (google.api.field_behavior) = REQUIRED,
  434. (google.api.resource_reference) = {
  435. type: "automl.googleapis.com/AnnotationSpec"
  436. }
  437. ];
  438. }
  439. // Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec].
  440. message GetTableSpecRequest {
  441. // Required. The resource name of the table spec to retrieve.
  442. string name = 1 [
  443. (google.api.field_behavior) = REQUIRED,
  444. (google.api.resource_reference) = {
  445. type: "automl.googleapis.com/TableSpec"
  446. }
  447. ];
  448. // Mask specifying which fields to read.
  449. google.protobuf.FieldMask field_mask = 2;
  450. }
  451. // Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
  452. message ListTableSpecsRequest {
  453. // Required. The resource name of the dataset to list table specs from.
  454. string parent = 1 [
  455. (google.api.field_behavior) = REQUIRED,
  456. (google.api.resource_reference) = {
  457. type: "automl.googleapis.com/Dataset"
  458. }
  459. ];
  460. // Mask specifying which fields to read.
  461. google.protobuf.FieldMask field_mask = 2;
  462. // Filter expression, see go/filtering.
  463. string filter = 3;
  464. // Requested page size. The server can return fewer results than requested.
  465. // If unspecified, the server will pick a default size.
  466. int32 page_size = 4;
  467. // A token identifying a page of results for the server to return.
  468. // Typically obtained from the
  469. // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
  470. // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
  471. string page_token = 6;
  472. }
  473. // Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
  474. message ListTableSpecsResponse {
  475. // The table specs read.
  476. repeated TableSpec table_specs = 1;
  477. // A token to retrieve next page of results.
  478. // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page.
  479. string next_page_token = 2;
  480. }
  481. // Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec]
  482. message UpdateTableSpecRequest {
  483. // Required. The table spec which replaces the resource on the server.
  484. TableSpec table_spec = 1 [(google.api.field_behavior) = REQUIRED];
  485. // The update mask applies to the resource.
  486. google.protobuf.FieldMask update_mask = 2;
  487. }
  488. // Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec].
  489. message GetColumnSpecRequest {
  490. // Required. The resource name of the column spec to retrieve.
  491. string name = 1 [
  492. (google.api.field_behavior) = REQUIRED,
  493. (google.api.resource_reference) = {
  494. type: "automl.googleapis.com/ColumnSpec"
  495. }
  496. ];
  497. // Mask specifying which fields to read.
  498. google.protobuf.FieldMask field_mask = 2;
  499. }
  500. // Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
  501. message ListColumnSpecsRequest {
  502. // Required. The resource name of the table spec to list column specs from.
  503. string parent = 1 [
  504. (google.api.field_behavior) = REQUIRED,
  505. (google.api.resource_reference) = {
  506. type: "automl.googleapis.com/TableSpec"
  507. }
  508. ];
  509. // Mask specifying which fields to read.
  510. google.protobuf.FieldMask field_mask = 2;
  511. // Filter expression, see go/filtering.
  512. string filter = 3;
  513. // Requested page size. The server can return fewer results than requested.
  514. // If unspecified, the server will pick a default size.
  515. int32 page_size = 4;
  516. // A token identifying a page of results for the server to return.
  517. // Typically obtained from the
  518. // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
  519. // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
  520. string page_token = 6;
  521. }
  522. // Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
  523. message ListColumnSpecsResponse {
  524. // The column specs read.
  525. repeated ColumnSpec column_specs = 1;
  526. // A token to retrieve next page of results.
  527. // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page.
  528. string next_page_token = 2;
  529. }
  530. // Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec]
  531. message UpdateColumnSpecRequest {
  532. // Required. The column spec which replaces the resource on the server.
  533. ColumnSpec column_spec = 1 [(google.api.field_behavior) = REQUIRED];
  534. // The update mask applies to the resource.
  535. google.protobuf.FieldMask update_mask = 2;
  536. }
  537. // Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
  538. message CreateModelRequest {
  539. // Required. Resource name of the parent project where the model is being created.
  540. string parent = 1 [
  541. (google.api.field_behavior) = REQUIRED,
  542. (google.api.resource_reference) = {
  543. type: "locations.googleapis.com/Location"
  544. }
  545. ];
  546. // Required. The model to create.
  547. Model model = 4 [(google.api.field_behavior) = REQUIRED];
  548. }
  549. // Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
  550. message GetModelRequest {
  551. // Required. Resource name of the model.
  552. string name = 1 [
  553. (google.api.field_behavior) = REQUIRED,
  554. (google.api.resource_reference) = {
  555. type: "automl.googleapis.com/Model"
  556. }
  557. ];
  558. }
  559. // Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
  560. message ListModelsRequest {
  561. // Required. Resource name of the project, from which to list the models.
  562. string parent = 1 [
  563. (google.api.field_behavior) = REQUIRED,
  564. (google.api.resource_reference) = {
  565. type: "locations.googleapis.com/Location"
  566. }
  567. ];
  568. // An expression for filtering the results of the request.
  569. //
  570. // * `model_metadata` - for existence of the case (e.g.
  571. // video_classification_model_metadata:*).
  572. // * `dataset_id` - for = or !=. Some examples of using the filter are:
  573. //
  574. // * `image_classification_model_metadata:*` --> The model has
  575. // image_classification_model_metadata.
  576. // * `dataset_id=5` --> The model was created from a dataset with ID 5.
  577. string filter = 3;
  578. // Requested page size.
  579. int32 page_size = 4;
  580. // A token identifying a page of results for the server to return
  581. // Typically obtained via
  582. // [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
  583. // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
  584. string page_token = 6;
  585. }
  586. // Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
  587. message ListModelsResponse {
  588. // List of models in the requested page.
  589. repeated Model model = 1;
  590. // A token to retrieve next page of results.
  591. // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.ListModelsRequest.page_token] to obtain that page.
  592. string next_page_token = 2;
  593. }
  594. // Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
  595. message DeleteModelRequest {
  596. // Required. Resource name of the model being deleted.
  597. string name = 1 [
  598. (google.api.field_behavior) = REQUIRED,
  599. (google.api.resource_reference) = {
  600. type: "automl.googleapis.com/Model"
  601. }
  602. ];
  603. }
  604. // Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
  605. message DeployModelRequest {
  606. // The per-domain specific deployment parameters.
  607. oneof model_deployment_metadata {
  608. // Model deployment metadata specific to Image Object Detection.
  609. ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
  610. // Model deployment metadata specific to Image Classification.
  611. ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
  612. }
  613. // Required. Resource name of the model to deploy.
  614. string name = 1 [
  615. (google.api.field_behavior) = REQUIRED,
  616. (google.api.resource_reference) = {
  617. type: "automl.googleapis.com/Model"
  618. }
  619. ];
  620. }
  621. // Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
  622. message UndeployModelRequest {
  623. // Required. Resource name of the model to undeploy.
  624. string name = 1 [
  625. (google.api.field_behavior) = REQUIRED,
  626. (google.api.resource_reference) = {
  627. type: "automl.googleapis.com/Model"
  628. }
  629. ];
  630. }
  631. // Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel].
  632. // Models need to be enabled for exporting, otherwise an error code will be
  633. // returned.
  634. message ExportModelRequest {
  635. // Required. The resource name of the model to export.
  636. string name = 1 [
  637. (google.api.field_behavior) = REQUIRED,
  638. (google.api.resource_reference) = {
  639. type: "automl.googleapis.com/Model"
  640. }
  641. ];
  642. // Required. The desired output location and configuration.
  643. ModelExportOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  644. }
  645. // Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples].
  646. message ExportEvaluatedExamplesRequest {
  647. // Required. The resource name of the model whose evaluated examples are to
  648. // be exported.
  649. string name = 1 [
  650. (google.api.field_behavior) = REQUIRED,
  651. (google.api.resource_reference) = {
  652. type: "automl.googleapis.com/Model"
  653. }
  654. ];
  655. // Required. The desired output location and configuration.
  656. ExportEvaluatedExamplesOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  657. }
  658. // Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
  659. message GetModelEvaluationRequest {
  660. // Required. Resource name for the model evaluation.
  661. string name = 1 [
  662. (google.api.field_behavior) = REQUIRED,
  663. (google.api.resource_reference) = {
  664. type: "automl.googleapis.com/ModelEvaluation"
  665. }
  666. ];
  667. }
  668. // Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
  669. message ListModelEvaluationsRequest {
  670. // Required. Resource name of the model to list the model evaluations for.
  671. // If modelId is set as "-", this will list model evaluations from across all
  672. // models of the parent location.
  673. string parent = 1 [
  674. (google.api.field_behavior) = REQUIRED,
  675. (google.api.resource_reference) = {
  676. type: "automl.googleapis.com/Model"
  677. }
  678. ];
  679. // An expression for filtering the results of the request.
  680. //
  681. // * `annotation_spec_id` - for =, != or existence. See example below for
  682. // the last.
  683. //
  684. // Some examples of using the filter are:
  685. //
  686. // * `annotation_spec_id!=4` --> The model evaluation was done for
  687. // annotation spec with ID different than 4.
  688. // * `NOT annotation_spec_id:*` --> The model evaluation was done for
  689. // aggregate of all annotation specs.
  690. string filter = 3;
  691. // Requested page size.
  692. int32 page_size = 4;
  693. // A token identifying a page of results for the server to return.
  694. // Typically obtained via
  695. // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
  696. // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
  697. string page_token = 6;
  698. }
  699. // Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
  700. message ListModelEvaluationsResponse {
  701. // List of model evaluations in the requested page.
  702. repeated ModelEvaluation model_evaluation = 1;
  703. // A token to retrieve next page of results.
  704. // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
  705. // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page.
  706. string next_page_token = 2;
  707. }