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