@@ -91,7 +91,11 @@ def __init__(self, channel, client_config=operations_client_config.config):
91
91
92
92
# Service calls
93
93
def get_operation (
94
- self , name , retry = gapic_v1 .method.DEFAULT , timeout = gapic_v1 .method .DEFAULT
94
+ self ,
95
+ name ,
96
+ retry = gapic_v1 .method .DEFAULT ,
97
+ timeout = gapic_v1 .method .DEFAULT ,
98
+ metadata = None ,
95
99
):
96
100
"""Gets the latest state of a long-running operation.
97
101
@@ -117,6 +121,7 @@ def get_operation(
117
121
unspecified, the the default timeout in the client
118
122
configuration is used. If ``None``, then the RPC method will
119
123
not time out.
124
+ metadata (Optional[Tuple[str, str]]): Additional gRPC metadata.
120
125
121
126
Returns:
122
127
google.longrunning.operations_pb2.Operation: The state of the
@@ -128,14 +133,15 @@ def get_operation(
128
133
subclass will be raised.
129
134
"""
130
135
request = operations_pb2 .GetOperationRequest (name = name )
131
- return self ._get_operation (request , retry = retry , timeout = timeout )
136
+ return self ._get_operation (request , retry = retry , timeout = timeout , metadata = metadata )
132
137
133
138
def list_operations (
134
139
self ,
135
140
name ,
136
141
filter_ ,
137
142
retry = gapic_v1 .method .DEFAULT ,
138
143
timeout = gapic_v1 .method .DEFAULT ,
144
+ metadata = None ,
139
145
):
140
146
"""
141
147
Lists operations that match the specified filter in the request.
@@ -188,7 +194,7 @@ def list_operations(
188
194
request = operations_pb2 .ListOperationsRequest (name = name , filter = filter_ )
189
195
190
196
# Create the method used to fetch pages
191
- method = functools .partial (self ._list_operations , retry = retry , timeout = timeout )
197
+ method = functools .partial (self ._list_operations , retry = retry , timeout = timeout , metadata = metadata )
192
198
193
199
iterator = page_iterator .GRPCIterator (
194
200
client = None ,
@@ -202,7 +208,11 @@ def list_operations(
202
208
return iterator
203
209
204
210
def cancel_operation (
205
- self , name , retry = gapic_v1 .method .DEFAULT , timeout = gapic_v1 .method .DEFAULT
211
+ self ,
212
+ name ,
213
+ retry = gapic_v1 .method .DEFAULT ,
214
+ timeout = gapic_v1 .method .DEFAULT ,
215
+ metadata = None ,
206
216
):
207
217
"""Starts asynchronous cancellation on a long-running operation.
208
218
@@ -234,6 +244,7 @@ def cancel_operation(
234
244
unspecified, the the default timeout in the client
235
245
configuration is used. If ``None``, then the RPC method will
236
246
not time out.
247
+ metadata (Optional[Tuple[str, str]]): Additional gRPC metadata.
237
248
238
249
Raises:
239
250
google.api_core.exceptions.MethodNotImplemented: If the server
@@ -245,10 +256,14 @@ def cancel_operation(
245
256
"""
246
257
# Create the request object.
247
258
request = operations_pb2 .CancelOperationRequest (name = name )
248
- self ._cancel_operation (request , retry = retry , timeout = timeout )
259
+ self ._cancel_operation (request , retry = retry , timeout = timeout , metadata = metadata )
249
260
250
261
def delete_operation (
251
- self , name , retry = gapic_v1 .method .DEFAULT , timeout = gapic_v1 .method .DEFAULT
262
+ self ,
263
+ name ,
264
+ retry = gapic_v1 .method .DEFAULT ,
265
+ timeout = gapic_v1 .method .DEFAULT ,
266
+ metadata = None ,
252
267
):
253
268
"""Deletes a long-running operation.
254
269
@@ -274,6 +289,7 @@ def delete_operation(
274
289
unspecified, the the default timeout in the client
275
290
configuration is used. If ``None``, then the RPC method will
276
291
not time out.
292
+ metadata (Optional[Tuple[str, str]]): Additional gRPC metadata.
277
293
278
294
Raises:
279
295
google.api_core.exceptions.MethodNotImplemented: If the server
@@ -285,4 +301,4 @@ def delete_operation(
285
301
"""
286
302
# Create the request object.
287
303
request = operations_pb2 .DeleteOperationRequest (name = name )
288
- self ._delete_operation (request , retry = retry , timeout = timeout )
304
+ self ._delete_operation (request , retry = retry , timeout = timeout , metadata = metadata )
0 commit comments