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