diff --git a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/client.py b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/client.py index ce92375..578e0db 100644 --- a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/client.py +++ b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -342,7 +342,7 @@ def __init__( def get_resource( self, - request: httpbody_pb2.HttpBody = None, + request: Union[httpbody_pb2.HttpBody, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -352,7 +352,7 @@ def get_resource( Kubernetes API Server. Args: - request (google.api.httpbody_pb2.HttpBody): + request (Union[google.api.httpbody_pb2.HttpBody, dict]): The request object. Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or @@ -474,7 +474,7 @@ def get_resource( def post_resource( self, - request: httpbody_pb2.HttpBody = None, + request: Union[httpbody_pb2.HttpBody, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -484,7 +484,7 @@ def post_resource( API Server. Args: - request (google.api.httpbody_pb2.HttpBody): + request (Union[google.api.httpbody_pb2.HttpBody, dict]): The request object. Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or @@ -606,7 +606,7 @@ def post_resource( def delete_resource( self, - request: httpbody_pb2.HttpBody = None, + request: Union[httpbody_pb2.HttpBody, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -616,7 +616,7 @@ def delete_resource( Kubernetes API Server. Args: - request (google.api.httpbody_pb2.HttpBody): + request (Union[google.api.httpbody_pb2.HttpBody, dict]): The request object. Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or @@ -738,7 +738,7 @@ def delete_resource( def put_resource( self, - request: httpbody_pb2.HttpBody = None, + request: Union[httpbody_pb2.HttpBody, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -748,7 +748,7 @@ def put_resource( API Server. Args: - request (google.api.httpbody_pb2.HttpBody): + request (Union[google.api.httpbody_pb2.HttpBody, dict]): The request object. Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or @@ -870,7 +870,7 @@ def put_resource( def patch_resource( self, - request: httpbody_pb2.HttpBody = None, + request: Union[httpbody_pb2.HttpBody, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -880,7 +880,7 @@ def patch_resource( Kubernetes API Server. Args: - request (google.api.httpbody_pb2.HttpBody): + request (Union[google.api.httpbody_pb2.HttpBody, dict]): The request object. Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or diff --git a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/base.py b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/base.py index 333f844..d208850 100644 --- a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/base.py +++ b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/base.py @@ -117,7 +117,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc.py b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc.py index fe2c854..8942160 100644 --- a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc.py +++ b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc.py @@ -85,16 +85,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py index b79883a..4010863 100644 --- a/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py +++ b/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/scripts/fixup_gateway_v1beta1_keywords.py b/scripts/fixup_gateway_v1beta1_keywords.py index 913d607..dade2d5 100644 --- a/scripts/fixup_gateway_v1beta1_keywords.py +++ b/scripts/fixup_gateway_v1beta1_keywords.py @@ -39,11 +39,11 @@ def partition( class gatewayCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'delete_resource': ('content_type', 'data', 'extensions', ), - 'get_resource': ('content_type', 'data', 'extensions', ), - 'patch_resource': ('content_type', 'data', 'extensions', ), - 'post_resource': ('content_type', 'data', 'extensions', ), - 'put_resource': ('content_type', 'data', 'extensions', ), + 'delete_resource': ('content_type', 'data', 'extensions', ), + 'get_resource': ('content_type', 'data', 'extensions', ), + 'patch_resource': ('content_type', 'data', 'extensions', ), + 'post_resource': ('content_type', 'data', 'extensions', ), + 'put_resource': ('content_type', 'data', 'extensions', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -62,7 +62,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs )