datasets.proto 7.9 KB

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