Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 5ad7d76

Browse files
feat: environment variables, disk interfaces (#19)
* feat: environment variables, disk interfaces PiperOrigin-RevId: 469790533 Source-Link: googleapis/googleapis@97fa02d Source-Link: https://github.com/googleapis/googleapis-gen/commit/f9e32c49207c9d8499062ef1a807edadcccefb76 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjllMzJjNDkyMDdjOWQ4NDk5MDYyZWYxYTgwN2VkYWRjY2NlZmI3NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent e318fe3 commit 5ad7d76

File tree

8 files changed

+3139
-9
lines changed

8 files changed

+3139
-9
lines changed

google/cloud/batch_v1/services/batch_service/async_client.py

Lines changed: 625 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/batch_v1/services/batch_service/client.py

Lines changed: 625 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/batch_v1/services/batch_service/transports/base.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,90 @@ def list_tasks(
263263
]:
264264
raise NotImplementedError()
265265

266+
@property
267+
def list_operations(
268+
self,
269+
) -> Callable[
270+
[operations_pb2.ListOperationsRequest],
271+
Union[
272+
operations_pb2.ListOperationsResponse,
273+
Awaitable[operations_pb2.ListOperationsResponse],
274+
],
275+
]:
276+
raise NotImplementedError()
277+
278+
@property
279+
def get_operation(
280+
self,
281+
) -> Callable[
282+
[operations_pb2.GetOperationRequest],
283+
Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
284+
]:
285+
raise NotImplementedError()
286+
287+
@property
288+
def cancel_operation(
289+
self,
290+
) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
291+
raise NotImplementedError()
292+
293+
@property
294+
def delete_operation(
295+
self,
296+
) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
297+
raise NotImplementedError()
298+
299+
@property
300+
def set_iam_policy(
301+
self,
302+
) -> Callable[
303+
[iam_policy_pb2.SetIamPolicyRequest],
304+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
305+
]:
306+
raise NotImplementedError()
307+
308+
@property
309+
def get_iam_policy(
310+
self,
311+
) -> Callable[
312+
[iam_policy_pb2.GetIamPolicyRequest],
313+
Union[policy_pb2.Policy, Awaitable[policy_pb2.Policy]],
314+
]:
315+
raise NotImplementedError()
316+
317+
@property
318+
def test_iam_permissions(
319+
self,
320+
) -> Callable[
321+
[iam_policy_pb2.TestIamPermissionsRequest],
322+
Union[
323+
iam_policy_pb2.TestIamPermissionsResponse,
324+
Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
325+
],
326+
]:
327+
raise NotImplementedError()
328+
329+
@property
330+
def get_location(
331+
self,
332+
) -> Callable[
333+
[locations_pb2.GetLocationRequest],
334+
Union[locations_pb2.Location, Awaitable[locations_pb2.Location]],
335+
]:
336+
raise NotImplementedError()
337+
338+
@property
339+
def list_locations(
340+
self,
341+
) -> Callable[
342+
[locations_pb2.ListLocationsRequest],
343+
Union[
344+
locations_pb2.ListLocationsResponse,
345+
Awaitable[locations_pb2.ListLocationsResponse],
346+
],
347+
]:
348+
raise NotImplementedError()
349+
266350
@property
267351
def kind(self) -> str:
268352
raise NotImplementedError()

google/cloud/batch_v1/services/batch_service/transports/grpc.py

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,192 @@ def list_tasks(self) -> Callable[[batch.ListTasksRequest], batch.ListTasksRespon
404404
def close(self):
405405
self.grpc_channel.close()
406406

407+
@property
408+
def delete_operation(
409+
self,
410+
) -> Callable[[operations_pb2.DeleteOperationRequest], None]:
411+
r"""Return a callable for the delete_operation method over gRPC."""
412+
# Generate a "stub function" on-the-fly which will actually make
413+
# the request.
414+
# gRPC handles serialization and deserialization, so we just need
415+
# to pass in the functions for each.
416+
if "delete_operation" not in self._stubs:
417+
self._stubs["delete_operation"] = self.grpc_channel.unary_unary(
418+
"/google.longrunning.Operations/DeleteOperation",
419+
request_serializer=operations_pb2.DeleteOperationRequest.SerializeToString,
420+
response_deserializer=None,
421+
)
422+
return self._stubs["delete_operation"]
423+
424+
@property
425+
def cancel_operation(
426+
self,
427+
) -> Callable[[operations_pb2.CancelOperationRequest], None]:
428+
r"""Return a callable for the cancel_operation method over gRPC."""
429+
# Generate a "stub function" on-the-fly which will actually make
430+
# the request.
431+
# gRPC handles serialization and deserialization, so we just need
432+
# to pass in the functions for each.
433+
if "cancel_operation" not in self._stubs:
434+
self._stubs["cancel_operation"] = self.grpc_channel.unary_unary(
435+
"/google.longrunning.Operations/CancelOperation",
436+
request_serializer=operations_pb2.CancelOperationRequest.SerializeToString,
437+
response_deserializer=None,
438+
)
439+
return self._stubs["cancel_operation"]
440+
441+
@property
442+
def get_operation(
443+
self,
444+
) -> Callable[[operations_pb2.GetOperationRequest], operations_pb2.Operation]:
445+
r"""Return a callable for the get_operation method over gRPC."""
446+
# Generate a "stub function" on-the-fly which will actually make
447+
# the request.
448+
# gRPC handles serialization and deserialization, so we just need
449+
# to pass in the functions for each.
450+
if "get_operation" not in self._stubs:
451+
self._stubs["get_operation"] = self.grpc_channel.unary_unary(
452+
"/google.longrunning.Operations/GetOperation",
453+
request_serializer=operations_pb2.GetOperationRequest.SerializeToString,
454+
response_deserializer=operations_pb2.Operation.FromString,
455+
)
456+
return self._stubs["get_operation"]
457+
458+
@property
459+
def list_operations(
460+
self,
461+
) -> Callable[
462+
[operations_pb2.ListOperationsRequest], operations_pb2.ListOperationsResponse
463+
]:
464+
r"""Return a callable for the list_operations method over gRPC."""
465+
# Generate a "stub function" on-the-fly which will actually make
466+
# the request.
467+
# gRPC handles serialization and deserialization, so we just need
468+
# to pass in the functions for each.
469+
if "list_operations" not in self._stubs:
470+
self._stubs["list_operations"] = self.grpc_channel.unary_unary(
471+
"/google.longrunning.Operations/ListOperations",
472+
request_serializer=operations_pb2.ListOperationsRequest.SerializeToString,
473+
response_deserializer=operations_pb2.ListOperationsResponse.FromString,
474+
)
475+
return self._stubs["list_operations"]
476+
477+
@property
478+
def list_locations(
479+
self,
480+
) -> Callable[
481+
[locations_pb2.ListLocationsRequest], locations_pb2.ListLocationsResponse
482+
]:
483+
r"""Return a callable for the list locations method over gRPC."""
484+
# Generate a "stub function" on-the-fly which will actually make
485+
# the request.
486+
# gRPC handles serialization and deserialization, so we just need
487+
# to pass in the functions for each.
488+
if "list_locations" not in self._stubs:
489+
self._stubs["list_locations"] = self.grpc_channel.unary_unary(
490+
"/google.cloud.location.Locations/ListLocations",
491+
request_serializer=locations_pb2.ListLocationsRequest.SerializeToString,
492+
response_deserializer=locations_pb2.ListLocationsResponse.FromString,
493+
)
494+
return self._stubs["list_locations"]
495+
496+
@property
497+
def get_location(
498+
self,
499+
) -> Callable[[locations_pb2.GetLocationRequest], locations_pb2.Location]:
500+
r"""Return a callable for the list locations method over gRPC."""
501+
# Generate a "stub function" on-the-fly which will actually make
502+
# the request.
503+
# gRPC handles serialization and deserialization, so we just need
504+
# to pass in the functions for each.
505+
if "get_location" not in self._stubs:
506+
self._stubs["get_location"] = self.grpc_channel.unary_unary(
507+
"/google.cloud.location.Locations/GetLocation",
508+
request_serializer=locations_pb2.GetLocationRequest.SerializeToString,
509+
response_deserializer=locations_pb2.Location.FromString,
510+
)
511+
return self._stubs["get_location"]
512+
513+
@property
514+
def set_iam_policy(
515+
self,
516+
) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
517+
r"""Return a callable for the set iam policy method over gRPC.
518+
Sets the IAM access control policy on the specified
519+
function. Replaces any existing policy.
520+
Returns:
521+
Callable[[~.SetIamPolicyRequest],
522+
~.Policy]:
523+
A function that, when called, will call the underlying RPC
524+
on the server.
525+
"""
526+
# Generate a "stub function" on-the-fly which will actually make
527+
# the request.
528+
# gRPC handles serialization and deserialization, so we just need
529+
# to pass in the functions for each.
530+
if "set_iam_policy" not in self._stubs:
531+
self._stubs["set_iam_policy"] = self.grpc_channel.unary_unary(
532+
"/google.iam.v1.IAMPolicy/SetIamPolicy",
533+
request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
534+
response_deserializer=policy_pb2.Policy.FromString,
535+
)
536+
return self._stubs["set_iam_policy"]
537+
538+
@property
539+
def get_iam_policy(
540+
self,
541+
) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
542+
r"""Return a callable for the get iam policy method over gRPC.
543+
Gets the IAM access control policy for a function.
544+
Returns an empty policy if the function exists and does
545+
not have a policy set.
546+
Returns:
547+
Callable[[~.GetIamPolicyRequest],
548+
~.Policy]:
549+
A function that, when called, will call the underlying RPC
550+
on the server.
551+
"""
552+
# Generate a "stub function" on-the-fly which will actually make
553+
# the request.
554+
# gRPC handles serialization and deserialization, so we just need
555+
# to pass in the functions for each.
556+
if "get_iam_policy" not in self._stubs:
557+
self._stubs["get_iam_policy"] = self.grpc_channel.unary_unary(
558+
"/google.iam.v1.IAMPolicy/GetIamPolicy",
559+
request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
560+
response_deserializer=policy_pb2.Policy.FromString,
561+
)
562+
return self._stubs["get_iam_policy"]
563+
564+
@property
565+
def test_iam_permissions(
566+
self,
567+
) -> Callable[
568+
[iam_policy_pb2.TestIamPermissionsRequest],
569+
iam_policy_pb2.TestIamPermissionsResponse,
570+
]:
571+
r"""Return a callable for the test iam permissions method over gRPC.
572+
Tests the specified permissions against the IAM access control
573+
policy for a function. If the function does not exist, this will
574+
return an empty set of permissions, not a NOT_FOUND error.
575+
Returns:
576+
Callable[[~.TestIamPermissionsRequest],
577+
~.TestIamPermissionsResponse]:
578+
A function that, when called, will call the underlying RPC
579+
on the server.
580+
"""
581+
# Generate a "stub function" on-the-fly which will actually make
582+
# the request.
583+
# gRPC handles serialization and deserialization, so we just need
584+
# to pass in the functions for each.
585+
if "test_iam_permissions" not in self._stubs:
586+
self._stubs["test_iam_permissions"] = self.grpc_channel.unary_unary(
587+
"/google.iam.v1.IAMPolicy/TestIamPermissions",
588+
request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
589+
response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
590+
)
591+
return self._stubs["test_iam_permissions"]
592+
407593
@property
408594
def kind(self) -> str:
409595
return "grpc"

0 commit comments

Comments
 (0)