dataset_service.proto 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. // Copyright 2022 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.aiplatform.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/aiplatform/v1beta1/annotation.proto";
  21. import "google/cloud/aiplatform/v1beta1/annotation_spec.proto";
  22. import "google/cloud/aiplatform/v1beta1/data_item.proto";
  23. import "google/cloud/aiplatform/v1beta1/dataset.proto";
  24. import "google/cloud/aiplatform/v1beta1/operation.proto";
  25. import "google/cloud/aiplatform/v1beta1/saved_query.proto";
  26. import "google/longrunning/operations.proto";
  27. import "google/protobuf/field_mask.proto";
  28. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
  29. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
  30. option java_multiple_files = true;
  31. option java_outer_classname = "DatasetServiceProto";
  32. option java_package = "com.google.cloud.aiplatform.v1beta1";
  33. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
  34. option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
  35. // The service that handles the CRUD of Vertex AI Dataset and its child
  36. // resources.
  37. service DatasetService {
  38. option (google.api.default_host) = "aiplatform.googleapis.com";
  39. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  40. // Creates a Dataset.
  41. rpc CreateDataset(CreateDatasetRequest) returns (google.longrunning.Operation) {
  42. option (google.api.http) = {
  43. post: "/v1beta1/{parent=projects/*/locations/*}/datasets"
  44. body: "dataset"
  45. };
  46. option (google.api.method_signature) = "parent,dataset";
  47. option (google.longrunning.operation_info) = {
  48. response_type: "Dataset"
  49. metadata_type: "CreateDatasetOperationMetadata"
  50. };
  51. }
  52. // Gets a Dataset.
  53. rpc GetDataset(GetDatasetRequest) returns (Dataset) {
  54. option (google.api.http) = {
  55. get: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
  56. };
  57. option (google.api.method_signature) = "name";
  58. }
  59. // Updates a Dataset.
  60. rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
  61. option (google.api.http) = {
  62. patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}"
  63. body: "dataset"
  64. };
  65. option (google.api.method_signature) = "dataset,update_mask";
  66. }
  67. // Lists Datasets in a Location.
  68. rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
  69. option (google.api.http) = {
  70. get: "/v1beta1/{parent=projects/*/locations/*}/datasets"
  71. };
  72. option (google.api.method_signature) = "parent";
  73. }
  74. // Deletes a Dataset.
  75. rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) {
  76. option (google.api.http) = {
  77. delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
  78. };
  79. option (google.api.method_signature) = "name";
  80. option (google.longrunning.operation_info) = {
  81. response_type: "google.protobuf.Empty"
  82. metadata_type: "DeleteOperationMetadata"
  83. };
  84. }
  85. // Imports data into a Dataset.
  86. rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
  87. option (google.api.http) = {
  88. post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:import"
  89. body: "*"
  90. };
  91. option (google.api.method_signature) = "name,import_configs";
  92. option (google.longrunning.operation_info) = {
  93. response_type: "ImportDataResponse"
  94. metadata_type: "ImportDataOperationMetadata"
  95. };
  96. }
  97. // Exports data from a Dataset.
  98. rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
  99. option (google.api.http) = {
  100. post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:export"
  101. body: "*"
  102. };
  103. option (google.api.method_signature) = "name,export_config";
  104. option (google.longrunning.operation_info) = {
  105. response_type: "ExportDataResponse"
  106. metadata_type: "ExportDataOperationMetadata"
  107. };
  108. }
  109. // Lists DataItems in a Dataset.
  110. rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) {
  111. option (google.api.http) = {
  112. get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/dataItems"
  113. };
  114. option (google.api.method_signature) = "parent";
  115. }
  116. // Lists SavedQueries in a Dataset.
  117. rpc ListSavedQueries(ListSavedQueriesRequest) returns (ListSavedQueriesResponse) {
  118. option (google.api.http) = {
  119. get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/savedQueries"
  120. };
  121. option (google.api.method_signature) = "parent";
  122. }
  123. // Gets an AnnotationSpec.
  124. rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) {
  125. option (google.api.http) = {
  126. get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}"
  127. };
  128. option (google.api.method_signature) = "name";
  129. }
  130. // Lists Annotations belongs to a dataitem
  131. rpc ListAnnotations(ListAnnotationsRequest) returns (ListAnnotationsResponse) {
  132. option (google.api.http) = {
  133. get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/dataItems/*}/annotations"
  134. };
  135. option (google.api.method_signature) = "parent";
  136. }
  137. }
  138. // Request message for [DatasetService.CreateDataset][google.cloud.aiplatform.v1beta1.DatasetService.CreateDataset].
  139. message CreateDatasetRequest {
  140. // Required. The resource name of the Location to create the Dataset in.
  141. // Format: `projects/{project}/locations/{location}`
  142. string parent = 1 [
  143. (google.api.field_behavior) = REQUIRED,
  144. (google.api.resource_reference) = {
  145. type: "locations.googleapis.com/Location"
  146. }
  147. ];
  148. // Required. The Dataset to create.
  149. Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
  150. }
  151. // Runtime operation information for [DatasetService.CreateDataset][google.cloud.aiplatform.v1beta1.DatasetService.CreateDataset].
  152. message CreateDatasetOperationMetadata {
  153. // The operation generic information.
  154. GenericOperationMetadata generic_metadata = 1;
  155. }
  156. // Request message for [DatasetService.GetDataset][google.cloud.aiplatform.v1beta1.DatasetService.GetDataset].
  157. message GetDatasetRequest {
  158. // Required. The name of the Dataset resource.
  159. string name = 1 [
  160. (google.api.field_behavior) = REQUIRED,
  161. (google.api.resource_reference) = {
  162. type: "aiplatform.googleapis.com/Dataset"
  163. }
  164. ];
  165. // Mask specifying which fields to read.
  166. google.protobuf.FieldMask read_mask = 2;
  167. }
  168. // Request message for [DatasetService.UpdateDataset][google.cloud.aiplatform.v1beta1.DatasetService.UpdateDataset].
  169. message UpdateDatasetRequest {
  170. // Required. The Dataset which replaces the resource on the server.
  171. Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
  172. // Required. The update mask applies to the resource.
  173. // For the `FieldMask` definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask].
  174. // Updatable fields:
  175. //
  176. // * `display_name`
  177. // * `description`
  178. // * `labels`
  179. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  180. }
  181. // Request message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1beta1.DatasetService.ListDatasets].
  182. message ListDatasetsRequest {
  183. // Required. The name of the Dataset's parent resource.
  184. // Format: `projects/{project}/locations/{location}`
  185. string parent = 1 [
  186. (google.api.field_behavior) = REQUIRED,
  187. (google.api.resource_reference) = {
  188. type: "locations.googleapis.com/Location"
  189. }
  190. ];
  191. // An expression for filtering the results of the request. For field names
  192. // both snake_case and camelCase are supported.
  193. //
  194. // * `display_name`: supports = and !=
  195. // * `metadata_schema_uri`: supports = and !=
  196. // * `labels` supports general map functions that is:
  197. // * `labels.key=value` - key:value equality
  198. // * `labels.key:* or labels:key - key existence
  199. // * A key including a space must be quoted. `labels."a key"`.
  200. //
  201. // Some examples:
  202. //
  203. // * `displayName="myDisplayName"`
  204. // * `labels.myKey="myValue"`
  205. string filter = 2;
  206. // The standard list page size.
  207. int32 page_size = 3;
  208. // The standard list page token.
  209. string page_token = 4;
  210. // Mask specifying which fields to read.
  211. google.protobuf.FieldMask read_mask = 5;
  212. // A comma-separated list of fields to order by, sorted in ascending order.
  213. // Use "desc" after a field name for descending.
  214. // Supported fields:
  215. //
  216. // * `display_name`
  217. // * `create_time`
  218. // * `update_time`
  219. string order_by = 6;
  220. }
  221. // Response message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1beta1.DatasetService.ListDatasets].
  222. message ListDatasetsResponse {
  223. // A list of Datasets that matches the specified filter in the request.
  224. repeated Dataset datasets = 1;
  225. // The standard List next-page token.
  226. string next_page_token = 2;
  227. }
  228. // Request message for [DatasetService.DeleteDataset][google.cloud.aiplatform.v1beta1.DatasetService.DeleteDataset].
  229. message DeleteDatasetRequest {
  230. // Required. The resource name of the Dataset to delete.
  231. // Format:
  232. // `projects/{project}/locations/{location}/datasets/{dataset}`
  233. string name = 1 [
  234. (google.api.field_behavior) = REQUIRED,
  235. (google.api.resource_reference) = {
  236. type: "aiplatform.googleapis.com/Dataset"
  237. }
  238. ];
  239. }
  240. // Request message for [DatasetService.ImportData][google.cloud.aiplatform.v1beta1.DatasetService.ImportData].
  241. message ImportDataRequest {
  242. // Required. The name of the Dataset resource.
  243. // Format:
  244. // `projects/{project}/locations/{location}/datasets/{dataset}`
  245. string name = 1 [
  246. (google.api.field_behavior) = REQUIRED,
  247. (google.api.resource_reference) = {
  248. type: "aiplatform.googleapis.com/Dataset"
  249. }
  250. ];
  251. // Required. The desired input locations. The contents of all input locations will be
  252. // imported in one batch.
  253. repeated ImportDataConfig import_configs = 2 [(google.api.field_behavior) = REQUIRED];
  254. }
  255. // Response message for [DatasetService.ImportData][google.cloud.aiplatform.v1beta1.DatasetService.ImportData].
  256. message ImportDataResponse {
  257. }
  258. // Runtime operation information for [DatasetService.ImportData][google.cloud.aiplatform.v1beta1.DatasetService.ImportData].
  259. message ImportDataOperationMetadata {
  260. // The common part of the operation metadata.
  261. GenericOperationMetadata generic_metadata = 1;
  262. }
  263. // Request message for [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
  264. message ExportDataRequest {
  265. // Required. The name of the Dataset resource.
  266. // Format:
  267. // `projects/{project}/locations/{location}/datasets/{dataset}`
  268. string name = 1 [
  269. (google.api.field_behavior) = REQUIRED,
  270. (google.api.resource_reference) = {
  271. type: "aiplatform.googleapis.com/Dataset"
  272. }
  273. ];
  274. // Required. The desired output location.
  275. ExportDataConfig export_config = 2 [(google.api.field_behavior) = REQUIRED];
  276. }
  277. // Response message for [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
  278. message ExportDataResponse {
  279. // All of the files that are exported in this export operation.
  280. repeated string exported_files = 1;
  281. }
  282. // Runtime operation information for [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
  283. message ExportDataOperationMetadata {
  284. // The common part of the operation metadata.
  285. GenericOperationMetadata generic_metadata = 1;
  286. // A Google Cloud Storage directory which path ends with '/'. The exported
  287. // data is stored in the directory.
  288. string gcs_output_directory = 2;
  289. }
  290. // Request message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems].
  291. message ListDataItemsRequest {
  292. // Required. The resource name of the Dataset to list DataItems from.
  293. // Format:
  294. // `projects/{project}/locations/{location}/datasets/{dataset}`
  295. string parent = 1 [
  296. (google.api.field_behavior) = REQUIRED,
  297. (google.api.resource_reference) = {
  298. type: "aiplatform.googleapis.com/Dataset"
  299. }
  300. ];
  301. // The standard list filter.
  302. string filter = 2;
  303. // The standard list page size.
  304. int32 page_size = 3;
  305. // The standard list page token.
  306. string page_token = 4;
  307. // Mask specifying which fields to read.
  308. google.protobuf.FieldMask read_mask = 5;
  309. // A comma-separated list of fields to order by, sorted in ascending order.
  310. // Use "desc" after a field name for descending.
  311. string order_by = 6;
  312. }
  313. // Response message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems].
  314. message ListDataItemsResponse {
  315. // A list of DataItems that matches the specified filter in the request.
  316. repeated DataItem data_items = 1;
  317. // The standard List next-page token.
  318. string next_page_token = 2;
  319. }
  320. // Request message for [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries].
  321. message ListSavedQueriesRequest {
  322. // Required. The resource name of the Dataset to list SavedQueries from.
  323. // Format:
  324. // `projects/{project}/locations/{location}/datasets/{dataset}`
  325. string parent = 1 [
  326. (google.api.field_behavior) = REQUIRED,
  327. (google.api.resource_reference) = {
  328. type: "aiplatform.googleapis.com/Dataset"
  329. }
  330. ];
  331. // The standard list filter.
  332. string filter = 2;
  333. // The standard list page size.
  334. int32 page_size = 3;
  335. // The standard list page token.
  336. string page_token = 4;
  337. // Mask specifying which fields to read.
  338. google.protobuf.FieldMask read_mask = 5;
  339. // A comma-separated list of fields to order by, sorted in ascending order.
  340. // Use "desc" after a field name for descending.
  341. string order_by = 6;
  342. }
  343. // Response message for [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries].
  344. message ListSavedQueriesResponse {
  345. // A list of SavedQueries that match the specified filter in the request.
  346. repeated SavedQuery saved_queries = 1;
  347. // The standard List next-page token.
  348. string next_page_token = 2;
  349. }
  350. // Request message for [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1beta1.DatasetService.GetAnnotationSpec].
  351. message GetAnnotationSpecRequest {
  352. // Required. The name of the AnnotationSpec resource.
  353. // Format:
  354. // `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
  355. string name = 1 [
  356. (google.api.field_behavior) = REQUIRED,
  357. (google.api.resource_reference) = {
  358. type: "aiplatform.googleapis.com/AnnotationSpec"
  359. }
  360. ];
  361. // Mask specifying which fields to read.
  362. google.protobuf.FieldMask read_mask = 2;
  363. }
  364. // Request message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations].
  365. message ListAnnotationsRequest {
  366. // Required. The resource name of the DataItem to list Annotations from.
  367. // Format:
  368. // `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
  369. string parent = 1 [
  370. (google.api.field_behavior) = REQUIRED,
  371. (google.api.resource_reference) = {
  372. type: "aiplatform.googleapis.com/DataItem"
  373. }
  374. ];
  375. // The standard list filter.
  376. string filter = 2;
  377. // The standard list page size.
  378. int32 page_size = 3;
  379. // The standard list page token.
  380. string page_token = 4;
  381. // Mask specifying which fields to read.
  382. google.protobuf.FieldMask read_mask = 5;
  383. // A comma-separated list of fields to order by, sorted in ascending order.
  384. // Use "desc" after a field name for descending.
  385. string order_by = 6;
  386. }
  387. // Response message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations].
  388. message ListAnnotationsResponse {
  389. // A list of Annotations that matches the specified filter in the request.
  390. repeated Annotation annotations = 1;
  391. // The standard List next-page token.
  392. string next_page_token = 2;
  393. }