From db5d966111077c2ba286136b9b5aba6a371c8e0d 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:12:39 +0000 Subject: [PATCH] chore: use gapic-generator-python 0.51.2 (#34) - [ ] 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/flex_templates_service/client.py | 6 +-- .../flex_templates_service/transports/base.py | 2 +- .../flex_templates_service/transports/grpc.py | 6 +-- .../transports/grpc_asyncio.py | 6 +-- .../services/jobs_v1_beta3/client.py | 30 +++++++-------- .../services/jobs_v1_beta3/transports/base.py | 2 +- .../services/jobs_v1_beta3/transports/grpc.py | 6 +-- .../jobs_v1_beta3/transports/grpc_asyncio.py | 6 +-- .../services/messages_v1_beta3/client.py | 6 +-- .../messages_v1_beta3/transports/base.py | 2 +- .../messages_v1_beta3/transports/grpc.py | 6 +-- .../transports/grpc_asyncio.py | 6 +-- .../services/metrics_v1_beta3/client.py | 14 +++---- .../metrics_v1_beta3/transports/base.py | 2 +- .../metrics_v1_beta3/transports/grpc.py | 6 +-- .../transports/grpc_asyncio.py | 6 +-- .../services/snapshots_v1_beta3/client.py | 14 +++---- .../snapshots_v1_beta3/transports/base.py | 2 +- .../snapshots_v1_beta3/transports/grpc.py | 6 +-- .../transports/grpc_asyncio.py | 6 +-- .../services/templates_service/client.py | 14 +++---- .../templates_service/transports/base.py | 2 +- .../templates_service/transports/grpc.py | 6 +-- .../transports/grpc_asyncio.py | 6 +-- scripts/fixup_dataflow_v1beta3_keywords.py | 38 +++++++++---------- 25 files changed, 103 insertions(+), 103 deletions(-) diff --git a/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py b/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py index aa1a71c..c716fea 100644 --- a/google/cloud/dataflow_v1beta3/services/flex_templates_service/client.py +++ b/google/cloud/dataflow_v1beta3/services/flex_templates_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 @@ -340,7 +340,7 @@ def __init__( def launch_flex_template( self, - request: templates.LaunchFlexTemplateRequest = None, + request: Union[templates.LaunchFlexTemplateRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -349,7 +349,7 @@ def launch_flex_template( r"""Launch a job with a FlexTemplate. Args: - request (google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest): + request (Union[google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest, dict]): The request object. A request to launch a Cloud Dataflow job from a FlexTemplate. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/base.py b/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/base.py index 2669008..3877a1f 100644 --- a/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/base.py +++ b/google/cloud/dataflow_v1beta3/services/flex_templates_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/dataflow_v1beta3/services/flex_templates_service/transports/grpc.py b/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc.py index 79db350..a8a7302 100644 --- a/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc.py +++ b/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc.py @@ -81,16 +81,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc_asyncio.py b/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc_asyncio.py index 56242f7..5054b54 100644 --- a/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc_asyncio.py +++ b/google/cloud/dataflow_v1beta3/services/flex_templates_service/transports/grpc_asyncio.py @@ -128,16 +128,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py index 72fa4f1..ece7b4d 100644 --- a/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/client.py +++ b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/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 @@ -341,7 +341,7 @@ def __init__( def create_job( self, - request: jobs.CreateJobRequest = None, + request: Union[jobs.CreateJobRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -356,7 +356,7 @@ def create_job( will always start in ``us-central1``. Args: - request (google.cloud.dataflow_v1beta3.types.CreateJobRequest): + request (Union[google.cloud.dataflow_v1beta3.types.CreateJobRequest, dict]): The request object. Request to create a Cloud Dataflow job. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -391,7 +391,7 @@ def create_job( def get_job( self, - request: jobs.GetJobRequest = None, + request: Union[jobs.GetJobRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -406,7 +406,7 @@ def get_job( get the state of jobs that are running in ``us-central1``. Args: - request (google.cloud.dataflow_v1beta3.types.GetJobRequest): + request (Union[google.cloud.dataflow_v1beta3.types.GetJobRequest, dict]): The request object. Request to get the state of a Cloud Dataflow job. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -441,7 +441,7 @@ def get_job( def update_job( self, - request: jobs.UpdateJobRequest = None, + request: Union[jobs.UpdateJobRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -457,7 +457,7 @@ def update_job( ``us-central1``. Args: - request (google.cloud.dataflow_v1beta3.types.UpdateJobRequest): + request (Union[google.cloud.dataflow_v1beta3.types.UpdateJobRequest, dict]): The request object. Request to update a Cloud Dataflow job. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -492,7 +492,7 @@ def update_job( def list_jobs( self, - request: jobs.ListJobsRequest = None, + request: Union[jobs.ListJobsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -509,7 +509,7 @@ def list_jobs( running in ``us-central1``. Args: - request (google.cloud.dataflow_v1beta3.types.ListJobsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.ListJobsRequest, dict]): The request object. Request to list Cloud Dataflow jobs. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -559,7 +559,7 @@ def list_jobs( def aggregated_list_jobs( self, - request: jobs.ListJobsRequest = None, + request: Union[jobs.ListJobsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -568,7 +568,7 @@ def aggregated_list_jobs( r"""List the jobs of a project across all regions. Args: - request (google.cloud.dataflow_v1beta3.types.ListJobsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.ListJobsRequest, dict]): The request object. Request to list Cloud Dataflow jobs. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -618,7 +618,7 @@ def aggregated_list_jobs( def check_active_jobs( self, - request: jobs.CheckActiveJobsRequest = None, + request: Union[jobs.CheckActiveJobsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -628,7 +628,7 @@ def check_active_jobs( project across all regions. Args: - request (google.cloud.dataflow_v1beta3.types.CheckActiveJobsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.CheckActiveJobsRequest, dict]): The request object. Request to check is active jobs exists for a project retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -661,7 +661,7 @@ def check_active_jobs( def snapshot_job( self, - request: jobs.SnapshotJobRequest = None, + request: Union[jobs.SnapshotJobRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -670,7 +670,7 @@ def snapshot_job( r"""Snapshot the state of a streaming job. Args: - request (google.cloud.dataflow_v1beta3.types.SnapshotJobRequest): + request (Union[google.cloud.dataflow_v1beta3.types.SnapshotJobRequest, dict]): The request object. Request to create a snapshot of a job. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/base.py b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/base.py index b0de408..472ea83 100644 --- a/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/base.py +++ b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/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/dataflow_v1beta3/services/jobs_v1_beta3/transports/grpc.py b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/grpc.py index 4d55c9a..2c37c26 100644 --- a/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/grpc.py +++ b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/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/dataflow_v1beta3/services/jobs_v1_beta3/transports/grpc_asyncio.py b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/grpc_asyncio.py index 05f83c5..524eb04 100644 --- a/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/transports/grpc_asyncio.py +++ b/google/cloud/dataflow_v1beta3/services/jobs_v1_beta3/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/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py index c10ce71..4c4bec4 100644 --- a/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/client.py +++ b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/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 list_job_messages( self, - request: messages.ListJobMessagesRequest = None, + request: Union[messages.ListJobMessagesRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -355,7 +355,7 @@ def list_job_messages( ``us-central1``. Args: - request (google.cloud.dataflow_v1beta3.types.ListJobMessagesRequest): + request (Union[google.cloud.dataflow_v1beta3.types.ListJobMessagesRequest, dict]): The request object. Request to list job messages. Up to max_results messages will be returned in the time range specified starting with the oldest messages first. diff --git a/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/base.py b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/base.py index c237b19..5812189 100644 --- a/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/base.py +++ b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/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/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc.py b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc.py index 4dc8050..aa4b6d5 100644 --- a/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc.py +++ b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc.py @@ -81,16 +81,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc_asyncio.py b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc_asyncio.py index 13672e7..5b6b71e 100644 --- a/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc_asyncio.py +++ b/google/cloud/dataflow_v1beta3/services/messages_v1_beta3/transports/grpc_asyncio.py @@ -128,16 +128,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py index 5792548..b0951ee 100644 --- a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/client.py +++ b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/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 @@ -339,7 +339,7 @@ def __init__( def get_job_metrics( self, - request: metrics.GetJobMetricsRequest = None, + request: Union[metrics.GetJobMetricsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -356,7 +356,7 @@ def get_job_metrics( ``us-central1``. Args: - request (google.cloud.dataflow_v1beta3.types.GetJobMetricsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.GetJobMetricsRequest, dict]): The request object. Request to get job metrics. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -399,7 +399,7 @@ def get_job_metrics( def get_job_execution_details( self, - request: metrics.GetJobExecutionDetailsRequest = None, + request: Union[metrics.GetJobExecutionDetailsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -411,7 +411,7 @@ def get_job_execution_details( without notice. Args: - request (google.cloud.dataflow_v1beta3.types.GetJobExecutionDetailsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.GetJobExecutionDetailsRequest, dict]): The request object. Request to get job execution details. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -457,7 +457,7 @@ def get_job_execution_details( def get_stage_execution_details( self, - request: metrics.GetStageExecutionDetailsRequest = None, + request: Union[metrics.GetStageExecutionDetailsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -470,7 +470,7 @@ def get_stage_execution_details( without notice. Args: - request (google.cloud.dataflow_v1beta3.types.GetStageExecutionDetailsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.GetStageExecutionDetailsRequest, dict]): The request object. Request to get information about a particular execution stage of a job. Currently only tracked for Batch jobs. diff --git a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/base.py b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/base.py index 8600620..f522c1c 100644 --- a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/base.py +++ b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/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/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc.py b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc.py index acc7e87..5043d93 100644 --- a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc.py +++ b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc.py @@ -81,16 +81,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc_asyncio.py b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc_asyncio.py index a490267..9a032fa 100644 --- a/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc_asyncio.py +++ b/google/cloud/dataflow_v1beta3/services/metrics_v1_beta3/transports/grpc_asyncio.py @@ -128,16 +128,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py index f7c1206..2c6e592 100644 --- a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/client.py +++ b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/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 @@ -339,7 +339,7 @@ def __init__( def get_snapshot( self, - request: snapshots.GetSnapshotRequest = None, + request: Union[snapshots.GetSnapshotRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -348,7 +348,7 @@ def get_snapshot( r"""Gets information about a snapshot. Args: - request (google.cloud.dataflow_v1beta3.types.GetSnapshotRequest): + request (Union[google.cloud.dataflow_v1beta3.types.GetSnapshotRequest, dict]): The request object. Request to get information about a snapshot retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -381,7 +381,7 @@ def get_snapshot( def delete_snapshot( self, - request: snapshots.DeleteSnapshotRequest = None, + request: Union[snapshots.DeleteSnapshotRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -390,7 +390,7 @@ def delete_snapshot( r"""Deletes a snapshot. Args: - request (google.cloud.dataflow_v1beta3.types.DeleteSnapshotRequest): + request (Union[google.cloud.dataflow_v1beta3.types.DeleteSnapshotRequest, dict]): The request object. Request to delete a snapshot. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -422,7 +422,7 @@ def delete_snapshot( def list_snapshots( self, - request: snapshots.ListSnapshotsRequest = None, + request: Union[snapshots.ListSnapshotsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -431,7 +431,7 @@ def list_snapshots( r"""Lists snapshots. Args: - request (google.cloud.dataflow_v1beta3.types.ListSnapshotsRequest): + request (Union[google.cloud.dataflow_v1beta3.types.ListSnapshotsRequest, dict]): The request object. Request to list snapshots. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/base.py b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/base.py index e99acf5..2d869c1 100644 --- a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/base.py +++ b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/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/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc.py b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc.py index 7e23ada..e235b96 100644 --- a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc.py +++ b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc.py @@ -81,16 +81,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc_asyncio.py b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc_asyncio.py index 9ff20bd..e5304ee 100644 --- a/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc_asyncio.py +++ b/google/cloud/dataflow_v1beta3/services/snapshots_v1_beta3/transports/grpc_asyncio.py @@ -128,16 +128,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/dataflow_v1beta3/services/templates_service/client.py b/google/cloud/dataflow_v1beta3/services/templates_service/client.py index 1c47dca..d258165 100644 --- a/google/cloud/dataflow_v1beta3/services/templates_service/client.py +++ b/google/cloud/dataflow_v1beta3/services/templates_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 @@ -341,7 +341,7 @@ def __init__( def create_job_from_template( self, - request: templates.CreateJobFromTemplateRequest = None, + request: Union[templates.CreateJobFromTemplateRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -350,7 +350,7 @@ def create_job_from_template( r"""Creates a Cloud Dataflow job from a template. Args: - request (google.cloud.dataflow_v1beta3.types.CreateJobFromTemplateRequest): + request (Union[google.cloud.dataflow_v1beta3.types.CreateJobFromTemplateRequest, dict]): The request object. A request to create a Cloud Dataflow job from a template. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -385,7 +385,7 @@ def create_job_from_template( def launch_template( self, - request: templates.LaunchTemplateRequest = None, + request: Union[templates.LaunchTemplateRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -394,7 +394,7 @@ def launch_template( r"""Launch a template. Args: - request (google.cloud.dataflow_v1beta3.types.LaunchTemplateRequest): + request (Union[google.cloud.dataflow_v1beta3.types.LaunchTemplateRequest, dict]): The request object. A request to launch a template. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -428,7 +428,7 @@ def launch_template( def get_template( self, - request: templates.GetTemplateRequest = None, + request: Union[templates.GetTemplateRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -437,7 +437,7 @@ def get_template( r"""Get the template associated with a template. Args: - request (google.cloud.dataflow_v1beta3.types.GetTemplateRequest): + request (Union[google.cloud.dataflow_v1beta3.types.GetTemplateRequest, dict]): The request object. A request to retrieve a Cloud Dataflow job template. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/dataflow_v1beta3/services/templates_service/transports/base.py b/google/cloud/dataflow_v1beta3/services/templates_service/transports/base.py index 308114d..eb3a928 100644 --- a/google/cloud/dataflow_v1beta3/services/templates_service/transports/base.py +++ b/google/cloud/dataflow_v1beta3/services/templates_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/dataflow_v1beta3/services/templates_service/transports/grpc.py b/google/cloud/dataflow_v1beta3/services/templates_service/transports/grpc.py index c134c9a..8b0308d 100644 --- a/google/cloud/dataflow_v1beta3/services/templates_service/transports/grpc.py +++ b/google/cloud/dataflow_v1beta3/services/templates_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/dataflow_v1beta3/services/templates_service/transports/grpc_asyncio.py b/google/cloud/dataflow_v1beta3/services/templates_service/transports/grpc_asyncio.py index e63de9c..405a521 100644 --- a/google/cloud/dataflow_v1beta3/services/templates_service/transports/grpc_asyncio.py +++ b/google/cloud/dataflow_v1beta3/services/templates_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/scripts/fixup_dataflow_v1beta3_keywords.py b/scripts/fixup_dataflow_v1beta3_keywords.py index 29209ec..e833916 100644 --- a/scripts/fixup_dataflow_v1beta3_keywords.py +++ b/scripts/fixup_dataflow_v1beta3_keywords.py @@ -39,24 +39,24 @@ def partition( class dataflowCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'aggregated_list_jobs': ('filter', 'project_id', 'view', 'page_size', 'page_token', 'location', ), - 'check_active_jobs': ('project_id', ), - 'create_job': ('project_id', 'job', 'view', 'replace_job_id', 'location', ), - 'create_job_from_template': ('project_id', 'job_name', 'gcs_path', 'parameters', 'environment', 'location', ), - 'delete_snapshot': ('project_id', 'snapshot_id', 'location', ), - 'get_job': ('project_id', 'job_id', 'view', 'location', ), - 'get_job_execution_details': ('project_id', 'job_id', 'location', 'page_size', 'page_token', ), - 'get_job_metrics': ('project_id', 'job_id', 'start_time', 'location', ), - 'get_snapshot': ('project_id', 'snapshot_id', 'location', ), - 'get_stage_execution_details': ('project_id', 'job_id', 'location', 'stage_id', 'page_size', 'page_token', 'start_time', 'end_time', ), - 'get_template': ('project_id', 'gcs_path', 'view', 'location', ), - 'launch_flex_template': ('project_id', 'launch_parameter', 'location', 'validate_only', ), - 'launch_template': ('project_id', 'validate_only', 'gcs_path', 'dynamic_template', 'launch_parameters', 'location', ), - 'list_job_messages': ('project_id', 'job_id', 'minimum_importance', 'page_size', 'page_token', 'start_time', 'end_time', 'location', ), - 'list_jobs': ('filter', 'project_id', 'view', 'page_size', 'page_token', 'location', ), - 'list_snapshots': ('project_id', 'job_id', 'location', ), - 'snapshot_job': ('project_id', 'job_id', 'ttl', 'location', 'snapshot_sources', 'description', ), - 'update_job': ('project_id', 'job_id', 'job', 'location', ), + 'aggregated_list_jobs': ('filter', 'project_id', 'view', 'page_size', 'page_token', 'location', ), + 'check_active_jobs': ('project_id', ), + 'create_job': ('project_id', 'job', 'view', 'replace_job_id', 'location', ), + 'create_job_from_template': ('project_id', 'job_name', 'gcs_path', 'parameters', 'environment', 'location', ), + 'delete_snapshot': ('project_id', 'snapshot_id', 'location', ), + 'get_job': ('project_id', 'job_id', 'view', 'location', ), + 'get_job_execution_details': ('project_id', 'job_id', 'location', 'page_size', 'page_token', ), + 'get_job_metrics': ('project_id', 'job_id', 'start_time', 'location', ), + 'get_snapshot': ('project_id', 'snapshot_id', 'location', ), + 'get_stage_execution_details': ('project_id', 'job_id', 'location', 'stage_id', 'page_size', 'page_token', 'start_time', 'end_time', ), + 'get_template': ('project_id', 'gcs_path', 'view', 'location', ), + 'launch_flex_template': ('project_id', 'launch_parameter', 'location', 'validate_only', ), + 'launch_template': ('project_id', 'validate_only', 'gcs_path', 'dynamic_template', 'launch_parameters', 'location', ), + 'list_job_messages': ('project_id', 'job_id', 'minimum_importance', 'page_size', 'page_token', 'start_time', 'end_time', 'location', ), + 'list_jobs': ('filter', 'project_id', 'view', 'page_size', 'page_token', 'location', ), + 'list_snapshots': ('project_id', 'job_id', 'location', ), + 'snapshot_job': ('project_id', 'job_id', 'ttl', 'location', 'snapshot_sources', 'description', ), + 'update_job': ('project_id', 'job_id', 'job', 'location', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -75,7 +75,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 )