Skip to content

Commit

Permalink
chore: update grpc version (#23)
Browse files Browse the repository at this point in the history
* chore: update grpc to v1.30.0

PiperOrigin-RevId: 317949519

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jun 23 15:22:22 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 7157f9552747421572cf1ab3aec1105c05ebd4f9
Source-Link: googleapis/googleapis@7157f95
  • Loading branch information
yoshi-automation committed Jun 29, 2020
1 parent 1fc7793 commit 330f5db
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 28 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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,
Expand All @@ -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!")
Expand Down Expand Up @@ -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,
)
6 changes: 3 additions & 3 deletions packages/google-cloud-iam/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down

0 comments on commit 330f5db

Please sign in to comment.