Skip to content

Commit

Permalink
[CHANGE ME] Re-generated to pick up changes in the API or client libr…
Browse files Browse the repository at this point in the history
…ary generator. (#27)

Co-authored-by: larkee <31196561+larkee@users.noreply.github.com>
  • Loading branch information
yoshi-automation and larkee committed Mar 12, 2020
1 parent 2331aa4 commit 23916c5
Show file tree
Hide file tree
Showing 18 changed files with 434 additions and 374 deletions.
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

Expand All @@ -33,10 +32,6 @@ option java_multiple_files = true;
option java_outer_classname = "SpannerDatabaseAdminProto";
option java_package = "com.google.spanner.admin.database.v1";
option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1";

// The Instance resource is defined in `google.spanner.admin.instance.v1`.
// Because this is a separate, independent API (technically), we redefine
// the resource name pattern here.
option (google.api.resource_definition) = {
type: "spanner.googleapis.com/Instance"
pattern: "projects/{project}/instances/{instance}"
Expand Down Expand Up @@ -66,11 +61,10 @@ service DatabaseAdmin {
// have a name of the format `<database_name>/operations/<operation_id>` and
// can be used to track preparation of the database. The
// [metadata][google.longrunning.Operation.metadata] field type is
// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
// The [response][google.longrunning.Operation.response] field type is
// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
// [response][google.longrunning.Operation.response] field type is
// [Database][google.spanner.admin.database.v1.Database], if successful.
rpc CreateDatabase(CreateDatabaseRequest)
returns (google.longrunning.Operation) {
rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/instances/*}/databases"
body: "*"
Expand All @@ -96,10 +90,8 @@ service DatabaseAdmin {
// the format `<database_name>/operations/<operation_id>` and can be used to
// track execution of the schema change(s). The
// [metadata][google.longrunning.Operation.metadata] field type is
// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
// The operation has no response.
rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest)
returns (google.longrunning.Operation) {
// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
rpc UpdateDatabaseDdl(UpdateDatabaseDdlRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{database=projects/*/instances/*/databases/*}/ddl"
body: "*"
Expand Down Expand Up @@ -134,8 +126,7 @@ service DatabaseAdmin {
//
// Authorization requires `spanner.databases.setIamPolicy`
// permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
returns (google.iam.v1.Policy) {
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy"
body: "*"
Expand All @@ -153,8 +144,7 @@ service DatabaseAdmin {
//
// Authorization requires `spanner.databases.getIamPolicy` permission on
// [resource][google.iam.v1.GetIamPolicyRequest.resource].
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
returns (google.iam.v1.Policy) {
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy"
body: "*"
Expand All @@ -172,8 +162,7 @@ service DatabaseAdmin {
// result in a NOT_FOUND error if the user has
// `spanner.databases.list` permission on the containing Cloud
// Spanner instance. Otherwise returns an empty set of permissions.
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
returns (google.iam.v1.TestIamPermissionsResponse) {
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
option (google.api.http) = {
post: "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions"
body: "*"
Expand Down Expand Up @@ -217,8 +206,7 @@ message Database {
State state = 2;
}

// The request for
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
message ListDatabasesRequest {
// Required. The instance whose databases should be listed.
// Values are of the form `projects/<project>/instances/<instance>`.
Expand All @@ -234,26 +222,23 @@ message ListDatabasesRequest {
int32 page_size = 3;

// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token]
// from a previous
// [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
// [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a
// previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse].
string page_token = 4;
}

// The response for
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
// The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
message ListDatabasesResponse {
// Databases that matched the request.
repeated Database databases = 1;

// `next_page_token` can be sent in a subsequent
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]
// call to fetch more of the matching databases.
// [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more
// of the matching databases.
string next_page_token = 2;
}

// The request for
// [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
// The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
message CreateDatabaseRequest {
// Required. The name of the instance that will serve the new database.
// Values are of the form `projects/<project>/instances/<instance>`.
Expand Down Expand Up @@ -283,12 +268,11 @@ message CreateDatabaseRequest {
message CreateDatabaseMetadata {
// The database being created.
string database = 1 [(google.api.resource_reference) = {
type: "spanner.googleapis.com/Database"
}];
type: "spanner.googleapis.com/Database"
}];
}

// The request for
// [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
// The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
message GetDatabaseRequest {
// Required. The name of the requested database. Values are of the form
// `projects/<project>/instances/<instance>/databases/<database>`.
Expand All @@ -314,8 +298,8 @@ message GetDatabaseRequest {
// Each batch of statements is assigned a name which can be used with
// the [Operations][google.longrunning.Operations] API to monitor
// progress. See the
// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id]
// field for more details.
// [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
// details.
message UpdateDatabaseDdlRequest {
// Required. The database to update.
string database = 1 [
Expand All @@ -335,20 +319,18 @@ message UpdateDatabaseDdlRequest {
//
// Specifying an explicit operation ID simplifies determining
// whether the statements were executed in the event that the
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
// call is replayed, or the return value is otherwise lost: the
// [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database]
// and `operation_id` fields can be combined to form the
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
// or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
// `operation_id` fields can be combined to form the
// [name][google.longrunning.Operation.name] of the resulting
// [longrunning.Operation][google.longrunning.Operation]:
// `<database>/operations/<operation_id>`.
// [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
//
// `operation_id` should be unique within the database, and must be
// a valid identifier: `[a-z][a-z0-9_]*`. Note that
// automatically-generated operation IDs always begin with an
// underscore. If the named operation already exists,
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
// returns `ALREADY_EXISTS`.
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
// `ALREADY_EXISTS`.
string operation_id = 3;
}

Expand All @@ -357,8 +339,8 @@ message UpdateDatabaseDdlRequest {
message UpdateDatabaseDdlMetadata {
// The database being modified.
string database = 1 [(google.api.resource_reference) = {
type: "spanner.googleapis.com/Database"
}];
type: "spanner.googleapis.com/Database"
}];

// For an update this list contains all the statements. For an
// individual statement, this list contains only that statement.
Expand All @@ -370,8 +352,7 @@ message UpdateDatabaseDdlMetadata {
repeated google.protobuf.Timestamp commit_timestamps = 3;
}

// The request for
// [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
message DropDatabaseRequest {
// Required. The database to be dropped.
string database = 1 [
Expand All @@ -382,8 +363,7 @@ message DropDatabaseRequest {
];
}

// The request for
// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
// The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
message GetDatabaseDdlRequest {
// Required. The database whose schema we wish to get.
string database = 1 [
Expand All @@ -394,8 +374,7 @@ message GetDatabaseDdlRequest {
];
}

// The response for
// [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
// The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
message GetDatabaseDdlResponse {
// A list of formatted DDL statements defining the schema of the database
// specified in the request.
Expand Down
Expand Up @@ -94,8 +94,8 @@ def CreateDatabase(self, request, context):
have a name of the format `<database_name>/operations/<operation_id>` and
can be used to track preparation of the database. The
[metadata][google.longrunning.Operation.metadata] field type is
[CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
The [response][google.longrunning.Operation.response] field type is
[CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
[response][google.longrunning.Operation.response] field type is
[Database][google.spanner.admin.database.v1.Database], if successful.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand All @@ -116,8 +116,7 @@ def UpdateDatabaseDdl(self, request, context):
the format `<database_name>/operations/<operation_id>` and can be used to
track execution of the schema change(s). The
[metadata][google.longrunning.Operation.metadata] field type is
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
The operation has no response.
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
Expand Down
Expand Up @@ -562,8 +562,8 @@ def get_instance(
Args:
name (str): Required. The name of the requested instance. Values are of the form
``projects/<project>/instances/<instance>``.
field_mask (Union[dict, ~google.cloud.spanner_admin_instance_v1.types.FieldMask]): If field\_mask is present, specifies the subset of [][google.spanner.admin.instance.v1.Instance] fields
that should be returned. If absent, all [][google.spanner.admin.instance.v1.Instance] fields are
field_mask (Union[dict, ~google.cloud.spanner_admin_instance_v1.types.FieldMask]): If field\_mask is present, specifies the subset of ``Instance`` fields
that should be returned. If absent, all ``Instance`` fields are
returned.
If a dict is provided, it must be of the same form as the protobuf
Expand Down Expand Up @@ -821,18 +821,15 @@ def update_instance(
Args:
instance (Union[dict, ~google.cloud.spanner_admin_instance_v1.types.Instance]): Required. The instance to update, which must always include the instance
name. Otherwise, only fields mentioned in
[][google.spanner.admin.instance.v1.UpdateInstanceRequest.field\_mask]
need be included.
name. Otherwise, only fields mentioned in ``field_mask`` need be
included.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.spanner_admin_instance_v1.types.Instance`
field_mask (Union[dict, ~google.cloud.spanner_admin_instance_v1.types.FieldMask]): Required. A mask specifying which fields in
[][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance]
should be updated. The field mask must always be specified; this
prevents any future fields in
[][google.spanner.admin.instance.v1.Instance] from being erased
accidentally by clients that do not know about them.
field_mask (Union[dict, ~google.cloud.spanner_admin_instance_v1.types.FieldMask]): Required. A mask specifying which fields in ``Instance`` should be
updated. The field mask must always be specified; this prevents any
future fields in ``Instance`` from being erased accidentally by clients
that do not know about them.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.spanner_admin_instance_v1.types.FieldMask`
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

Expand Down Expand Up @@ -353,8 +352,8 @@ message Instance {
// also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
string config = 2 [(google.api.resource_reference) = {
type: "spanner.googleapis.com/InstanceConfig"
}];
type: "spanner.googleapis.com/InstanceConfig"
}];

// Required. The descriptive name for this instance as it appears in UIs.
// Must be unique per project and between 4 and 30 characters in length.
Expand Down Expand Up @@ -398,14 +397,7 @@ message Instance {
// allow "_" in a future release.
map<string, string> labels = 7;

// Output only. The endpoint URIs based on the instance config.
// For example, instances located in a specific cloud region (or multi region)
// such as nam3, would have a nam3 specific endpoint URI.
// This URI is to be used implictly by SDK clients, with fallback to default
// URI. These endpoints are intended to optimize the network routing between
// the client and the instance's serving resources.
// If multiple endpoints are present, client may establish connections using
// any of the given URIs.
// Deprecated. This field is not populated.
repeated string endpoint_uris = 8;
}

Expand Down Expand Up @@ -466,9 +458,9 @@ message GetInstanceRequest {
}
];

// If field_mask is present, specifies the subset of [][Instance] fields that
// If field_mask is present, specifies the subset of [Instance][google.spanner.admin.instance.v1.Instance] fields that
// should be returned.
// If absent, all [][Instance] fields are returned.
// If absent, all [Instance][google.spanner.admin.instance.v1.Instance] fields are returned.
google.protobuf.FieldMask field_mask = 2;
}

Expand Down Expand Up @@ -549,12 +541,12 @@ message ListInstancesResponse {
// The request for [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
message UpdateInstanceRequest {
// Required. The instance to update, which must always include the instance
// name. Otherwise, only fields mentioned in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.
// name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.
Instance instance = 1 [(google.api.field_behavior) = REQUIRED];

// Required. A mask specifying which fields in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance] should be updated.
// Required. A mask specifying which fields in [Instance][google.spanner.admin.instance.v1.Instance] should be updated.
// The field mask must always be specified; this prevents any future fields in
// [][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know
// [Instance][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know
// about them.
google.protobuf.FieldMask field_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
Expand Down

0 comments on commit 23916c5

Please sign in to comment.