service.proto 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  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
  365. // using the filter are:
  366. //
  367. // * `translation_dataset_metadata:*` --> The dataset has
  368. // `translation_dataset_metadata`.
  369. string filter = 3;
  370. // Requested page size. Server may return fewer results than requested.
  371. // If unspecified, server will pick a default size.
  372. int32 page_size = 4;
  373. // A token identifying a page of results for the server to return
  374. // Typically obtained via
  375. // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
  376. // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
  377. string page_token = 6;
  378. }
  379. // Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
  380. message ListDatasetsResponse {
  381. // The datasets read.
  382. repeated Dataset datasets = 1;
  383. // A token to retrieve next page of results.
  384. // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page.
  385. string next_page_token = 2;
  386. }
  387. // Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset]
  388. message UpdateDatasetRequest {
  389. // Required. The dataset which replaces the resource on the server.
  390. Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
  391. // The update mask applies to the resource.
  392. google.protobuf.FieldMask update_mask = 2;
  393. }
  394. // Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
  395. message DeleteDatasetRequest {
  396. // Required. The resource name of the dataset to delete.
  397. string name = 1 [
  398. (google.api.field_behavior) = REQUIRED,
  399. (google.api.resource_reference) = {
  400. type: "automl.googleapis.com/Dataset"
  401. }
  402. ];
  403. }
  404. // Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
  405. message ImportDataRequest {
  406. // Required. Dataset name. Dataset must already exist. All imported
  407. // annotations and examples will be added.
  408. string name = 1 [
  409. (google.api.field_behavior) = REQUIRED,
  410. (google.api.resource_reference) = {
  411. type: "automl.googleapis.com/Dataset"
  412. }
  413. ];
  414. // Required. The desired input location and its domain specific semantics,
  415. // if any.
  416. InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED];
  417. }
  418. // Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
  419. message ExportDataRequest {
  420. // Required. The resource name of the dataset.
  421. string name = 1 [
  422. (google.api.field_behavior) = REQUIRED,
  423. (google.api.resource_reference) = {
  424. type: "automl.googleapis.com/Dataset"
  425. }
  426. ];
  427. // Required. The desired output location.
  428. OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  429. }
  430. // Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec].
  431. message GetAnnotationSpecRequest {
  432. // Required. The resource name of the annotation spec to retrieve.
  433. string name = 1 [
  434. (google.api.field_behavior) = REQUIRED,
  435. (google.api.resource_reference) = {
  436. type: "automl.googleapis.com/AnnotationSpec"
  437. }
  438. ];
  439. }
  440. // Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec].
  441. message GetTableSpecRequest {
  442. // Required. The resource name of the table spec to retrieve.
  443. string name = 1 [
  444. (google.api.field_behavior) = REQUIRED,
  445. (google.api.resource_reference) = {
  446. type: "automl.googleapis.com/TableSpec"
  447. }
  448. ];
  449. // Mask specifying which fields to read.
  450. google.protobuf.FieldMask field_mask = 2;
  451. }
  452. // Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
  453. message ListTableSpecsRequest {
  454. // Required. The resource name of the dataset to list table specs from.
  455. string parent = 1 [
  456. (google.api.field_behavior) = REQUIRED,
  457. (google.api.resource_reference) = {
  458. type: "automl.googleapis.com/Dataset"
  459. }
  460. ];
  461. // Mask specifying which fields to read.
  462. google.protobuf.FieldMask field_mask = 2;
  463. // Filter expression, see go/filtering.
  464. string filter = 3;
  465. // Requested page size. The server can return fewer results than requested.
  466. // If unspecified, the server will pick a default size.
  467. int32 page_size = 4;
  468. // A token identifying a page of results for the server to return.
  469. // Typically obtained from the
  470. // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
  471. // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
  472. string page_token = 6;
  473. }
  474. // Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
  475. message ListTableSpecsResponse {
  476. // The table specs read.
  477. repeated TableSpec table_specs = 1;
  478. // A token to retrieve next page of results.
  479. // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page.
  480. string next_page_token = 2;
  481. }
  482. // Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec]
  483. message UpdateTableSpecRequest {
  484. // Required. The table spec which replaces the resource on the server.
  485. TableSpec table_spec = 1 [(google.api.field_behavior) = REQUIRED];
  486. // The update mask applies to the resource.
  487. google.protobuf.FieldMask update_mask = 2;
  488. }
  489. // Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec].
  490. message GetColumnSpecRequest {
  491. // Required. The resource name of the column spec to retrieve.
  492. string name = 1 [
  493. (google.api.field_behavior) = REQUIRED,
  494. (google.api.resource_reference) = {
  495. type: "automl.googleapis.com/ColumnSpec"
  496. }
  497. ];
  498. // Mask specifying which fields to read.
  499. google.protobuf.FieldMask field_mask = 2;
  500. }
  501. // Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
  502. message ListColumnSpecsRequest {
  503. // Required. The resource name of the table spec to list column specs from.
  504. string parent = 1 [
  505. (google.api.field_behavior) = REQUIRED,
  506. (google.api.resource_reference) = {
  507. type: "automl.googleapis.com/TableSpec"
  508. }
  509. ];
  510. // Mask specifying which fields to read.
  511. google.protobuf.FieldMask field_mask = 2;
  512. // Filter expression, see go/filtering.
  513. string filter = 3;
  514. // Requested page size. The server can return fewer results than requested.
  515. // If unspecified, the server will pick a default size.
  516. int32 page_size = 4;
  517. // A token identifying a page of results for the server to return.
  518. // Typically obtained from the
  519. // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
  520. // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
  521. string page_token = 6;
  522. }
  523. // Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
  524. message ListColumnSpecsResponse {
  525. // The column specs read.
  526. repeated ColumnSpec column_specs = 1;
  527. // A token to retrieve next page of results.
  528. // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page.
  529. string next_page_token = 2;
  530. }
  531. // Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec]
  532. message UpdateColumnSpecRequest {
  533. // Required. The column spec which replaces the resource on the server.
  534. ColumnSpec column_spec = 1 [(google.api.field_behavior) = REQUIRED];
  535. // The update mask applies to the resource.
  536. google.protobuf.FieldMask update_mask = 2;
  537. }
  538. // Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
  539. message CreateModelRequest {
  540. // Required. Resource name of the parent project where the model is being created.
  541. string parent = 1 [
  542. (google.api.field_behavior) = REQUIRED,
  543. (google.api.resource_reference) = {
  544. type: "locations.googleapis.com/Location"
  545. }
  546. ];
  547. // Required. The model to create.
  548. Model model = 4 [(google.api.field_behavior) = REQUIRED];
  549. }
  550. // Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
  551. message GetModelRequest {
  552. // Required. Resource name of the model.
  553. string name = 1 [
  554. (google.api.field_behavior) = REQUIRED,
  555. (google.api.resource_reference) = {
  556. type: "automl.googleapis.com/Model"
  557. }
  558. ];
  559. }
  560. // Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
  561. message ListModelsRequest {
  562. // Required. Resource name of the project, from which to list the models.
  563. string parent = 1 [
  564. (google.api.field_behavior) = REQUIRED,
  565. (google.api.resource_reference) = {
  566. type: "locations.googleapis.com/Location"
  567. }
  568. ];
  569. // An expression for filtering the results of the request.
  570. //
  571. // * `model_metadata` - for existence of the case (e.g.
  572. // `video_classification_model_metadata:*`).
  573. // * `dataset_id` - for = or !=. Some examples of using the filter are:
  574. //
  575. // * `image_classification_model_metadata:*` --> The model has
  576. // `image_classification_model_metadata`.
  577. // * `dataset_id=5` --> The model was created from a dataset with ID 5.
  578. string filter = 3;
  579. // Requested page size.
  580. int32 page_size = 4;
  581. // A token identifying a page of results for the server to return
  582. // Typically obtained via
  583. // [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
  584. // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
  585. string page_token = 6;
  586. }
  587. // Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
  588. message ListModelsResponse {
  589. // List of models in the requested page.
  590. repeated Model model = 1;
  591. // A token to retrieve next page of results.
  592. // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.ListModelsRequest.page_token] to obtain that page.
  593. string next_page_token = 2;
  594. }
  595. // Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
  596. message DeleteModelRequest {
  597. // Required. Resource name of the model being deleted.
  598. string name = 1 [
  599. (google.api.field_behavior) = REQUIRED,
  600. (google.api.resource_reference) = {
  601. type: "automl.googleapis.com/Model"
  602. }
  603. ];
  604. }
  605. // Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
  606. message DeployModelRequest {
  607. // The per-domain specific deployment parameters.
  608. oneof model_deployment_metadata {
  609. // Model deployment metadata specific to Image Object Detection.
  610. ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
  611. // Model deployment metadata specific to Image Classification.
  612. ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
  613. }
  614. // Required. Resource name of the model to deploy.
  615. string name = 1 [
  616. (google.api.field_behavior) = REQUIRED,
  617. (google.api.resource_reference) = {
  618. type: "automl.googleapis.com/Model"
  619. }
  620. ];
  621. }
  622. // Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
  623. message UndeployModelRequest {
  624. // Required. Resource name of the model to undeploy.
  625. string name = 1 [
  626. (google.api.field_behavior) = REQUIRED,
  627. (google.api.resource_reference) = {
  628. type: "automl.googleapis.com/Model"
  629. }
  630. ];
  631. }
  632. // Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel].
  633. // Models need to be enabled for exporting, otherwise an error code will be
  634. // returned.
  635. message ExportModelRequest {
  636. // Required. The resource name of the model to export.
  637. string name = 1 [
  638. (google.api.field_behavior) = REQUIRED,
  639. (google.api.resource_reference) = {
  640. type: "automl.googleapis.com/Model"
  641. }
  642. ];
  643. // Required. The desired output location and configuration.
  644. ModelExportOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  645. }
  646. // Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples].
  647. message ExportEvaluatedExamplesRequest {
  648. // Required. The resource name of the model whose evaluated examples are to
  649. // be exported.
  650. string name = 1 [
  651. (google.api.field_behavior) = REQUIRED,
  652. (google.api.resource_reference) = {
  653. type: "automl.googleapis.com/Model"
  654. }
  655. ];
  656. // Required. The desired output location and configuration.
  657. ExportEvaluatedExamplesOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  658. }
  659. // Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
  660. message GetModelEvaluationRequest {
  661. // Required. Resource name for the model evaluation.
  662. string name = 1 [
  663. (google.api.field_behavior) = REQUIRED,
  664. (google.api.resource_reference) = {
  665. type: "automl.googleapis.com/ModelEvaluation"
  666. }
  667. ];
  668. }
  669. // Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
  670. message ListModelEvaluationsRequest {
  671. // Required. Resource name of the model to list the model evaluations for.
  672. // If modelId is set as "-", this will list model evaluations from across all
  673. // models of the parent location.
  674. string parent = 1 [
  675. (google.api.field_behavior) = REQUIRED,
  676. (google.api.resource_reference) = {
  677. type: "automl.googleapis.com/Model"
  678. }
  679. ];
  680. // An expression for filtering the results of the request.
  681. //
  682. // * `annotation_spec_id` - for =, != or existence. See example below for
  683. // the last.
  684. //
  685. // Some examples of using the filter are:
  686. //
  687. // * `annotation_spec_id!=4` --> The model evaluation was done for
  688. // annotation spec with ID different than 4.
  689. // * `NOT annotation_spec_id:*` --> The model evaluation was done for
  690. // aggregate of all annotation specs.
  691. string filter = 3;
  692. // Requested page size.
  693. int32 page_size = 4;
  694. // A token identifying a page of results for the server to return.
  695. // Typically obtained via
  696. // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
  697. // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
  698. string page_token = 6;
  699. }
  700. // Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
  701. message ListModelEvaluationsResponse {
  702. // List of model evaluations in the requested page.
  703. repeated ModelEvaluation model_evaluation = 1;
  704. // A token to retrieve next page of results.
  705. // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
  706. // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page.
  707. string next_page_token = 2;
  708. }