From 330f5db795a2f9221e5e7d51d81c9d0f26ab3145 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 29 Jun 2020 10:28:54 -0700 Subject: [PATCH] chore: update grpc version (#23) * chore: update grpc to v1.30.0 PiperOrigin-RevId: 317949519 Source-Author: Google APIs Source-Date: Tue Jun 23 15:22:22 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 7157f9552747421572cf1ab3aec1105c05ebd4f9 Source-Link: https://github.com/googleapis/googleapis/commit/7157f9552747421572cf1ab3aec1105c05ebd4f9 --- .../iam_credentials_v1/proto/common_pb2.py | 2 +- .../proto/common_pb2_grpc.py | 1 + .../proto/iamcredentials_pb2.py | 2 +- .../proto/iamcredentials_pb2_grpc.py | 169 +++++++++++++++--- packages/google-cloud-iam/synth.metadata | 6 +- 5 files changed, 152 insertions(+), 28 deletions(-) diff --git a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2.py b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2.py index 417c55b428e7..af6620b6e9ec 100644 --- a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2.py +++ b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/iam_credentials_v1/proto/common.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2_grpc.py b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2_grpc.py index 07cb78fe03a9..8a9393943bdf 100644 --- a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2_grpc.py +++ b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/common_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2.py b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2.py index f90b81a698e8..831fecd519a5 100644 --- a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2.py +++ b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/iam_credentials_v1/proto/iamcredentials.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection diff --git a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2_grpc.py b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2_grpc.py index ddbae1a42892..88d615d21ddc 100644 --- a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2_grpc.py +++ b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/proto/iamcredentials_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.iam_credentials_v1.proto import ( @@ -8,22 +9,22 @@ class IAMCredentialsStub(object): """A service account is a special type of Google account that belongs to your - application or a virtual machine (VM), instead of to an individual end user. - Your application assumes the identity of the service account to call Google - APIs, so that the users aren't directly involved. + application or a virtual machine (VM), instead of to an individual end user. + Your application assumes the identity of the service account to call Google + APIs, so that the users aren't directly involved. - Service account credentials are used to temporarily assume the identity - of the service account. Supported credential types include OAuth 2.0 access - tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - more. - """ + Service account credentials are used to temporarily assume the identity + of the service account. Supported credential types include OAuth 2.0 access + tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + more. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.GenerateAccessToken = channel.unary_unary( "/google.iam.credentials.v1.IAMCredentials/GenerateAccessToken", request_serializer=google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.GenerateAccessTokenRequest.SerializeToString, @@ -48,40 +49,40 @@ def __init__(self, channel): class IAMCredentialsServicer(object): """A service account is a special type of Google account that belongs to your - application or a virtual machine (VM), instead of to an individual end user. - Your application assumes the identity of the service account to call Google - APIs, so that the users aren't directly involved. + application or a virtual machine (VM), instead of to an individual end user. + Your application assumes the identity of the service account to call Google + APIs, so that the users aren't directly involved. - Service account credentials are used to temporarily assume the identity - of the service account. Supported credential types include OAuth 2.0 access - tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - more. - """ + Service account credentials are used to temporarily assume the identity + of the service account. Supported credential types include OAuth 2.0 access + tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + more. + """ def GenerateAccessToken(self, request, context): """Generates an OAuth 2.0 access token for a service account. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GenerateIdToken(self, request, context): """Generates an OpenID Connect ID token for a service account. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SignBlob(self, request, context): """Signs a blob using a service account's system-managed private key. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SignJwt(self, request, context): """Signs a JWT using a service account's system-managed private key. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -114,3 +115,125 @@ def add_IAMCredentialsServicer_to_server(servicer, server): "google.iam.credentials.v1.IAMCredentials", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class IAMCredentials(object): + """A service account is a special type of Google account that belongs to your + application or a virtual machine (VM), instead of to an individual end user. + Your application assumes the identity of the service account to call Google + APIs, so that the users aren't directly involved. + + Service account credentials are used to temporarily assume the identity + of the service account. Supported credential types include OAuth 2.0 access + tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + more. + """ + + @staticmethod + def GenerateAccessToken( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.iam.credentials.v1.IAMCredentials/GenerateAccessToken", + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.GenerateAccessTokenRequest.SerializeToString, + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.GenerateAccessTokenResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GenerateIdToken( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.iam.credentials.v1.IAMCredentials/GenerateIdToken", + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.GenerateIdTokenRequest.SerializeToString, + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.GenerateIdTokenResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SignBlob( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.iam.credentials.v1.IAMCredentials/SignBlob", + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.SignBlobRequest.SerializeToString, + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.SignBlobResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SignJwt( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.iam.credentials.v1.IAMCredentials/SignJwt", + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.SignJwtRequest.SerializeToString, + google_dot_cloud_dot_iam__credentials__v1_dot_proto_dot_common__pb2.SignJwtResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/packages/google-cloud-iam/synth.metadata b/packages/google-cloud-iam/synth.metadata index e5db4eafc48c..3f403c025dd6 100644 --- a/packages/google-cloud-iam/synth.metadata +++ b/packages/google-cloud-iam/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-iam.git", - "sha": "c9202fc00dc9c5c59d378bca6dd9ff46ca3ceecb" + "sha": "840de7e974f1214d420d7ff9fc990cd9710baa66" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cf41866c6f14f10a07aa1e2a1260fc0a2727d889", - "internalRef": "317812187" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, {