From a94a8d242748e4a7ad0dc23a062c78f732c81698 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 15:14:22 +0000 Subject: [PATCH] chore: use gapic-generator-python 0.51.2 (#78) - [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: https://github.com/googleapis/googleapis/commit/b224dfa52642a733ea64849d4e06d15c274bc08f Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9 --- .../binauthz_management_service_v1/client.py | 30 +++++++++---------- .../transports/base.py | 2 +- .../transports/grpc.py | 6 ++-- .../transports/grpc_asyncio.py | 6 ++-- .../services/system_policy_v1/client.py | 6 ++-- .../system_policy_v1/transports/base.py | 2 +- .../system_policy_v1/transports/grpc.py | 6 ++-- .../transports/grpc_asyncio.py | 6 ++-- .../services/validation_helper_v1/client.py | 6 ++-- .../validation_helper_v1/transports/base.py | 2 +- .../validation_helper_v1/transports/grpc.py | 6 ++-- .../transports/grpc_asyncio.py | 6 ++-- .../client.py | 30 +++++++++---------- .../transports/base.py | 2 +- .../transports/grpc.py | 6 ++-- .../transports/grpc_asyncio.py | 6 ++-- .../fixup_binaryauthorization_v1_keywords.py | 20 ++++++------- ...up_binaryauthorization_v1beta1_keywords.py | 16 +++++----- 18 files changed, 82 insertions(+), 82 deletions(-) diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/client.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/client.py index d5eb693e9937..0530a026c415 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/client.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/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 @@ -377,7 +377,7 @@ def __init__( def get_policy( self, - request: service.GetPolicyRequest = None, + request: Union[service.GetPolicyRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -397,7 +397,7 @@ def get_policy( project does not have one. Args: - request (google.cloud.binaryauthorization_v1.types.GetPolicyRequest): + request (Union[google.cloud.binaryauthorization_v1.types.GetPolicyRequest, dict]): The request object. Request message for [BinauthzManagementService.GetPolicy][]. name (str): @@ -459,7 +459,7 @@ def get_policy( def update_policy( self, - request: service.UpdatePolicyRequest = None, + request: Union[service.UpdatePolicyRequest, dict] = None, *, policy: resources.Policy = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -476,7 +476,7 @@ def update_policy( request is malformed. Args: - request (google.cloud.binaryauthorization_v1.types.UpdatePolicyRequest): + request (Union[google.cloud.binaryauthorization_v1.types.UpdatePolicyRequest, dict]): The request object. Request message for [BinauthzManagementService.UpdatePolicy][]. policy (google.cloud.binaryauthorization_v1.types.Policy): @@ -543,7 +543,7 @@ def update_policy( def create_attestor( self, - request: service.CreateAttestorRequest = None, + request: Union[service.CreateAttestorRequest, dict] = None, *, parent: str = None, attestor_id: str = None, @@ -562,7 +562,7 @@ def create_attestor( already exists. Args: - request (google.cloud.binaryauthorization_v1.types.CreateAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1.types.CreateAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.CreateAttestor][]. parent (str): @@ -647,7 +647,7 @@ def create_attestor( def get_attestor( self, - request: service.GetAttestorRequest = None, + request: Union[service.GetAttestorRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -661,7 +661,7 @@ def get_attestor( not exist. Args: - request (google.cloud.binaryauthorization_v1.types.GetAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1.types.GetAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.GetAttestor][]. name (str): @@ -724,7 +724,7 @@ def get_attestor( def update_attestor( self, - request: service.UpdateAttestorRequest = None, + request: Union[service.UpdateAttestorRequest, dict] = None, *, attestor: resources.Attestor = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -738,7 +738,7 @@ def update_attestor( not exist. Args: - request (google.cloud.binaryauthorization_v1.types.UpdateAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1.types.UpdateAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.UpdateAttestor][]. attestor (google.cloud.binaryauthorization_v1.types.Attestor): @@ -806,7 +806,7 @@ def update_attestor( def list_attestors( self, - request: service.ListAttestorsRequest = None, + request: Union[service.ListAttestorsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -817,7 +817,7 @@ def list_attestors( Returns INVALID_ARGUMENT if the project does not exist. Args: - request (google.cloud.binaryauthorization_v1.types.ListAttestorsRequest): + request (Union[google.cloud.binaryauthorization_v1.types.ListAttestorsRequest, dict]): The request object. Request message for [BinauthzManagementService.ListAttestors][]. parent (str): @@ -889,7 +889,7 @@ def list_attestors( def delete_attestor( self, - request: service.DeleteAttestorRequest = None, + request: Union[service.DeleteAttestorRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -903,7 +903,7 @@ def delete_attestor( not exist. Args: - request (google.cloud.binaryauthorization_v1.types.DeleteAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1.types.DeleteAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.DeleteAttestor][]. name (str): diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/base.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/base.py index 12f8b898d690..18b3d965e80b 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/base.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/base.py @@ -119,7 +119,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc.py index 53d8da30a451..27ec06ee712d 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc.py @@ -88,16 +88,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc_asyncio.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc_asyncio.py index 167e397197fc..bb5c5b62b8d9 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc_asyncio.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/binauthz_management_service_v1/transports/grpc_asyncio.py @@ -137,16 +137,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/client.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/client.py index 14b1aa046274..49d657333acc 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/client.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/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 @@ -348,7 +348,7 @@ def __init__( def get_system_policy( self, - request: service.GetSystemPolicyRequest = None, + request: Union[service.GetSystemPolicyRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -359,7 +359,7 @@ def get_system_policy( location. Args: - request (google.cloud.binaryauthorization_v1.types.GetSystemPolicyRequest): + request (Union[google.cloud.binaryauthorization_v1.types.GetSystemPolicyRequest, dict]): The request object. Request to read the current system policy. name (str): diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/base.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/base.py index 3e98f40a579d..78d44f808f02 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/base.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/base.py @@ -118,7 +118,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc.py index b112d9f41219..fa5d87efc8ef 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc.py @@ -81,16 +81,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc_asyncio.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc_asyncio.py index e3474e7d00cb..92c7b06198fb 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc_asyncio.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/system_policy_v1/transports/grpc_asyncio.py @@ -128,16 +128,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/client.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/client.py index 0c85ba2e4b35..8bdd2ae00418 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/client.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/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 @@ -337,7 +337,7 @@ def __init__( def validate_attestation_occurrence( self, - request: service.ValidateAttestationOccurrenceRequest = None, + request: Union[service.ValidateAttestationOccurrenceRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -347,7 +347,7 @@ def validate_attestation_occurrence( image URI was signed by the given Attestor Args: - request (google.cloud.binaryauthorization_v1.types.ValidateAttestationOccurrenceRequest): + request (Union[google.cloud.binaryauthorization_v1.types.ValidateAttestationOccurrenceRequest, dict]): The request object. Request message for [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/base.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/base.py index d91ba40f4fa8..8460bfc5b052 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/base.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc.py index 0eeb82fad604..4aec7f73f673 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc.py @@ -80,16 +80,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc_asyncio.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc_asyncio.py index 668000bc47d9..8d5ea0d7c26b 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc_asyncio.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1/services/validation_helper_v1/transports/grpc_asyncio.py @@ -127,16 +127,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/client.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/client.py index 771a38b72588..610f619fb672 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/client.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/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 @@ -382,7 +382,7 @@ def __init__( def get_policy( self, - request: service.GetPolicyRequest = None, + request: Union[service.GetPolicyRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -404,7 +404,7 @@ def get_policy( project does not have one. Args: - request (google.cloud.binaryauthorization_v1beta1.types.GetPolicyRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.GetPolicyRequest, dict]): The request object. Request message for [BinauthzManagementService.GetPolicy][]. name (str): @@ -466,7 +466,7 @@ def get_policy( def update_policy( self, - request: service.UpdatePolicyRequest = None, + request: Union[service.UpdatePolicyRequest, dict] = None, *, policy: resources.Policy = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -483,7 +483,7 @@ def update_policy( INVALID_ARGUMENT if the request is malformed. Args: - request (google.cloud.binaryauthorization_v1beta1.types.UpdatePolicyRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.UpdatePolicyRequest, dict]): The request object. Request message for [BinauthzManagementService.UpdatePolicy][]. policy (google.cloud.binaryauthorization_v1beta1.types.Policy): @@ -550,7 +550,7 @@ def update_policy( def create_attestor( self, - request: service.CreateAttestorRequest = None, + request: Union[service.CreateAttestorRequest, dict] = None, *, parent: str = None, attestor_id: str = None, @@ -570,7 +570,7 @@ def create_attestor( already exists. Args: - request (google.cloud.binaryauthorization_v1beta1.types.CreateAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.CreateAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.CreateAttestor][]. parent (str): @@ -655,7 +655,7 @@ def create_attestor( def get_attestor( self, - request: service.GetAttestorRequest = None, + request: Union[service.GetAttestorRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -669,7 +669,7 @@ def get_attestor( does not exist. Args: - request (google.cloud.binaryauthorization_v1beta1.types.GetAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.GetAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.GetAttestor][]. name (str): @@ -732,7 +732,7 @@ def get_attestor( def update_attestor( self, - request: service.UpdateAttestorRequest = None, + request: Union[service.UpdateAttestorRequest, dict] = None, *, attestor: resources.Attestor = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -746,7 +746,7 @@ def update_attestor( does not exist. Args: - request (google.cloud.binaryauthorization_v1beta1.types.UpdateAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.UpdateAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.UpdateAttestor][]. attestor (google.cloud.binaryauthorization_v1beta1.types.Attestor): @@ -814,7 +814,7 @@ def update_attestor( def list_attestors( self, - request: service.ListAttestorsRequest = None, + request: Union[service.ListAttestorsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -826,7 +826,7 @@ def list_attestors( Returns INVALID_ARGUMENT if the project does not exist. Args: - request (google.cloud.binaryauthorization_v1beta1.types.ListAttestorsRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.ListAttestorsRequest, dict]): The request object. Request message for [BinauthzManagementService.ListAttestors][]. parent (str): @@ -898,7 +898,7 @@ def list_attestors( def delete_attestor( self, - request: service.DeleteAttestorRequest = None, + request: Union[service.DeleteAttestorRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -912,7 +912,7 @@ def delete_attestor( does not exist. Args: - request (google.cloud.binaryauthorization_v1beta1.types.DeleteAttestorRequest): + request (Union[google.cloud.binaryauthorization_v1beta1.types.DeleteAttestorRequest, dict]): The request object. Request message for [BinauthzManagementService.DeleteAttestor][]. name (str): diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/base.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/base.py index bfca7f31b7b4..6e334f8e916f 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/base.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/base.py @@ -119,7 +119,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc.py index 537745f9df4b..6bb899767fcd 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc.py @@ -90,16 +90,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/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc_asyncio.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc_asyncio.py index 2cf689c1dabe..411ed693aa13 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc_asyncio.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/services/binauthz_management_service_v1_beta1/transports/grpc_asyncio.py @@ -137,16 +137,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/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1_keywords.py b/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1_keywords.py index c11889d24d45..7b2f46d9cc53 100644 --- a/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1_keywords.py +++ b/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1_keywords.py @@ -39,15 +39,15 @@ def partition( class binaryauthorizationCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_attestor': ('parent', 'attestor_id', 'attestor', ), - 'delete_attestor': ('name', ), - 'get_attestor': ('name', ), - 'get_policy': ('name', ), - 'get_system_policy': ('name', ), - 'list_attestors': ('parent', 'page_size', 'page_token', ), - 'update_attestor': ('attestor', ), - 'update_policy': ('policy', ), - 'validate_attestation_occurrence': ('attestor', 'attestation', 'occurrence_note', 'occurrence_resource_uri', ), + 'create_attestor': ('parent', 'attestor_id', 'attestor', ), + 'delete_attestor': ('name', ), + 'get_attestor': ('name', ), + 'get_policy': ('name', ), + 'get_system_policy': ('name', ), + 'list_attestors': ('parent', 'page_size', 'page_token', ), + 'update_attestor': ('attestor', ), + 'update_policy': ('policy', ), + 'validate_attestation_occurrence': ('attestor', 'attestation', 'occurrence_note', 'occurrence_resource_uri', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -66,7 +66,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 ) diff --git a/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1beta1_keywords.py b/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1beta1_keywords.py index 95b795be95b6..d8d091d82204 100644 --- a/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1beta1_keywords.py +++ b/packages/google-cloud-binary-authorization/scripts/fixup_binaryauthorization_v1beta1_keywords.py @@ -39,13 +39,13 @@ def partition( class binaryauthorizationCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_attestor': ('parent', 'attestor_id', 'attestor', ), - 'delete_attestor': ('name', ), - 'get_attestor': ('name', ), - 'get_policy': ('name', ), - 'list_attestors': ('parent', 'page_size', 'page_token', ), - 'update_attestor': ('attestor', ), - 'update_policy': ('policy', ), + 'create_attestor': ('parent', 'attestor_id', 'attestor', ), + 'delete_attestor': ('name', ), + 'get_attestor': ('name', ), + 'get_policy': ('name', ), + 'list_attestors': ('parent', 'page_size', 'page_token', ), + 'update_attestor': ('attestor', ), + 'update_policy': ('policy', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -64,7 +64,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 )