maps_platform_datasets.proto 5.8 KB

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