datasets.proto 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. // Copyright 2016 Google Inc.
  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.genomics.v1;
  16. import "google/api/annotations.proto";
  17. import "google/iam/v1/iam_policy.proto";
  18. import "google/iam/v1/policy.proto";
  19. import "google/protobuf/empty.proto";
  20. import "google/protobuf/field_mask.proto";
  21. import "google/protobuf/timestamp.proto";
  22. option cc_enable_arenas = true;
  23. option java_multiple_files = true;
  24. option java_outer_classname = "DatasetsProto";
  25. option java_package = "com.google.genomics.v1";
  26. // This service manages datasets, which are collections of genomic data.
  27. service DatasetServiceV1 {
  28. // Lists datasets within a project.
  29. //
  30. // For the definitions of datasets and other genomics resources, see
  31. // [Fundamentals of Google
  32. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  33. rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
  34. option (google.api.http) = { get: "/v1/datasets" };
  35. }
  36. // Creates a new dataset.
  37. //
  38. // For the definitions of datasets and other genomics resources, see
  39. // [Fundamentals of Google
  40. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  41. rpc CreateDataset(CreateDatasetRequest) returns (Dataset) {
  42. option (google.api.http) = { post: "/v1/datasets" body: "dataset" };
  43. }
  44. // Gets a dataset by ID.
  45. //
  46. // For the definitions of datasets and other genomics resources, see
  47. // [Fundamentals of Google
  48. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  49. rpc GetDataset(GetDatasetRequest) returns (Dataset) {
  50. option (google.api.http) = { get: "/v1/datasets/{dataset_id}" };
  51. }
  52. // Updates a dataset.
  53. //
  54. // For the definitions of datasets and other genomics resources, see
  55. // [Fundamentals of Google
  56. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  57. //
  58. // This method supports patch semantics.
  59. rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
  60. option (google.api.http) = { patch: "/v1/datasets/{dataset_id}" body: "dataset" };
  61. }
  62. // Deletes a dataset and all of its contents (all read group sets,
  63. // reference sets, variant sets, call sets, annotation sets, etc.)
  64. // This is reversible (up to one week after the deletion) via
  65. // the
  66. // [datasets.undelete][google.genomics.v1.DatasetServiceV1.UndeleteDataset]
  67. // operation.
  68. //
  69. // For the definitions of datasets and other genomics resources, see
  70. // [Fundamentals of Google
  71. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  72. rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) {
  73. option (google.api.http) = { delete: "/v1/datasets/{dataset_id}" };
  74. }
  75. // Undeletes a dataset by restoring a dataset which was deleted via this API.
  76. //
  77. // For the definitions of datasets and other genomics resources, see
  78. // [Fundamentals of Google
  79. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  80. //
  81. // This operation is only possible for a week after the deletion occurred.
  82. rpc UndeleteDataset(UndeleteDatasetRequest) returns (Dataset) {
  83. option (google.api.http) = { post: "/v1/datasets/{dataset_id}:undelete" body: "*" };
  84. }
  85. // Sets the access control policy on the specified dataset. Replaces any
  86. // existing policy.
  87. //
  88. // For the definitions of datasets and other genomics resources, see
  89. // [Fundamentals of Google
  90. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  91. //
  92. // See <a href="/iam/docs/managing-policies#setting_a_policy">Setting a
  93. // Policy</a> for more information.
  94. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  95. option (google.api.http) = { post: "/v1/{resource=datasets/*}:setIamPolicy" body: "*" };
  96. }
  97. // Gets the access control policy for the dataset. This is empty if the
  98. // policy or resource does not exist.
  99. //
  100. // See <a href="/iam/docs/managing-policies#getting_a_policy">Getting a
  101. // Policy</a> for more information.
  102. //
  103. // For the definitions of datasets and other genomics resources, see
  104. // [Fundamentals of Google
  105. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  106. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  107. option (google.api.http) = { post: "/v1/{resource=datasets/*}:getIamPolicy" body: "*" };
  108. }
  109. // Returns permissions that a caller has on the specified resource.
  110. // See <a href="/iam/docs/managing-policies#testing_permissions">Testing
  111. // Permissions</a> for more information.
  112. //
  113. // For the definitions of datasets and other genomics resources, see
  114. // [Fundamentals of Google
  115. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  116. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  117. option (google.api.http) = { post: "/v1/{resource=datasets/*}:testIamPermissions" body: "*" };
  118. }
  119. }
  120. // A Dataset is a collection of genomic data.
  121. //
  122. // For more genomics resource definitions, see [Fundamentals of Google
  123. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  124. message Dataset {
  125. // The server-generated dataset ID, unique across all datasets.
  126. string id = 1;
  127. // The Google Developers Console project ID that this dataset belongs to.
  128. string project_id = 2;
  129. // The dataset name.
  130. string name = 3;
  131. // The time this dataset was created, in seconds from the epoch.
  132. google.protobuf.Timestamp create_time = 4;
  133. }
  134. // The dataset list request.
  135. message ListDatasetsRequest {
  136. // Required. The project to list datasets for.
  137. string project_id = 1;
  138. // The maximum number of results to return in a single page. If unspecified,
  139. // defaults to 50. The maximum value is 1024.
  140. int32 page_size = 2;
  141. // The continuation token, which is used to page through large result sets.
  142. // To get the next page of results, set this parameter to the value of
  143. // `nextPageToken` from the previous response.
  144. string page_token = 3;
  145. }
  146. // The dataset list response.
  147. message ListDatasetsResponse {
  148. // The list of matching Datasets.
  149. repeated Dataset datasets = 1;
  150. // The continuation token, which is used to page through large result sets.
  151. // Provide this value in a subsequent request to return the next page of
  152. // results. This field will be empty if there aren't any additional results.
  153. string next_page_token = 2;
  154. }
  155. message CreateDatasetRequest {
  156. // The dataset to be created. Must contain projectId and name.
  157. Dataset dataset = 1;
  158. }
  159. message UpdateDatasetRequest {
  160. // The ID of the dataset to be updated.
  161. string dataset_id = 1;
  162. // The new dataset data.
  163. Dataset dataset = 2;
  164. // An optional mask specifying which fields to update. At this time, the only
  165. // mutable field is [name][google.genomics.v1.Dataset.name]. The only
  166. // acceptable value is "name". If unspecified, all mutable fields will be
  167. // updated.
  168. google.protobuf.FieldMask update_mask = 3;
  169. }
  170. message DeleteDatasetRequest {
  171. // The ID of the dataset to be deleted.
  172. string dataset_id = 1;
  173. }
  174. message UndeleteDatasetRequest {
  175. // The ID of the dataset to be undeleted.
  176. string dataset_id = 1;
  177. }
  178. message GetDatasetRequest {
  179. // The ID of the dataset.
  180. string dataset_id = 1;
  181. }