diff --git a/google/cloud/monitoring_dashboard_v1/services/dashboards_service/client.py b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/client.py index 798bcd9..986dc71 100644 --- a/google/cloud/monitoring_dashboard_v1/services/dashboards_service/client.py +++ b/google/cloud/monitoring_dashboard_v1/services/dashboards_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 @@ -370,7 +370,7 @@ def __init__( def create_dashboard( self, - request: dashboards_service.CreateDashboardRequest = None, + request: Union[dashboards_service.CreateDashboardRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -385,7 +385,7 @@ def create_dashboard( Management `__. Args: - request (google.cloud.monitoring_dashboard_v1.types.CreateDashboardRequest): + request (Union[google.cloud.monitoring_dashboard_v1.types.CreateDashboardRequest, dict]): The request object. The `CreateDashboard` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -427,7 +427,7 @@ def create_dashboard( def list_dashboards( self, - request: dashboards_service.ListDashboardsRequest = None, + request: Union[dashboards_service.ListDashboardsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -441,7 +441,7 @@ def list_dashboards( Management `__. Args: - request (google.cloud.monitoring_dashboard_v1.types.ListDashboardsRequest): + request (Union[google.cloud.monitoring_dashboard_v1.types.ListDashboardsRequest, dict]): The request object. The `ListDashboards` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -489,7 +489,7 @@ def list_dashboards( def get_dashboard( self, - request: dashboards_service.GetDashboardRequest = None, + request: Union[dashboards_service.GetDashboardRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -503,7 +503,7 @@ def get_dashboard( Management `__. Args: - request (google.cloud.monitoring_dashboard_v1.types.GetDashboardRequest): + request (Union[google.cloud.monitoring_dashboard_v1.types.GetDashboardRequest, dict]): The request object. The `GetDashboard` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -545,7 +545,7 @@ def get_dashboard( def delete_dashboard( self, - request: dashboards_service.DeleteDashboardRequest = None, + request: Union[dashboards_service.DeleteDashboardRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -559,7 +559,7 @@ def delete_dashboard( Management `__. Args: - request (google.cloud.monitoring_dashboard_v1.types.DeleteDashboardRequest): + request (Union[google.cloud.monitoring_dashboard_v1.types.DeleteDashboardRequest, dict]): The request object. The `DeleteDashboard` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -592,7 +592,7 @@ def delete_dashboard( def update_dashboard( self, - request: dashboards_service.UpdateDashboardRequest = None, + request: Union[dashboards_service.UpdateDashboardRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -606,7 +606,7 @@ def update_dashboard( Management `__. Args: - request (google.cloud.monitoring_dashboard_v1.types.UpdateDashboardRequest): + request (Union[google.cloud.monitoring_dashboard_v1.types.UpdateDashboardRequest, dict]): The request object. The `UpdateDashboard` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/base.py b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/base.py index 1599ca4..775559b 100644 --- a/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/base.py +++ b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/base.py @@ -124,7 +124,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/monitoring_dashboard_v1/services/dashboards_service/transports/grpc.py b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/grpc.py index 2dd8b7b..64c8c1d 100644 --- a/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/grpc.py +++ b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/grpc.py @@ -83,16 +83,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/monitoring_dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py index 6b5e30e..fe1c3cf 100644 --- a/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_dashboard_v1/services/dashboards_service/transports/grpc_asyncio.py @@ -130,16 +130,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_dashboard_v1_keywords.py b/scripts/fixup_dashboard_v1_keywords.py index a854483..86ceef4 100644 --- a/scripts/fixup_dashboard_v1_keywords.py +++ b/scripts/fixup_dashboard_v1_keywords.py @@ -39,11 +39,11 @@ def partition( class dashboardCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_dashboard': ('parent', 'dashboard', 'validate_only', ), - 'delete_dashboard': ('name', ), - 'get_dashboard': ('name', ), - 'list_dashboards': ('parent', 'page_size', 'page_token', ), - 'update_dashboard': ('dashboard', 'validate_only', ), + 'create_dashboard': ('parent', 'dashboard', 'validate_only', ), + 'delete_dashboard': ('name', ), + 'get_dashboard': ('name', ), + 'list_dashboards': ('parent', 'page_size', 'page_token', ), + 'update_dashboard': ('dashboard', 'validate_only', ), } 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 )