@@ -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