From ffae24c816a3e1645464098cf86fdaf54a3064a9 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:08:17 +0000 Subject: [PATCH] chore: use gapic-generator-python 0.51.2 (#221) - [ ] 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 --- .../services/alert_policy_service/client.py | 22 ++--- .../alert_policy_service/transports/base.py | 2 +- .../alert_policy_service/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/group_service/client.py | 26 ++--- .../services/group_service/transports/base.py | 2 +- .../services/group_service/transports/grpc.py | 6 +- .../group_service/transports/grpc_asyncio.py | 6 +- .../services/metric_service/client.py | 38 ++++---- .../metric_service/transports/base.py | 2 +- .../metric_service/transports/grpc.py | 6 +- .../metric_service/transports/grpc_asyncio.py | 6 +- .../notification_channel_service/client.py | 60 +++++++----- .../transports/base.py | 2 +- .../transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/query_service/client.py | 6 +- .../services/query_service/transports/base.py | 2 +- .../services/query_service/transports/grpc.py | 6 +- .../query_service/transports/grpc_asyncio.py | 6 +- .../service_monitoring_service/client.py | 42 ++++----- .../transports/base.py | 2 +- .../transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../services/uptime_check_service/client.py | 26 ++--- .../uptime_check_service/transports/base.py | 2 +- .../uptime_check_service/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- scripts/fixup_monitoring_v3_keywords.py | 94 +++++++++---------- 29 files changed, 217 insertions(+), 195 deletions(-) diff --git a/google/cloud/monitoring_v3/services/alert_policy_service/client.py b/google/cloud/monitoring_v3/services/alert_policy_service/client.py index f708227b..1c5bf9ec 100644 --- a/google/cloud/monitoring_v3/services/alert_policy_service/client.py +++ b/google/cloud/monitoring_v3/services/alert_policy_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 @@ -385,7 +385,7 @@ def __init__( def list_alert_policies( self, - request: alert_service.ListAlertPoliciesRequest = None, + request: Union[alert_service.ListAlertPoliciesRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -396,7 +396,7 @@ def list_alert_policies( workspace. Args: - request (google.cloud.monitoring_v3.types.ListAlertPoliciesRequest): + request (Union[google.cloud.monitoring_v3.types.ListAlertPoliciesRequest, dict]): The request object. The protocol for the `ListAlertPolicies` request. name (str): @@ -476,7 +476,7 @@ def list_alert_policies( def get_alert_policy( self, - request: alert_service.GetAlertPolicyRequest = None, + request: Union[alert_service.GetAlertPolicyRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -486,7 +486,7 @@ def get_alert_policy( r"""Gets a single alerting policy. Args: - request (google.cloud.monitoring_v3.types.GetAlertPolicyRequest): + request (Union[google.cloud.monitoring_v3.types.GetAlertPolicyRequest, dict]): The request object. The protocol for the `GetAlertPolicy` request. name (str): @@ -554,7 +554,7 @@ def get_alert_policy( def create_alert_policy( self, - request: alert_service.CreateAlertPolicyRequest = None, + request: Union[alert_service.CreateAlertPolicyRequest, dict] = None, *, name: str = None, alert_policy: alert.AlertPolicy = None, @@ -565,7 +565,7 @@ def create_alert_policy( r"""Creates a new alerting policy. Args: - request (google.cloud.monitoring_v3.types.CreateAlertPolicyRequest): + request (Union[google.cloud.monitoring_v3.types.CreateAlertPolicyRequest, dict]): The request object. The protocol for the `CreateAlertPolicy` request. name (str): @@ -655,7 +655,7 @@ def create_alert_policy( def delete_alert_policy( self, - request: alert_service.DeleteAlertPolicyRequest = None, + request: Union[alert_service.DeleteAlertPolicyRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -665,7 +665,7 @@ def delete_alert_policy( r"""Deletes an alerting policy. Args: - request (google.cloud.monitoring_v3.types.DeleteAlertPolicyRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteAlertPolicyRequest, dict]): The request object. The protocol for the `DeleteAlertPolicy` request. name (str): @@ -725,7 +725,7 @@ def delete_alert_policy( def update_alert_policy( self, - request: alert_service.UpdateAlertPolicyRequest = None, + request: Union[alert_service.UpdateAlertPolicyRequest, dict] = None, *, update_mask: field_mask_pb2.FieldMask = None, alert_policy: alert.AlertPolicy = None, @@ -739,7 +739,7 @@ def update_alert_policy( via ``updateMask``. Returns the updated alerting policy. Args: - request (google.cloud.monitoring_v3.types.UpdateAlertPolicyRequest): + request (Union[google.cloud.monitoring_v3.types.UpdateAlertPolicyRequest, dict]): The request object. The protocol for the `UpdateAlertPolicy` request. update_mask (google.protobuf.field_mask_pb2.FieldMask): diff --git a/google/cloud/monitoring_v3/services/alert_policy_service/transports/base.py b/google/cloud/monitoring_v3/services/alert_policy_service/transports/base.py index be14243f..031dc657 100644 --- a/google/cloud/monitoring_v3/services/alert_policy_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/alert_policy_service/transports/base.py @@ -123,7 +123,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_v3/services/alert_policy_service/transports/grpc.py b/google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc.py index d8f413ef..b26b7982 100644 --- a/google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/alert_policy_service/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/google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc_asyncio.py index f793f84f..1ee6cd5a 100644 --- a/google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/alert_policy_service/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/google/cloud/monitoring_v3/services/group_service/client.py b/google/cloud/monitoring_v3/services/group_service/client.py index f5cd5c31..73c6cd1e 100644 --- a/google/cloud/monitoring_v3/services/group_service/client.py +++ b/google/cloud/monitoring_v3/services/group_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 @@ -360,7 +360,7 @@ def __init__( def list_groups( self, - request: group_service.ListGroupsRequest = None, + request: Union[group_service.ListGroupsRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -370,7 +370,7 @@ def list_groups( r"""Lists the existing groups. Args: - request (google.cloud.monitoring_v3.types.ListGroupsRequest): + request (Union[google.cloud.monitoring_v3.types.ListGroupsRequest, dict]): The request object. The `ListGroup` request. name (str): Required. The @@ -443,7 +443,7 @@ def list_groups( def get_group( self, - request: group_service.GetGroupRequest = None, + request: Union[group_service.GetGroupRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -453,7 +453,7 @@ def get_group( r"""Gets a single group. Args: - request (google.cloud.monitoring_v3.types.GetGroupRequest): + request (Union[google.cloud.monitoring_v3.types.GetGroupRequest, dict]): The request object. The `GetGroup` request. name (str): Required. The group to retrieve. The format is: @@ -547,7 +547,7 @@ def get_group( def create_group( self, - request: group_service.CreateGroupRequest = None, + request: Union[group_service.CreateGroupRequest, dict] = None, *, name: str = None, group: gm_group.Group = None, @@ -558,7 +558,7 @@ def create_group( r"""Creates a new group. Args: - request (google.cloud.monitoring_v3.types.CreateGroupRequest): + request (Union[google.cloud.monitoring_v3.types.CreateGroupRequest, dict]): The request object. The `CreateGroup` request. name (str): Required. The @@ -663,7 +663,7 @@ def create_group( def update_group( self, - request: group_service.UpdateGroupRequest = None, + request: Union[group_service.UpdateGroupRequest, dict] = None, *, group: gm_group.Group = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -674,7 +674,7 @@ def update_group( except ``name``. Args: - request (google.cloud.monitoring_v3.types.UpdateGroupRequest): + request (Union[google.cloud.monitoring_v3.types.UpdateGroupRequest, dict]): The request object. The `UpdateGroup` request. group (google.cloud.monitoring_v3.types.Group): Required. The new definition of the group. All fields of @@ -768,7 +768,7 @@ def update_group( def delete_group( self, - request: group_service.DeleteGroupRequest = None, + request: Union[group_service.DeleteGroupRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -778,7 +778,7 @@ def delete_group( r"""Deletes an existing group. Args: - request (google.cloud.monitoring_v3.types.DeleteGroupRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteGroupRequest, dict]): The request object. The `DeleteGroup` request. The default behavior is to be able to delete a single group without any descendants. @@ -836,7 +836,7 @@ def delete_group( def list_group_members( self, - request: group_service.ListGroupMembersRequest = None, + request: Union[group_service.ListGroupMembersRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -847,7 +847,7 @@ def list_group_members( group. Args: - request (google.cloud.monitoring_v3.types.ListGroupMembersRequest): + request (Union[google.cloud.monitoring_v3.types.ListGroupMembersRequest, dict]): The request object. The `ListGroupMembers` request. name (str): Required. The group whose members are listed. The format diff --git a/google/cloud/monitoring_v3/services/group_service/transports/base.py b/google/cloud/monitoring_v3/services/group_service/transports/base.py index 25626df4..2c538e18 100644 --- a/google/cloud/monitoring_v3/services/group_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/group_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_v3/services/group_service/transports/grpc.py b/google/cloud/monitoring_v3/services/group_service/transports/grpc.py index 58f42630..e0fa2266 100644 --- a/google/cloud/monitoring_v3/services/group_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/group_service/transports/grpc.py @@ -94,16 +94,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_v3/services/group_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/group_service/transports/grpc_asyncio.py index 2b5fc190..9753edbd 100644 --- a/google/cloud/monitoring_v3/services/group_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/group_service/transports/grpc_asyncio.py @@ -141,16 +141,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_v3/services/metric_service/client.py b/google/cloud/monitoring_v3/services/metric_service/client.py index 383d045f..1930c465 100644 --- a/google/cloud/monitoring_v3/services/metric_service/client.py +++ b/google/cloud/monitoring_v3/services/metric_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 @@ -387,7 +387,9 @@ def __init__( def list_monitored_resource_descriptors( self, - request: metric_service.ListMonitoredResourceDescriptorsRequest = None, + request: Union[ + metric_service.ListMonitoredResourceDescriptorsRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -398,7 +400,7 @@ def list_monitored_resource_descriptors( filter. This method does not require a Workspace. Args: - request (google.cloud.monitoring_v3.types.ListMonitoredResourceDescriptorsRequest): + request (Union[google.cloud.monitoring_v3.types.ListMonitoredResourceDescriptorsRequest, dict]): The request object. The `ListMonitoredResourceDescriptors` request. name (str): @@ -476,7 +478,9 @@ def list_monitored_resource_descriptors( def get_monitored_resource_descriptor( self, - request: metric_service.GetMonitoredResourceDescriptorRequest = None, + request: Union[ + metric_service.GetMonitoredResourceDescriptorRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -487,7 +491,7 @@ def get_monitored_resource_descriptor( method does not require a Workspace. Args: - request (google.cloud.monitoring_v3.types.GetMonitoredResourceDescriptorRequest): + request (Union[google.cloud.monitoring_v3.types.GetMonitoredResourceDescriptorRequest, dict]): The request object. The `GetMonitoredResourceDescriptor` request. name (str): @@ -568,7 +572,7 @@ def get_monitored_resource_descriptor( def list_metric_descriptors( self, - request: metric_service.ListMetricDescriptorsRequest = None, + request: Union[metric_service.ListMetricDescriptorsRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -579,7 +583,7 @@ def list_metric_descriptors( method does not require a Workspace. Args: - request (google.cloud.monitoring_v3.types.ListMetricDescriptorsRequest): + request (Union[google.cloud.monitoring_v3.types.ListMetricDescriptorsRequest, dict]): The request object. The `ListMetricDescriptors` request. name (str): Required. The @@ -652,7 +656,7 @@ def list_metric_descriptors( def get_metric_descriptor( self, - request: metric_service.GetMetricDescriptorRequest = None, + request: Union[metric_service.GetMetricDescriptorRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -663,7 +667,7 @@ def get_metric_descriptor( require a Workspace. Args: - request (google.cloud.monitoring_v3.types.GetMetricDescriptorRequest): + request (Union[google.cloud.monitoring_v3.types.GetMetricDescriptorRequest, dict]): The request object. The `GetMetricDescriptor` request. name (str): Required. The metric descriptor on which to execute the @@ -733,7 +737,7 @@ def get_metric_descriptor( def create_metric_descriptor( self, - request: metric_service.CreateMetricDescriptorRequest = None, + request: Union[metric_service.CreateMetricDescriptorRequest, dict] = None, *, name: str = None, metric_descriptor: metric_pb2.MetricDescriptor = None, @@ -746,7 +750,7 @@ def create_metric_descriptor( metrics `__. Args: - request (google.cloud.monitoring_v3.types.CreateMetricDescriptorRequest): + request (Union[google.cloud.monitoring_v3.types.CreateMetricDescriptorRequest, dict]): The request object. The `CreateMetricDescriptor` request. name (str): @@ -822,7 +826,7 @@ def create_metric_descriptor( def delete_metric_descriptor( self, - request: metric_service.DeleteMetricDescriptorRequest = None, + request: Union[metric_service.DeleteMetricDescriptorRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -834,7 +838,7 @@ def delete_metric_descriptor( can be deleted. Args: - request (google.cloud.monitoring_v3.types.DeleteMetricDescriptorRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteMetricDescriptorRequest, dict]): The request object. The `DeleteMetricDescriptor` request. name (str): @@ -895,7 +899,7 @@ def delete_metric_descriptor( def list_time_series( self, - request: metric_service.ListTimeSeriesRequest = None, + request: Union[metric_service.ListTimeSeriesRequest, dict] = None, *, name: str = None, filter: str = None, @@ -909,7 +913,7 @@ def list_time_series( does not require a Workspace. Args: - request (google.cloud.monitoring_v3.types.ListTimeSeriesRequest): + request (Union[google.cloud.monitoring_v3.types.ListTimeSeriesRequest, dict]): The request object. The `ListTimeSeries` request. name (str): Required. The @@ -1024,7 +1028,7 @@ def list_time_series( def create_time_series( self, - request: metric_service.CreateTimeSeriesRequest = None, + request: Union[metric_service.CreateTimeSeriesRequest, dict] = None, *, name: str = None, time_series: Sequence[gm_metric.TimeSeries] = None, @@ -1039,7 +1043,7 @@ def create_time_series( response. Args: - request (google.cloud.monitoring_v3.types.CreateTimeSeriesRequest): + request (Union[google.cloud.monitoring_v3.types.CreateTimeSeriesRequest, dict]): The request object. The `CreateTimeSeries` request. name (str): Required. The diff --git a/google/cloud/monitoring_v3/services/metric_service/transports/base.py b/google/cloud/monitoring_v3/services/metric_service/transports/base.py index a5d847c8..5fdc2080 100644 --- a/google/cloud/monitoring_v3/services/metric_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/metric_service/transports/base.py @@ -125,7 +125,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_v3/services/metric_service/transports/grpc.py b/google/cloud/monitoring_v3/services/metric_service/transports/grpc.py index c6acecec..6603803f 100644 --- a/google/cloud/monitoring_v3/services/metric_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/metric_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/monitoring_v3/services/metric_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/metric_service/transports/grpc_asyncio.py index 9cf5e859..46c5fb2b 100644 --- a/google/cloud/monitoring_v3/services/metric_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/metric_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/monitoring_v3/services/notification_channel_service/client.py b/google/cloud/monitoring_v3/services/notification_channel_service/client.py index 9b095a75..75b031a3 100644 --- a/google/cloud/monitoring_v3/services/notification_channel_service/client.py +++ b/google/cloud/monitoring_v3/services/notification_channel_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 @@ -381,7 +381,9 @@ def __init__( def list_notification_channel_descriptors( self, - request: notification_service.ListNotificationChannelDescriptorsRequest = None, + request: Union[ + notification_service.ListNotificationChannelDescriptorsRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -393,7 +395,7 @@ def list_notification_channel_descriptors( types to be dynamically added. Args: - request (google.cloud.monitoring_v3.types.ListNotificationChannelDescriptorsRequest): + request (Union[google.cloud.monitoring_v3.types.ListNotificationChannelDescriptorsRequest, dict]): The request object. The `ListNotificationChannelDescriptors` request. name (str): @@ -481,7 +483,9 @@ def list_notification_channel_descriptors( def get_notification_channel_descriptor( self, - request: notification_service.GetNotificationChannelDescriptorRequest = None, + request: Union[ + notification_service.GetNotificationChannelDescriptorRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -493,7 +497,7 @@ def get_notification_channel_descriptor( notification channel of the given type. Args: - request (google.cloud.monitoring_v3.types.GetNotificationChannelDescriptorRequest): + request (Union[google.cloud.monitoring_v3.types.GetNotificationChannelDescriptorRequest, dict]): The request object. The `GetNotificationChannelDescriptor` response. name (str): @@ -567,7 +571,9 @@ def get_notification_channel_descriptor( def list_notification_channels( self, - request: notification_service.ListNotificationChannelsRequest = None, + request: Union[ + notification_service.ListNotificationChannelsRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -578,7 +584,7 @@ def list_notification_channels( created for the project. Args: - request (google.cloud.monitoring_v3.types.ListNotificationChannelsRequest): + request (Union[google.cloud.monitoring_v3.types.ListNotificationChannelsRequest, dict]): The request object. The `ListNotificationChannels` request. name (str): @@ -663,7 +669,7 @@ def list_notification_channels( def get_notification_channel( self, - request: notification_service.GetNotificationChannelRequest = None, + request: Union[notification_service.GetNotificationChannelRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -679,7 +685,7 @@ def get_notification_channel( call to the create method. Args: - request (google.cloud.monitoring_v3.types.GetNotificationChannelRequest): + request (Union[google.cloud.monitoring_v3.types.GetNotificationChannelRequest, dict]): The request object. The `GetNotificationChannel` request. name (str): @@ -749,7 +755,9 @@ def get_notification_channel( def create_notification_channel( self, - request: notification_service.CreateNotificationChannelRequest = None, + request: Union[ + notification_service.CreateNotificationChannelRequest, dict + ] = None, *, name: str = None, notification_channel: notification.NotificationChannel = None, @@ -762,7 +770,7 @@ def create_notification_channel( SMS number, or PagerDuty service. Args: - request (google.cloud.monitoring_v3.types.CreateNotificationChannelRequest): + request (Union[google.cloud.monitoring_v3.types.CreateNotificationChannelRequest, dict]): The request object. The `CreateNotificationChannel` request. name (str): @@ -853,7 +861,9 @@ def create_notification_channel( def update_notification_channel( self, - request: notification_service.UpdateNotificationChannelRequest = None, + request: Union[ + notification_service.UpdateNotificationChannelRequest, dict + ] = None, *, update_mask: field_mask_pb2.FieldMask = None, notification_channel: notification.NotificationChannel = None, @@ -865,7 +875,7 @@ def update_notification_channel( in the field mask remain unchanged. Args: - request (google.cloud.monitoring_v3.types.UpdateNotificationChannelRequest): + request (Union[google.cloud.monitoring_v3.types.UpdateNotificationChannelRequest, dict]): The request object. The `UpdateNotificationChannel` request. update_mask (google.protobuf.field_mask_pb2.FieldMask): @@ -947,7 +957,9 @@ def update_notification_channel( def delete_notification_channel( self, - request: notification_service.DeleteNotificationChannelRequest = None, + request: Union[ + notification_service.DeleteNotificationChannelRequest, dict + ] = None, *, name: str = None, force: bool = None, @@ -958,7 +970,7 @@ def delete_notification_channel( r"""Deletes a notification channel. Args: - request (google.cloud.monitoring_v3.types.DeleteNotificationChannelRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteNotificationChannelRequest, dict]): The request object. The `DeleteNotificationChannel` request. name (str): @@ -1035,7 +1047,9 @@ def delete_notification_channel( def send_notification_channel_verification_code( self, - request: notification_service.SendNotificationChannelVerificationCodeRequest = None, + request: Union[ + notification_service.SendNotificationChannelVerificationCodeRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1047,7 +1061,7 @@ def send_notification_channel_verification_code( verify the channel. Args: - request (google.cloud.monitoring_v3.types.SendNotificationChannelVerificationCodeRequest): + request (Union[google.cloud.monitoring_v3.types.SendNotificationChannelVerificationCodeRequest, dict]): The request object. The `SendNotificationChannelVerificationCode` request. name (str): @@ -1107,7 +1121,9 @@ def send_notification_channel_verification_code( def get_notification_channel_verification_code( self, - request: notification_service.GetNotificationChannelVerificationCodeRequest = None, + request: Union[ + notification_service.GetNotificationChannelVerificationCodeRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1144,7 +1160,7 @@ def get_notification_channel_verification_code( string that has a longer expiration time. Args: - request (google.cloud.monitoring_v3.types.GetNotificationChannelVerificationCodeRequest): + request (Union[google.cloud.monitoring_v3.types.GetNotificationChannelVerificationCodeRequest, dict]): The request object. The `GetNotificationChannelVerificationCode` request. name (str): @@ -1213,7 +1229,9 @@ def get_notification_channel_verification_code( def verify_notification_channel( self, - request: notification_service.VerifyNotificationChannelRequest = None, + request: Union[ + notification_service.VerifyNotificationChannelRequest, dict + ] = None, *, name: str = None, code: str = None, @@ -1226,7 +1244,7 @@ def verify_notification_channel( ``SendNotificationChannelVerificationCode``. Args: - request (google.cloud.monitoring_v3.types.VerifyNotificationChannelRequest): + request (Union[google.cloud.monitoring_v3.types.VerifyNotificationChannelRequest, dict]): The request object. The `VerifyNotificationChannel` request. name (str): diff --git a/google/cloud/monitoring_v3/services/notification_channel_service/transports/base.py b/google/cloud/monitoring_v3/services/notification_channel_service/transports/base.py index ae246a53..e7fa86ac 100644 --- a/google/cloud/monitoring_v3/services/notification_channel_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/notification_channel_service/transports/base.py @@ -123,7 +123,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_v3/services/notification_channel_service/transports/grpc.py b/google/cloud/monitoring_v3/services/notification_channel_service/transports/grpc.py index 4e8ac640..d5890077 100644 --- a/google/cloud/monitoring_v3/services/notification_channel_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/notification_channel_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_v3/services/notification_channel_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/notification_channel_service/transports/grpc_asyncio.py index c1127dc4..6ba6e04f 100644 --- a/google/cloud/monitoring_v3/services/notification_channel_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/notification_channel_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/google/cloud/monitoring_v3/services/query_service/client.py b/google/cloud/monitoring_v3/services/query_service/client.py index 7c17a28b..22394a8f 100644 --- a/google/cloud/monitoring_v3/services/query_service/client.py +++ b/google/cloud/monitoring_v3/services/query_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 @@ -338,7 +338,7 @@ def __init__( def query_time_series( self, - request: metric_service.QueryTimeSeriesRequest = None, + request: Union[metric_service.QueryTimeSeriesRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -348,7 +348,7 @@ def query_time_series( This method does not require a Workspace. Args: - request (google.cloud.monitoring_v3.types.QueryTimeSeriesRequest): + request (Union[google.cloud.monitoring_v3.types.QueryTimeSeriesRequest, dict]): The request object. The `QueryTimeSeries` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/monitoring_v3/services/query_service/transports/base.py b/google/cloud/monitoring_v3/services/query_service/transports/base.py index a6d63b4b..25f30682 100644 --- a/google/cloud/monitoring_v3/services/query_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/query_service/transports/base.py @@ -121,7 +121,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_v3/services/query_service/transports/grpc.py b/google/cloud/monitoring_v3/services/query_service/transports/grpc.py index 43fa5bca..133cb1c7 100644 --- a/google/cloud/monitoring_v3/services/query_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/query_service/transports/grpc.py @@ -82,16 +82,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_v3/services/query_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/query_service/transports/grpc_asyncio.py index bbfe8aa8..c93cf77f 100644 --- a/google/cloud/monitoring_v3/services/query_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/query_service/transports/grpc_asyncio.py @@ -129,16 +129,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_v3/services/service_monitoring_service/client.py b/google/cloud/monitoring_v3/services/service_monitoring_service/client.py index 268165a2..8cac0642 100644 --- a/google/cloud/monitoring_v3/services/service_monitoring_service/client.py +++ b/google/cloud/monitoring_v3/services/service_monitoring_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 @@ -379,7 +379,7 @@ def __init__( def create_service( self, - request: service_service.CreateServiceRequest = None, + request: Union[service_service.CreateServiceRequest, dict] = None, *, parent: str = None, service: gm_service.Service = None, @@ -390,7 +390,7 @@ def create_service( r"""Create a ``Service``. Args: - request (google.cloud.monitoring_v3.types.CreateServiceRequest): + request (Union[google.cloud.monitoring_v3.types.CreateServiceRequest, dict]): The request object. The `CreateService` request. parent (str): Required. Resource @@ -466,7 +466,7 @@ def create_service( def get_service( self, - request: service_service.GetServiceRequest = None, + request: Union[service_service.GetServiceRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -476,7 +476,7 @@ def get_service( r"""Get the named ``Service``. Args: - request (google.cloud.monitoring_v3.types.GetServiceRequest): + request (Union[google.cloud.monitoring_v3.types.GetServiceRequest, dict]): The request object. The `GetService` request. name (str): Required. Resource name of the ``Service``. The format @@ -544,7 +544,7 @@ def get_service( def list_services( self, - request: service_service.ListServicesRequest = None, + request: Union[service_service.ListServicesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -554,7 +554,7 @@ def list_services( r"""List ``Service``\ s for this workspace. Args: - request (google.cloud.monitoring_v3.types.ListServicesRequest): + request (Union[google.cloud.monitoring_v3.types.ListServicesRequest, dict]): The request object. The `ListServices` request. parent (str): Required. Resource name of the parent containing the @@ -629,7 +629,7 @@ def list_services( def update_service( self, - request: service_service.UpdateServiceRequest = None, + request: Union[service_service.UpdateServiceRequest, dict] = None, *, service: gm_service.Service = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -639,7 +639,7 @@ def update_service( r"""Update this ``Service``. Args: - request (google.cloud.monitoring_v3.types.UpdateServiceRequest): + request (Union[google.cloud.monitoring_v3.types.UpdateServiceRequest, dict]): The request object. The `UpdateService` request. service (google.cloud.monitoring_v3.types.Service): Required. The ``Service`` to draw updates from. The @@ -705,7 +705,7 @@ def update_service( def delete_service( self, - request: service_service.DeleteServiceRequest = None, + request: Union[service_service.DeleteServiceRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -715,7 +715,7 @@ def delete_service( r"""Soft delete this ``Service``. Args: - request (google.cloud.monitoring_v3.types.DeleteServiceRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteServiceRequest, dict]): The request object. The `DeleteService` request. name (str): Required. Resource name of the ``Service`` to delete. @@ -772,7 +772,7 @@ def delete_service( def create_service_level_objective( self, - request: service_service.CreateServiceLevelObjectiveRequest = None, + request: Union[service_service.CreateServiceLevelObjectiveRequest, dict] = None, *, parent: str = None, service_level_objective: service.ServiceLevelObjective = None, @@ -783,7 +783,7 @@ def create_service_level_objective( r"""Create a ``ServiceLevelObjective`` for the given ``Service``. Args: - request (google.cloud.monitoring_v3.types.CreateServiceLevelObjectiveRequest): + request (Union[google.cloud.monitoring_v3.types.CreateServiceLevelObjectiveRequest, dict]): The request object. The `CreateServiceLevelObjective` request. parent (str): @@ -871,7 +871,7 @@ def create_service_level_objective( def get_service_level_objective( self, - request: service_service.GetServiceLevelObjectiveRequest = None, + request: Union[service_service.GetServiceLevelObjectiveRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -881,7 +881,7 @@ def get_service_level_objective( r"""Get a ``ServiceLevelObjective`` by name. Args: - request (google.cloud.monitoring_v3.types.GetServiceLevelObjectiveRequest): + request (Union[google.cloud.monitoring_v3.types.GetServiceLevelObjectiveRequest, dict]): The request object. The `GetServiceLevelObjective` request. name (str): @@ -959,7 +959,7 @@ def get_service_level_objective( def list_service_level_objectives( self, - request: service_service.ListServiceLevelObjectivesRequest = None, + request: Union[service_service.ListServiceLevelObjectivesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -969,7 +969,7 @@ def list_service_level_objectives( r"""List the ``ServiceLevelObjective``\ s for the given ``Service``. Args: - request (google.cloud.monitoring_v3.types.ListServiceLevelObjectivesRequest): + request (Union[google.cloud.monitoring_v3.types.ListServiceLevelObjectivesRequest, dict]): The request object. The `ListServiceLevelObjectives` request. parent (str): @@ -1046,7 +1046,7 @@ def list_service_level_objectives( def update_service_level_objective( self, - request: service_service.UpdateServiceLevelObjectiveRequest = None, + request: Union[service_service.UpdateServiceLevelObjectiveRequest, dict] = None, *, service_level_objective: service.ServiceLevelObjective = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1056,7 +1056,7 @@ def update_service_level_objective( r"""Update the given ``ServiceLevelObjective``. Args: - request (google.cloud.monitoring_v3.types.UpdateServiceLevelObjectiveRequest): + request (Union[google.cloud.monitoring_v3.types.UpdateServiceLevelObjectiveRequest, dict]): The request object. The `UpdateServiceLevelObjective` request. service_level_objective (google.cloud.monitoring_v3.types.ServiceLevelObjective): @@ -1138,7 +1138,7 @@ def update_service_level_objective( def delete_service_level_objective( self, - request: service_service.DeleteServiceLevelObjectiveRequest = None, + request: Union[service_service.DeleteServiceLevelObjectiveRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1148,7 +1148,7 @@ def delete_service_level_objective( r"""Delete the given ``ServiceLevelObjective``. Args: - request (google.cloud.monitoring_v3.types.DeleteServiceLevelObjectiveRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteServiceLevelObjectiveRequest, dict]): The request object. The `DeleteServiceLevelObjective` request. name (str): diff --git a/google/cloud/monitoring_v3/services/service_monitoring_service/transports/base.py b/google/cloud/monitoring_v3/services/service_monitoring_service/transports/base.py index 83cfc069..bf81c851 100644 --- a/google/cloud/monitoring_v3/services/service_monitoring_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/service_monitoring_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_v3/services/service_monitoring_service/transports/grpc.py b/google/cloud/monitoring_v3/services/service_monitoring_service/transports/grpc.py index 103f2e12..041aeb11 100644 --- a/google/cloud/monitoring_v3/services/service_monitoring_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/service_monitoring_service/transports/grpc.py @@ -86,16 +86,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_v3/services/service_monitoring_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/service_monitoring_service/transports/grpc_asyncio.py index 2789fb32..0ab6c15f 100644 --- a/google/cloud/monitoring_v3/services/service_monitoring_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/service_monitoring_service/transports/grpc_asyncio.py @@ -133,16 +133,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_v3/services/uptime_check_service/client.py b/google/cloud/monitoring_v3/services/uptime_check_service/client.py index 0758d097..b7d1752f 100644 --- a/google/cloud/monitoring_v3/services/uptime_check_service/client.py +++ b/google/cloud/monitoring_v3/services/uptime_check_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 @@ -365,7 +365,7 @@ def __init__( def list_uptime_check_configs( self, - request: uptime_service.ListUptimeCheckConfigsRequest = None, + request: Union[uptime_service.ListUptimeCheckConfigsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -377,7 +377,7 @@ def list_uptime_check_configs( configurations). Args: - request (google.cloud.monitoring_v3.types.ListUptimeCheckConfigsRequest): + request (Union[google.cloud.monitoring_v3.types.ListUptimeCheckConfigsRequest, dict]): The request object. The protocol for the `ListUptimeCheckConfigs` request. parent (str): @@ -454,7 +454,7 @@ def list_uptime_check_configs( def get_uptime_check_config( self, - request: uptime_service.GetUptimeCheckConfigRequest = None, + request: Union[uptime_service.GetUptimeCheckConfigRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -464,7 +464,7 @@ def get_uptime_check_config( r"""Gets a single Uptime check configuration. Args: - request (google.cloud.monitoring_v3.types.GetUptimeCheckConfigRequest): + request (Union[google.cloud.monitoring_v3.types.GetUptimeCheckConfigRequest, dict]): The request object. The protocol for the `GetUptimeCheckConfig` request. name (str): @@ -530,7 +530,7 @@ def get_uptime_check_config( def create_uptime_check_config( self, - request: uptime_service.CreateUptimeCheckConfigRequest = None, + request: Union[uptime_service.CreateUptimeCheckConfigRequest, dict] = None, *, parent: str = None, uptime_check_config: uptime.UptimeCheckConfig = None, @@ -541,7 +541,7 @@ def create_uptime_check_config( r"""Creates a new Uptime check configuration. Args: - request (google.cloud.monitoring_v3.types.CreateUptimeCheckConfigRequest): + request (Union[google.cloud.monitoring_v3.types.CreateUptimeCheckConfigRequest, dict]): The request object. The protocol for the `CreateUptimeCheckConfig` request. parent (str): @@ -619,7 +619,7 @@ def create_uptime_check_config( def update_uptime_check_config( self, - request: uptime_service.UpdateUptimeCheckConfigRequest = None, + request: Union[uptime_service.UpdateUptimeCheckConfigRequest, dict] = None, *, uptime_check_config: uptime.UptimeCheckConfig = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -633,7 +633,7 @@ def update_uptime_check_config( configuration. Args: - request (google.cloud.monitoring_v3.types.UpdateUptimeCheckConfigRequest): + request (Union[google.cloud.monitoring_v3.types.UpdateUptimeCheckConfigRequest, dict]): The request object. The protocol for the `UpdateUptimeCheckConfig` request. uptime_check_config (google.cloud.monitoring_v3.types.UptimeCheckConfig): @@ -710,7 +710,7 @@ def update_uptime_check_config( def delete_uptime_check_config( self, - request: uptime_service.DeleteUptimeCheckConfigRequest = None, + request: Union[uptime_service.DeleteUptimeCheckConfigRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -723,7 +723,7 @@ def delete_uptime_check_config( that would be rendered invalid by the deletion. Args: - request (google.cloud.monitoring_v3.types.DeleteUptimeCheckConfigRequest): + request (Union[google.cloud.monitoring_v3.types.DeleteUptimeCheckConfigRequest, dict]): The request object. The protocol for the `DeleteUptimeCheckConfig` request. name (str): @@ -783,7 +783,7 @@ def delete_uptime_check_config( def list_uptime_check_ips( self, - request: uptime_service.ListUptimeCheckIpsRequest = None, + request: Union[uptime_service.ListUptimeCheckIpsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -793,7 +793,7 @@ def list_uptime_check_ips( from Args: - request (google.cloud.monitoring_v3.types.ListUptimeCheckIpsRequest): + request (Union[google.cloud.monitoring_v3.types.ListUptimeCheckIpsRequest, dict]): The request object. The protocol for the `ListUptimeCheckIps` request. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/monitoring_v3/services/uptime_check_service/transports/base.py b/google/cloud/monitoring_v3/services/uptime_check_service/transports/base.py index 916fa344..86229b74 100644 --- a/google/cloud/monitoring_v3/services/uptime_check_service/transports/base.py +++ b/google/cloud/monitoring_v3/services/uptime_check_service/transports/base.py @@ -123,7 +123,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_v3/services/uptime_check_service/transports/grpc.py b/google/cloud/monitoring_v3/services/uptime_check_service/transports/grpc.py index 8fd71232..ea012574 100644 --- a/google/cloud/monitoring_v3/services/uptime_check_service/transports/grpc.py +++ b/google/cloud/monitoring_v3/services/uptime_check_service/transports/grpc.py @@ -89,16 +89,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_v3/services/uptime_check_service/transports/grpc_asyncio.py b/google/cloud/monitoring_v3/services/uptime_check_service/transports/grpc_asyncio.py index 1210e9ab..fd01b0c8 100644 --- a/google/cloud/monitoring_v3/services/uptime_check_service/transports/grpc_asyncio.py +++ b/google/cloud/monitoring_v3/services/uptime_check_service/transports/grpc_asyncio.py @@ -136,16 +136,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_monitoring_v3_keywords.py b/scripts/fixup_monitoring_v3_keywords.py index e2608d8a..806357f6 100644 --- a/scripts/fixup_monitoring_v3_keywords.py +++ b/scripts/fixup_monitoring_v3_keywords.py @@ -39,52 +39,52 @@ def partition( class monitoringCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_alert_policy': ('name', 'alert_policy', ), - 'create_group': ('name', 'group', 'validate_only', ), - 'create_metric_descriptor': ('name', 'metric_descriptor', ), - 'create_notification_channel': ('name', 'notification_channel', ), - 'create_service': ('parent', 'service', 'service_id', ), - 'create_service_level_objective': ('parent', 'service_level_objective', 'service_level_objective_id', ), - 'create_time_series': ('name', 'time_series', ), - 'create_uptime_check_config': ('parent', 'uptime_check_config', ), - 'delete_alert_policy': ('name', ), - 'delete_group': ('name', 'recursive', ), - 'delete_metric_descriptor': ('name', ), - 'delete_notification_channel': ('name', 'force', ), - 'delete_service': ('name', ), - 'delete_service_level_objective': ('name', ), - 'delete_uptime_check_config': ('name', ), - 'get_alert_policy': ('name', ), - 'get_group': ('name', ), - 'get_metric_descriptor': ('name', ), - 'get_monitored_resource_descriptor': ('name', ), - 'get_notification_channel': ('name', ), - 'get_notification_channel_descriptor': ('name', ), - 'get_notification_channel_verification_code': ('name', 'expire_time', ), - 'get_service': ('name', ), - 'get_service_level_objective': ('name', 'view', ), - 'get_uptime_check_config': ('name', ), - 'list_alert_policies': ('name', 'filter', 'order_by', 'page_size', 'page_token', ), - 'list_group_members': ('name', 'page_size', 'page_token', 'filter', 'interval', ), - 'list_groups': ('name', 'children_of_group', 'ancestors_of_group', 'descendants_of_group', 'page_size', 'page_token', ), - 'list_metric_descriptors': ('name', 'filter', 'page_size', 'page_token', ), - 'list_monitored_resource_descriptors': ('name', 'filter', 'page_size', 'page_token', ), - 'list_notification_channel_descriptors': ('name', 'page_size', 'page_token', ), - 'list_notification_channels': ('name', 'filter', 'order_by', 'page_size', 'page_token', ), - 'list_service_level_objectives': ('parent', 'filter', 'page_size', 'page_token', 'view', ), - 'list_services': ('parent', 'filter', 'page_size', 'page_token', ), - 'list_time_series': ('name', 'filter', 'interval', 'view', 'aggregation', 'secondary_aggregation', 'order_by', 'page_size', 'page_token', ), - 'list_uptime_check_configs': ('parent', 'page_size', 'page_token', ), - 'list_uptime_check_ips': ('page_size', 'page_token', ), - 'query_time_series': ('name', 'query', 'page_size', 'page_token', ), - 'send_notification_channel_verification_code': ('name', ), - 'update_alert_policy': ('alert_policy', 'update_mask', ), - 'update_group': ('group', 'validate_only', ), - 'update_notification_channel': ('notification_channel', 'update_mask', ), - 'update_service': ('service', 'update_mask', ), - 'update_service_level_objective': ('service_level_objective', 'update_mask', ), - 'update_uptime_check_config': ('uptime_check_config', 'update_mask', ), - 'verify_notification_channel': ('name', 'code', ), + 'create_alert_policy': ('name', 'alert_policy', ), + 'create_group': ('name', 'group', 'validate_only', ), + 'create_metric_descriptor': ('name', 'metric_descriptor', ), + 'create_notification_channel': ('name', 'notification_channel', ), + 'create_service': ('parent', 'service', 'service_id', ), + 'create_service_level_objective': ('parent', 'service_level_objective', 'service_level_objective_id', ), + 'create_time_series': ('name', 'time_series', ), + 'create_uptime_check_config': ('parent', 'uptime_check_config', ), + 'delete_alert_policy': ('name', ), + 'delete_group': ('name', 'recursive', ), + 'delete_metric_descriptor': ('name', ), + 'delete_notification_channel': ('name', 'force', ), + 'delete_service': ('name', ), + 'delete_service_level_objective': ('name', ), + 'delete_uptime_check_config': ('name', ), + 'get_alert_policy': ('name', ), + 'get_group': ('name', ), + 'get_metric_descriptor': ('name', ), + 'get_monitored_resource_descriptor': ('name', ), + 'get_notification_channel': ('name', ), + 'get_notification_channel_descriptor': ('name', ), + 'get_notification_channel_verification_code': ('name', 'expire_time', ), + 'get_service': ('name', ), + 'get_service_level_objective': ('name', 'view', ), + 'get_uptime_check_config': ('name', ), + 'list_alert_policies': ('name', 'filter', 'order_by', 'page_size', 'page_token', ), + 'list_group_members': ('name', 'page_size', 'page_token', 'filter', 'interval', ), + 'list_groups': ('name', 'children_of_group', 'ancestors_of_group', 'descendants_of_group', 'page_size', 'page_token', ), + 'list_metric_descriptors': ('name', 'filter', 'page_size', 'page_token', ), + 'list_monitored_resource_descriptors': ('name', 'filter', 'page_size', 'page_token', ), + 'list_notification_channel_descriptors': ('name', 'page_size', 'page_token', ), + 'list_notification_channels': ('name', 'filter', 'order_by', 'page_size', 'page_token', ), + 'list_service_level_objectives': ('parent', 'filter', 'page_size', 'page_token', 'view', ), + 'list_services': ('parent', 'filter', 'page_size', 'page_token', ), + 'list_time_series': ('name', 'filter', 'interval', 'view', 'aggregation', 'secondary_aggregation', 'order_by', 'page_size', 'page_token', ), + 'list_uptime_check_configs': ('parent', 'page_size', 'page_token', ), + 'list_uptime_check_ips': ('page_size', 'page_token', ), + 'query_time_series': ('name', 'query', 'page_size', 'page_token', ), + 'send_notification_channel_verification_code': ('name', ), + 'update_alert_policy': ('alert_policy', 'update_mask', ), + 'update_group': ('group', 'validate_only', ), + 'update_notification_channel': ('notification_channel', 'update_mask', ), + 'update_service': ('service', 'update_mask', ), + 'update_service_level_objective': ('service_level_objective', 'update_mask', ), + 'update_uptime_check_config': ('uptime_check_config', 'update_mask', ), + 'verify_notification_channel': ('name', 'code', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -103,7 +103,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 )