Skip to content

Commit 2ffd2db

Browse files
yoshi-automationtseaver
authored andcommitted
Copy lintified proto files, update docstrings (via synth). (googleapis#7453)
1 parent a07a57a commit 2ffd2db

13 files changed

Lines changed: 338 additions & 250 deletions

File tree

spanner/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin.proto

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ option java_outer_classname = "SpannerDatabaseAdminProto";
3030
option java_package = "com.google.spanner.admin.database.v1";
3131
option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1";
3232

33-
3433
// Cloud Spanner Database Admin API
3534
//
3635
// The Cloud Spanner Database Admin API can be used to create, drop, and
@@ -49,10 +48,11 @@ service DatabaseAdmin {
4948
// have a name of the format `<database_name>/operations/<operation_id>` and
5049
// can be used to track preparation of the database. The
5150
// [metadata][google.longrunning.Operation.metadata] field type is
52-
// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
53-
// [response][google.longrunning.Operation.response] field type is
51+
// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
52+
// The [response][google.longrunning.Operation.response] field type is
5453
// [Database][google.spanner.admin.database.v1.Database], if successful.
55-
rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) {
54+
rpc CreateDatabase(CreateDatabaseRequest)
55+
returns (google.longrunning.Operation) {
5656
option (google.api.http) = {
5757
post: "/v1/{parent=projects/*/instances/*}/databases"
5858
body: "*"
@@ -72,8 +72,10 @@ service DatabaseAdmin {
7272
// the format `<database_name>/operations/<operation_id>` and can be used to
7373
// track execution of the schema change(s). The
7474
// [metadata][google.longrunning.Operation.metadata] field type is
75-
// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
76-
rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) returns (google.longrunning.Operation) {
75+
// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
76+
// The operation has no response.
77+
rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest)
78+
returns (google.longrunning.Operation) {
7779
option (google.api.http) = {
7880
patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl"
7981
body: "*"
@@ -101,7 +103,8 @@ service DatabaseAdmin {
101103
//
102104
// Authorization requires `spanner.databases.setIamPolicy` permission on
103105
// [resource][google.iam.v1.SetIamPolicyRequest.resource].
104-
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
106+
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
107+
returns (google.iam.v1.Policy) {
105108
option (google.api.http) = {
106109
post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy"
107110
body: "*"
@@ -113,7 +116,8 @@ service DatabaseAdmin {
113116
//
114117
// Authorization requires `spanner.databases.getIamPolicy` permission on
115118
// [resource][google.iam.v1.GetIamPolicyRequest.resource].
116-
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
119+
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
120+
returns (google.iam.v1.Policy) {
117121
option (google.api.http) = {
118122
post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy"
119123
body: "*"
@@ -126,7 +130,8 @@ service DatabaseAdmin {
126130
// a NOT_FOUND error if the user has `spanner.databases.list` permission on
127131
// the containing Cloud Spanner instance. Otherwise returns an empty set of
128132
// permissions.
129-
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
133+
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
134+
returns (google.iam.v1.TestIamPermissionsResponse) {
130135
option (google.api.http) = {
131136
post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions"
132137
body: "*"
@@ -160,7 +165,8 @@ message Database {
160165
State state = 2;
161166
}
162167

163-
// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
168+
// The request for
169+
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
164170
message ListDatabasesRequest {
165171
// Required. The instance whose databases should be listed.
166172
// Values are of the form `projects/<project>/instances/<instance>`.
@@ -171,23 +177,26 @@ message ListDatabasesRequest {
171177
int32 page_size = 3;
172178

173179
// If non-empty, `page_token` should contain a
174-
// [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
175-
// previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
180+
// [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
181+
// from a previous
182+
// [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
176183
string page_token = 4;
177184
}
178185

179-
// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
186+
// The response for
187+
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
180188
message ListDatabasesResponse {
181189
// Databases that matched the request.
182190
repeated Database databases = 1;
183191

184192
// `next_page_token` can be sent in a subsequent
185-
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
186-
// of the matching databases.
193+
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
194+
// call to fetch more of the matching databases.
187195
string next_page_token = 2;
188196
}
189197

190-
// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
198+
// The request for
199+
// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
191200
message CreateDatabaseRequest {
192201
// Required. The name of the instance that will serve the new database.
193202
// Values are of the form `projects/<project>/instances/<instance>`.
@@ -214,7 +223,8 @@ message CreateDatabaseMetadata {
214223
string database = 1;
215224
}
216225

217-
// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
226+
// The request for
227+
// [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
218228
message GetDatabaseRequest {
219229
// Required. The name of the requested database. Values are of the form
220230
// `projects/<project>/instances/<instance>/databases/<database>`.
@@ -235,8 +245,8 @@ message GetDatabaseRequest {
235245
// Each batch of statements is assigned a name which can be used with
236246
// the [Operations][google.longrunning.Operations] API to monitor
237247
// progress. See the
238-
// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
239-
// details.
248+
// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id]
249+
// field for more details.
240250
message UpdateDatabaseDdlRequest {
241251
// Required. The database to update.
242252
string database = 1;
@@ -251,18 +261,20 @@ message UpdateDatabaseDdlRequest {
251261
//
252262
// Specifying an explicit operation ID simplifies determining
253263
// whether the statements were executed in the event that the
254-
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
255-
// or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
256-
// `operation_id` fields can be combined to form the
264+
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
265+
// call is replayed, or the return value is otherwise lost: the
266+
// [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
267+
// and `operation_id` fields can be combined to form the
257268
// [name][google.longrunning.Operation.name] of the resulting
258-
// [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
269+
// [longrunning.Operation][google.longrunning.Operation]:
270+
// `<database>/operations/<operation_id>`.
259271
//
260272
// `operation_id` should be unique within the database, and must be
261273
// a valid identifier: `[a-z][a-z0-9_]*`. Note that
262274
// automatically-generated operation IDs always begin with an
263275
// underscore. If the named operation already exists,
264-
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
265-
// `ALREADY_EXISTS`.
276+
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
277+
// returns `ALREADY_EXISTS`.
266278
string operation_id = 3;
267279
}
268280

@@ -282,19 +294,22 @@ message UpdateDatabaseDdlMetadata {
282294
repeated google.protobuf.Timestamp commit_timestamps = 3;
283295
}
284296

285-
// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
297+
// The request for
298+
// [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
286299
message DropDatabaseRequest {
287300
// Required. The database to be dropped.
288301
string database = 1;
289302
}
290303

291-
// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
304+
// The request for
305+
// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
292306
message GetDatabaseDdlRequest {
293307
// Required. The database whose schema we wish to get.
294308
string database = 1;
295309
}
296310

297-
// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
311+
// The response for
312+
// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
298313
message GetDatabaseDdlResponse {
299314
// A list of formatted DDL statements defining the schema of the database
300315
// specified in the request.

spanner/google/cloud/spanner_admin_database_v1/proto/spanner_database_admin_pb2_grpc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def CreateDatabase(self, request, context):
9494
have a name of the format `<database_name>/operations/<operation_id>` and
9595
can be used to track preparation of the database. The
9696
[metadata][google.longrunning.Operation.metadata] field type is
97-
[CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
98-
[response][google.longrunning.Operation.response] field type is
97+
[CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
98+
The [response][google.longrunning.Operation.response] field type is
9999
[Database][google.spanner.admin.database.v1.Database], if successful.
100100
"""
101101
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -116,7 +116,8 @@ def UpdateDatabaseDdl(self, request, context):
116116
the format `<database_name>/operations/<operation_id>` and can be used to
117117
track execution of the schema change(s). The
118118
[metadata][google.longrunning.Operation.metadata] field type is
119-
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
119+
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
120+
The operation has no response.
120121
"""
121122
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
122123
context.set_details("Method not implemented!")

0 commit comments

Comments
 (0)