diff --git a/google/cloud/billing/budgets_v1/services/budget_service/client.py b/google/cloud/billing/budgets_v1/services/budget_service/client.py index a356bd2..f406f4c 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/client.py +++ b/google/cloud/billing/budgets_v1/services/budget_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 @@ -354,7 +354,7 @@ def __init__( def create_budget( self, - request: budget_service.CreateBudgetRequest = None, + request: Union[budget_service.CreateBudgetRequest, dict] = None, *, parent: str = None, budget: budget_model.Budget = None, @@ -368,7 +368,7 @@ def create_budget( create. Args: - request (google.cloud.billing.budgets_v1.types.CreateBudgetRequest): + request (Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]): The request object. Request for CreateBudget parent (str): Required. The name of the billing account to create the @@ -443,7 +443,7 @@ def create_budget( def update_budget( self, - request: budget_service.UpdateBudgetRequest = None, + request: Union[budget_service.UpdateBudgetRequest, dict] = None, *, budget: budget_model.Budget = None, update_mask: field_mask_pb2.FieldMask = None, @@ -458,7 +458,7 @@ def update_budget( changed by this method. Args: - request (google.cloud.billing.budgets_v1.types.UpdateBudgetRequest): + request (Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]): The request object. Request for UpdateBudget budget (google.cloud.billing.budgets_v1.types.Budget): Required. The updated budget object. @@ -541,7 +541,7 @@ def update_budget( def get_budget( self, - request: budget_service.GetBudgetRequest = None, + request: Union[budget_service.GetBudgetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -556,7 +556,7 @@ def get_budget( Cloud Console. Args: - request (google.cloud.billing.budgets_v1.types.GetBudgetRequest): + request (Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]): The request object. Request for GetBudget name (str): Required. Name of budget to get. Values are of the form @@ -623,7 +623,7 @@ def get_budget( def list_budgets( self, - request: budget_service.ListBudgetsRequest = None, + request: Union[budget_service.ListBudgetsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -638,7 +638,7 @@ def list_budgets( Cloud Console. Args: - request (google.cloud.billing.budgets_v1.types.ListBudgetsRequest): + request (Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]): The request object. Request for ListBudgets parent (str): Required. Name of billing account to list budgets under. @@ -707,7 +707,7 @@ def list_budgets( def delete_budget( self, - request: budget_service.DeleteBudgetRequest = None, + request: Union[budget_service.DeleteBudgetRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -718,7 +718,7 @@ def delete_budget( deleted. Args: - request (google.cloud.billing.budgets_v1.types.DeleteBudgetRequest): + request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]): The request object. Request for DeleteBudget name (str): Required. Name of the budget to delete. Values are of diff --git a/google/cloud/billing/budgets_v1/services/budget_service/transports/base.py b/google/cloud/billing/budgets_v1/services/budget_service/transports/base.py index 8530308..92ddb96 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/transports/base.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/transports/base.py @@ -122,7 +122,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/billing/budgets_v1/services/budget_service/transports/grpc.py b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py index d5d6975..a6c7680 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py @@ -84,16 +84,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/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py index f0e77c6..ad826d5 100644 --- a/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py +++ b/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py @@ -131,16 +131,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/billing/budgets_v1beta1/services/budget_service/client.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py index 2de334d..1c750be 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_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 @@ -353,7 +353,7 @@ def __init__( def create_budget( self, - request: budget_service.CreateBudgetRequest = None, + request: Union[budget_service.CreateBudgetRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -365,7 +365,7 @@ def create_budget( number of budgets you can create. Args: - request (google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest): + request (Union[google.cloud.billing.budgets_v1beta1.types.CreateBudgetRequest, dict]): The request object. Request for CreateBudget retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -412,7 +412,7 @@ def create_budget( def update_budget( self, - request: budget_service.UpdateBudgetRequest = None, + request: Union[budget_service.UpdateBudgetRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -425,7 +425,7 @@ def update_budget( changed by this method. Args: - request (google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest): + request (Union[google.cloud.billing.budgets_v1beta1.types.UpdateBudgetRequest, dict]): The request object. Request for UpdateBudget retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -474,7 +474,7 @@ def update_budget( def get_budget( self, - request: budget_service.GetBudgetRequest = None, + request: Union[budget_service.GetBudgetRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -488,7 +488,7 @@ def get_budget( Cloud Console. Args: - request (google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest): + request (Union[google.cloud.billing.budgets_v1beta1.types.GetBudgetRequest, dict]): The request object. Request for GetBudget retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -535,7 +535,7 @@ def get_budget( def list_budgets( self, - request: budget_service.ListBudgetsRequest = None, + request: Union[budget_service.ListBudgetsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -549,7 +549,7 @@ def list_budgets( Cloud Console. Args: - request (google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest): + request (Union[google.cloud.billing.budgets_v1beta1.types.ListBudgetsRequest, dict]): The request object. Request for ListBudgets retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -597,7 +597,7 @@ def list_budgets( def delete_budget( self, - request: budget_service.DeleteBudgetRequest = None, + request: Union[budget_service.DeleteBudgetRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -607,7 +607,7 @@ def delete_budget( deleted. Args: - request (google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest): + request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]): The request object. Request for DeleteBudget retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py index a533ec9..73490f1 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py @@ -122,7 +122,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/billing/budgets_v1beta1/services/budget_service/transports/grpc.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py index b08226d..0552480 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py @@ -84,16 +84,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/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py index c03e1d0..d273d3d 100644 --- a/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py +++ b/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py @@ -131,16 +131,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_budgets_v1_keywords.py b/scripts/fixup_budgets_v1_keywords.py index 80e9450..42b5e76 100644 --- a/scripts/fixup_budgets_v1_keywords.py +++ b/scripts/fixup_budgets_v1_keywords.py @@ -39,11 +39,11 @@ def partition( class budgetsCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_budget': ('parent', 'budget', ), - 'delete_budget': ('name', ), - 'get_budget': ('name', ), - 'list_budgets': ('parent', 'page_size', 'page_token', ), - 'update_budget': ('budget', 'update_mask', ), + 'create_budget': ('parent', 'budget', ), + 'delete_budget': ('name', ), + 'get_budget': ('name', ), + 'list_budgets': ('parent', 'page_size', 'page_token', ), + 'update_budget': ('budget', 'update_mask', ), } 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 ) diff --git a/scripts/fixup_budgets_v1beta1_keywords.py b/scripts/fixup_budgets_v1beta1_keywords.py index 80e9450..42b5e76 100644 --- a/scripts/fixup_budgets_v1beta1_keywords.py +++ b/scripts/fixup_budgets_v1beta1_keywords.py @@ -39,11 +39,11 @@ def partition( class budgetsCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_budget': ('parent', 'budget', ), - 'delete_budget': ('name', ), - 'get_budget': ('name', ), - 'list_budgets': ('parent', 'page_size', 'page_token', ), - 'update_budget': ('budget', 'update_mask', ), + 'create_budget': ('parent', 'budget', ), + 'delete_budget': ('name', ), + 'get_budget': ('name', ), + 'list_budgets': ('parent', 'page_size', 'page_token', ), + 'update_budget': ('budget', 'update_mask', ), } 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 )