dataset_service.proto 14 KB

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