• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15syntax = "proto3";
16
17package google.maps.mapsplatformdatasets.v1alpha;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/maps/mapsplatformdatasets/v1alpha/dataset.proto";
22import "google/protobuf/field_mask.proto";
23
24option csharp_namespace = "Google.Maps.MapsPlatformDatasets.V1Alpha";
25option go_package = "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha/mapsplatformdatasetspb;mapsplatformdatasetspb";
26option java_multiple_files = true;
27option java_outer_classname = "MapsPlatformDatasetsProto";
28option java_package = "com.google.maps.mapsplatformdatasets.v1alpha";
29option php_namespace = "Google\\Maps\\MapsPlatformDatasets\\V1alpha";
30
31// Request to create a maps dataset.
32message CreateDatasetRequest {
33  // Required. Parent project that will own the dataset.
34  // Format: projects/{$project_number}
35  string parent = 1 [
36    (google.api.field_behavior) = REQUIRED,
37    (google.api.resource_reference) = {
38      type: "cloudresourcemanager.googleapis.com/Project"
39    }
40  ];
41
42  // Required. The dataset version to create.
43  Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
44}
45
46// Request to update the metadata fields of the dataset.
47message UpdateDatasetMetadataRequest {
48  // Required. The dataset to update. The dataset's name is used to identify the dataset
49  // to be updated. The name has the format:
50  // projects/{project}/datasets/{dataset_id}
51  Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
52
53  // The list of fields to be updated. Support the value "*" for full
54  // replacement.
55  google.protobuf.FieldMask update_mask = 2;
56}
57
58// Request to get the specified dataset.
59message GetDatasetRequest {
60  // Required. Resource name. Can also fetch a specified version
61  // projects/{project}/datasets/{dataset_id}
62  // projects/{project}/datasets/{dataset_id}@{version-id}
63  //
64  // In order to retrieve a previous version of the dataset, also provide
65  // the version ID.
66  // Example: projects/123/datasets/assisted-driving-preferences@c7cfa2a8
67  string name = 1 [
68    (google.api.field_behavior) = REQUIRED,
69    (google.api.resource_reference) = {
70      type: "mapsplatformdatasets.googleapis.com/Dataset"
71    }
72  ];
73
74  // If specified, will fetch the dataset details of the version published for
75  // the specified use case rather than the latest, if one exists. If a
76  // published version does not exist, will default to getting the dataset
77  // details of the latest version.
78  Usage published_usage = 2;
79}
80
81// Request to list of all versions of the dataset.
82message ListDatasetVersionsRequest {
83  // Required. The name of the dataset to list all the versions for.
84  string name = 1 [
85    (google.api.field_behavior) = REQUIRED,
86    (google.api.resource_reference) = {
87      type: "mapsplatformdatasets.googleapis.com/Dataset"
88    }
89  ];
90
91  // The maximum number of versions to return per page.
92  // If unspecified (or zero), at most 1000 versions will be returned.
93  // The maximum value is 1000; values above 1000 will be coerced to 1000.
94  int32 page_size = 2;
95
96  // The page token, received from a previous GetDatasetVersions call.
97  // Provide this to retrieve the subsequent page.
98  string page_token = 3;
99}
100
101// Response with list of all versions of the dataset.
102message ListDatasetVersionsResponse {
103  // All the versions of the dataset.
104  repeated Dataset datasets = 1;
105
106  // A token that can be sent as `page_token` to retrieve the next page.
107  // If this field is omitted, there are no subsequent pages.
108  string next_page_token = 2;
109}
110
111// Request to list datasets for the project.
112message ListDatasetsRequest {
113  // Required. The name of the project to list all the datasets for.
114  string parent = 1 [
115    (google.api.field_behavior) = REQUIRED,
116    (google.api.resource_reference) = {
117      type: "cloudresourcemanager.googleapis.com/Project"
118    }
119  ];
120
121  // The maximum number of versions to return per page.
122  // If unspecified (or zero), at most 1000 datasets will be returned.
123  // The maximum value is 1000; values above 1000 will be coerced to 1000.
124  int32 page_size = 2;
125
126  // The page token, received from a previous GetDatasetVersions call.
127  // Provide this to retrieve the subsequent page.
128  string page_token = 3;
129}
130
131// Response to list datasets for the project.
132message ListDatasetsResponse {
133  // All the datasets for the project.
134  repeated Dataset datasets = 1;
135
136  // A token that can be sent as `page_token` to retrieve the next page.
137  // If this field is omitted, there are no subsequent pages.
138  string next_page_token = 2;
139}
140
141// Request to delete a dataset.
142//
143// The dataset to be deleted.
144message DeleteDatasetRequest {
145  // Required. Format: projects/${project}/datasets/{dataset_id}
146  string name = 1 [
147    (google.api.field_behavior) = REQUIRED,
148    (google.api.resource_reference) = {
149      type: "mapsplatformdatasets.googleapis.com/Dataset"
150    }
151  ];
152
153  // If set to true, any dataset version for this dataset will also be deleted.
154  // (Otherwise, the request will only work if the dataset has no versions.)
155  bool force = 2;
156}
157
158// Request to delete a version of a dataset.
159message DeleteDatasetVersionRequest {
160  // Required. Format: projects/${project}/datasets/{dataset_id}@{version-id}
161  string name = 1 [
162    (google.api.field_behavior) = REQUIRED,
163    (google.api.resource_reference) = {
164      type: "mapsplatformdatasets.googleapis.com/Dataset"
165    }
166  ];
167}
168