Skip to content

Commit 48ec3e3

Browse files
[CHANGE ME] Re-generated spanner to pick up changes in the API or client library generator.
1 parent fd126fd commit 48ec3e3

35 files changed

+5657
-8185
lines changed

spanner/google/cloud/spanner_admin_database_v1/gapic/database_admin_client.py

Lines changed: 196 additions & 215 deletions
Large diffs are not rendered by default.

spanner/google/cloud/spanner_admin_database_v1/gapic/database_admin_client_config.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"google.spanner.admin.database.v1.DatabaseAdmin": {
44
"retry_codes": {
55
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6-
"non_idempotent": [],
6+
"non_idempotent": []
77
},
88
"retry_params": {
99
"default": {
@@ -13,56 +13,56 @@
1313
"initial_rpc_timeout_millis": 60000,
1414
"rpc_timeout_multiplier": 1.0,
1515
"max_rpc_timeout_millis": 60000,
16-
"total_timeout_millis": 600000,
16+
"total_timeout_millis": 600000
1717
}
1818
},
1919
"methods": {
2020
"ListDatabases": {
2121
"timeout_millis": 30000,
2222
"retry_codes_name": "idempotent",
23-
"retry_params_name": "default",
23+
"retry_params_name": "default"
2424
},
2525
"CreateDatabase": {
2626
"timeout_millis": 30000,
2727
"retry_codes_name": "non_idempotent",
28-
"retry_params_name": "default",
28+
"retry_params_name": "default"
2929
},
3030
"GetDatabase": {
3131
"timeout_millis": 30000,
3232
"retry_codes_name": "idempotent",
33-
"retry_params_name": "default",
33+
"retry_params_name": "default"
3434
},
3535
"UpdateDatabaseDdl": {
3636
"timeout_millis": 30000,
3737
"retry_codes_name": "idempotent",
38-
"retry_params_name": "default",
38+
"retry_params_name": "default"
3939
},
4040
"DropDatabase": {
4141
"timeout_millis": 30000,
4242
"retry_codes_name": "idempotent",
43-
"retry_params_name": "default",
43+
"retry_params_name": "default"
4444
},
4545
"GetDatabaseDdl": {
4646
"timeout_millis": 30000,
4747
"retry_codes_name": "idempotent",
48-
"retry_params_name": "default",
48+
"retry_params_name": "default"
4949
},
5050
"SetIamPolicy": {
5151
"timeout_millis": 30000,
5252
"retry_codes_name": "non_idempotent",
53-
"retry_params_name": "default",
53+
"retry_params_name": "default"
5454
},
5555
"GetIamPolicy": {
5656
"timeout_millis": 30000,
5757
"retry_codes_name": "idempotent",
58-
"retry_params_name": "default",
58+
"retry_params_name": "default"
5959
},
6060
"TestIamPermissions": {
6161
"timeout_millis": 30000,
6262
"retry_codes_name": "non_idempotent",
63-
"retry_params_name": "default",
64-
},
65-
},
63+
"retry_params_name": "default"
64+
}
65+
}
6666
}
6767
}
6868
}

spanner/google/cloud/spanner_admin_database_v1/gapic/enums.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class State(enum.IntEnum):
2929
with ``FAILED_PRECONDITION`` in this state.
3030
READY (int): The database is fully created and ready for use.
3131
"""
32-
3332
STATE_UNSPECIFIED = 0
3433
CREATING = 1
3534
READY = 2

spanner/google/cloud/spanner_admin_database_v1/gapic/transports/database_admin_grpc_transport.py

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ class DatabaseAdminGrpcTransport(object):
2828
which can be used to take advantage of advanced
2929
features of gRPC.
3030
"""
31-
3231
# The scopes needed to make gRPC calls to all of the methods defined
3332
# in this service.
3433
_OAUTH_SCOPES = (
35-
"https://www.googleapis.com/auth/cloud-platform",
36-
"https://www.googleapis.com/auth/spanner.admin",
34+
'https://www.googleapis.com/auth/cloud-platform',
35+
'https://www.googleapis.com/auth/spanner.admin',
3736
)
3837

39-
def __init__(
40-
self, channel=None, credentials=None, address="spanner.googleapis.com:443"
41-
):
38+
def __init__(self,
39+
channel=None,
40+
credentials=None,
41+
address='spanner.googleapis.com:443'):
4242
"""Instantiate the transport class.
4343
4444
Args:
@@ -56,32 +56,35 @@ def __init__(
5656
# exception (channels come with credentials baked in already).
5757
if channel is not None and credentials is not None:
5858
raise ValueError(
59-
"The `channel` and `credentials` arguments are mutually " "exclusive."
60-
)
59+
'The `channel` and `credentials` arguments are mutually '
60+
'exclusive.', )
6161

6262
# Create the channel.
6363
if channel is None:
64-
channel = self.create_channel(address=address, credentials=credentials)
64+
channel = self.create_channel(
65+
address=address,
66+
credentials=credentials,
67+
)
6568

6669
self._channel = channel
6770

6871
# gRPC uses objects called "stubs" that are bound to the
6972
# channel and provide a basic method for each RPC.
7073
self._stubs = {
71-
"database_admin_stub": spanner_database_admin_pb2_grpc.DatabaseAdminStub(
72-
channel
73-
)
74+
'database_admin_stub':
75+
spanner_database_admin_pb2_grpc.DatabaseAdminStub(channel),
7476
}
7577

7678
# Because this API includes a method that returns a
7779
# long-running operation (proto: google.longrunning.Operation),
7880
# instantiate an LRO client.
7981
self._operations_client = google.api_core.operations_v1.OperationsClient(
80-
channel
81-
)
82+
channel)
8283

8384
@classmethod
84-
def create_channel(cls, address="spanner.googleapis.com:443", credentials=None):
85+
def create_channel(cls,
86+
address='spanner.googleapis.com:443',
87+
credentials=None):
8588
"""Create and return a gRPC channel object.
8689
8790
Args:
@@ -96,7 +99,9 @@ def create_channel(cls, address="spanner.googleapis.com:443", credentials=None):
9699
grpc.Channel: A gRPC channel object.
97100
"""
98101
return google.api_core.grpc_helpers.create_channel(
99-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
102+
address,
103+
credentials=credentials,
104+
scopes=cls._OAUTH_SCOPES,
100105
)
101106

102107
@property
@@ -119,7 +124,7 @@ def list_databases(self):
119124
deserialized request object and returns a
120125
deserialized response object.
121126
"""
122-
return self._stubs["database_admin_stub"].ListDatabases
127+
return self._stubs['database_admin_stub'].ListDatabases
123128

124129
@property
125130
def create_database(self):
@@ -137,7 +142,7 @@ def create_database(self):
137142
deserialized request object and returns a
138143
deserialized response object.
139144
"""
140-
return self._stubs["database_admin_stub"].CreateDatabase
145+
return self._stubs['database_admin_stub'].CreateDatabase
141146

142147
@property
143148
def get_database(self):
@@ -150,7 +155,7 @@ def get_database(self):
150155
deserialized request object and returns a
151156
deserialized response object.
152157
"""
153-
return self._stubs["database_admin_stub"].GetDatabase
158+
return self._stubs['database_admin_stub'].GetDatabase
154159

155160
@property
156161
def update_database_ddl(self):
@@ -168,7 +173,7 @@ def update_database_ddl(self):
168173
deserialized request object and returns a
169174
deserialized response object.
170175
"""
171-
return self._stubs["database_admin_stub"].UpdateDatabaseDdl
176+
return self._stubs['database_admin_stub'].UpdateDatabaseDdl
172177

173178
@property
174179
def drop_database(self):
@@ -181,7 +186,7 @@ def drop_database(self):
181186
deserialized request object and returns a
182187
deserialized response object.
183188
"""
184-
return self._stubs["database_admin_stub"].DropDatabase
189+
return self._stubs['database_admin_stub'].DropDatabase
185190

186191
@property
187192
def get_database_ddl(self):
@@ -196,7 +201,7 @@ def get_database_ddl(self):
196201
deserialized request object and returns a
197202
deserialized response object.
198203
"""
199-
return self._stubs["database_admin_stub"].GetDatabaseDdl
204+
return self._stubs['database_admin_stub'].GetDatabaseDdl
200205

201206
@property
202207
def set_iam_policy(self):
@@ -213,7 +218,7 @@ def set_iam_policy(self):
213218
deserialized request object and returns a
214219
deserialized response object.
215220
"""
216-
return self._stubs["database_admin_stub"].SetIamPolicy
221+
return self._stubs['database_admin_stub'].SetIamPolicy
217222

218223
@property
219224
def get_iam_policy(self):
@@ -230,7 +235,7 @@ def get_iam_policy(self):
230235
deserialized request object and returns a
231236
deserialized response object.
232237
"""
233-
return self._stubs["database_admin_stub"].GetIamPolicy
238+
return self._stubs['database_admin_stub'].GetIamPolicy
234239

235240
@property
236241
def test_iam_permissions(self):
@@ -249,4 +254,4 @@ def test_iam_permissions(self):
249254
deserialized request object and returns a
250255
deserialized response object.
251256
"""
252-
return self._stubs["database_admin_stub"].TestIamPermissions
257+
return self._stubs['database_admin_stub'].TestIamPermissions

0 commit comments

Comments
 (0)