diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 2567653c..ae6c57fa 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:87eee22d276554e4e52863ec9b1cb6a7245815dfae20439712bf644348215a5a + digest: sha256:82b12321da4446a73cb11bcb6812fbec8c105abda3946d46e6394e5fbfb64c0f diff --git a/.repo-metadata.json b/.repo-metadata.json index 50ef1e20..18c4c351 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,15 +1,16 @@ { - "name": "dataproc", - "name_pretty": "Google Cloud Dataproc", - "product_documentation": "https://cloud.google.com/dataproc", - "client_documentation": "https://googleapis.dev/python/dataproc/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559745", - "release_level": "ga", - "language": "python", - "library_type": "GAPIC_AUTO", - "repo": "googleapis/python-dataproc", - "distribution_name": "google-cloud-dataproc", - "api_id": "dataproc.googleapis.com", - "requires_billing": true, - "codeowner_team": "@googleapis/api-dataproc" + "name": "dataproc", + "name_pretty": "Google Cloud Dataproc", + "product_documentation": "https://cloud.google.com/dataproc", + "client_documentation": "https://googleapis.dev/python/dataproc/latest", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559745", + "release_level": "ga", + "language": "python", + "library_type": "GAPIC_AUTO", + "repo": "googleapis/python-dataproc", + "distribution_name": "google-cloud-dataproc", + "api_id": "dataproc.googleapis.com", + "requires_billing": true, + "codeowner_team": "@googleapis/api-dataproc", + "default_version": "v1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a75676aa..502a793e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ [1]: https://pypi.org/project/google-cloud-dataproc/#history +## [3.0.0](https://www.github.com/googleapis/python-dataproc/compare/v2.6.0...v3.0.0) (2021-10-04) + + +### Features + +* delete deprecated Dataproc v1beta2 API client ([3bdeaa7](https://www.github.com/googleapis/python-dataproc/commit/3bdeaa7e707ec2af445bf7c0321959b927c9c245)) + + +### Bug Fixes + +* add 'dict' annotation type to 'request' ([be5c115](https://www.github.com/googleapis/python-dataproc/commit/be5c11554f7accfe60dd5cb8da7c4888f688c282)) +* improper types in pagers generation ([1ae784b](https://www.github.com/googleapis/python-dataproc/commit/1ae784bc1610aeb389eaa2cc7a6dc6f10c96788b)) + + +### Miscellaneous Chores + +* release as 3.0.0 ([#273](https://www.github.com/googleapis/python-dataproc/issues/273)) ([3bdeaa7](https://www.github.com/googleapis/python-dataproc/commit/3bdeaa7e707ec2af445bf7c0321959b927c9c245)) + + +### Documentation + +* update cluster sample ([3bdeaa7](https://www.github.com/googleapis/python-dataproc/commit/3bdeaa7e707ec2af445bf7c0321959b927c9c245)) + ## [2.6.0](https://www.github.com/googleapis/python-dataproc/compare/v2.5.0...v2.6.0) (2021-09-21) diff --git a/google/cloud/dataproc_v1/services/autoscaling_policy_service/client.py b/google/cloud/dataproc_v1/services/autoscaling_policy_service/client.py index b296ced8..4d3e5aad 100644 --- a/google/cloud/dataproc_v1/services/autoscaling_policy_service/client.py +++ b/google/cloud/dataproc_v1/services/autoscaling_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 @@ -358,7 +358,9 @@ def __init__( def create_autoscaling_policy( self, - request: autoscaling_policies.CreateAutoscalingPolicyRequest = None, + request: Union[ + autoscaling_policies.CreateAutoscalingPolicyRequest, dict + ] = None, *, parent: str = None, policy: autoscaling_policies.AutoscalingPolicy = None, @@ -369,7 +371,7 @@ def create_autoscaling_policy( r"""Creates new autoscaling policy. Args: - request (google.cloud.dataproc_v1.types.CreateAutoscalingPolicyRequest): + request (Union[google.cloud.dataproc_v1.types.CreateAutoscalingPolicyRequest, dict]): The request object. A request to create an autoscaling policy. parent (str): @@ -452,7 +454,9 @@ def create_autoscaling_policy( def update_autoscaling_policy( self, - request: autoscaling_policies.UpdateAutoscalingPolicyRequest = None, + request: Union[ + autoscaling_policies.UpdateAutoscalingPolicyRequest, dict + ] = None, *, policy: autoscaling_policies.AutoscalingPolicy = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -465,7 +469,7 @@ def update_autoscaling_policy( replacements. Args: - request (google.cloud.dataproc_v1.types.UpdateAutoscalingPolicyRequest): + request (Union[google.cloud.dataproc_v1.types.UpdateAutoscalingPolicyRequest, dict]): The request object. A request to update an autoscaling policy. policy (google.cloud.dataproc_v1.types.AutoscalingPolicy): @@ -530,7 +534,7 @@ def update_autoscaling_policy( def get_autoscaling_policy( self, - request: autoscaling_policies.GetAutoscalingPolicyRequest = None, + request: Union[autoscaling_policies.GetAutoscalingPolicyRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -540,7 +544,7 @@ def get_autoscaling_policy( r"""Retrieves autoscaling policy. Args: - request (google.cloud.dataproc_v1.types.GetAutoscalingPolicyRequest): + request (Union[google.cloud.dataproc_v1.types.GetAutoscalingPolicyRequest, dict]): The request object. A request to fetch an autoscaling policy. name (str): @@ -611,7 +615,9 @@ def get_autoscaling_policy( def list_autoscaling_policies( self, - request: autoscaling_policies.ListAutoscalingPoliciesRequest = None, + request: Union[ + autoscaling_policies.ListAutoscalingPoliciesRequest, dict + ] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -621,7 +627,7 @@ def list_autoscaling_policies( r"""Lists autoscaling policies in the project. Args: - request (google.cloud.dataproc_v1.types.ListAutoscalingPoliciesRequest): + request (Union[google.cloud.dataproc_v1.types.ListAutoscalingPoliciesRequest, dict]): The request object. A request to list autoscaling policies in a project. parent (str): @@ -703,7 +709,9 @@ def list_autoscaling_policies( def delete_autoscaling_policy( self, - request: autoscaling_policies.DeleteAutoscalingPolicyRequest = None, + request: Union[ + autoscaling_policies.DeleteAutoscalingPolicyRequest, dict + ] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -715,7 +723,7 @@ def delete_autoscaling_policy( more clusters. Args: - request (google.cloud.dataproc_v1.types.DeleteAutoscalingPolicyRequest): + request (Union[google.cloud.dataproc_v1.types.DeleteAutoscalingPolicyRequest, dict]): The request object. A request to delete an autoscaling policy. Autoscaling policies in use by one or more clusters will diff --git a/google/cloud/dataproc_v1/services/autoscaling_policy_service/pagers.py b/google/cloud/dataproc_v1/services/autoscaling_policy_service/pagers.py index 9a6b36e1..b74b09bd 100644 --- a/google/cloud/dataproc_v1/services/autoscaling_policy_service/pagers.py +++ b/google/cloud/dataproc_v1/services/autoscaling_policy_service/pagers.py @@ -15,13 +15,13 @@ # from typing import ( Any, - AsyncIterable, + AsyncIterator, Awaitable, Callable, - Iterable, Sequence, Tuple, Optional, + Iterator, ) from google.cloud.dataproc_v1.types import autoscaling_policies @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any: return getattr(self._response, name) @property - def pages(self) -> Iterable[autoscaling_policies.ListAutoscalingPoliciesResponse]: + def pages(self) -> Iterator[autoscaling_policies.ListAutoscalingPoliciesResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = self._method(self._request, metadata=self._metadata) yield self._response - def __iter__(self) -> Iterable[autoscaling_policies.AutoscalingPolicy]: + def __iter__(self) -> Iterator[autoscaling_policies.AutoscalingPolicy]: for page in self.pages: yield from page.policies @@ -140,14 +140,14 @@ def __getattr__(self, name: str) -> Any: @property async def pages( self, - ) -> AsyncIterable[autoscaling_policies.ListAutoscalingPoliciesResponse]: + ) -> AsyncIterator[autoscaling_policies.ListAutoscalingPoliciesResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = await self._method(self._request, metadata=self._metadata) yield self._response - def __aiter__(self) -> AsyncIterable[autoscaling_policies.AutoscalingPolicy]: + def __aiter__(self) -> AsyncIterator[autoscaling_policies.AutoscalingPolicy]: async def async_generator(): async for page in self.pages: for response in page.policies: diff --git a/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/base.py b/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/base.py index da99b6a8..9c988099 100644 --- a/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/base.py +++ b/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/base.py @@ -116,7 +116,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/dataproc_v1/services/autoscaling_policy_service/transports/grpc.py b/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc.py index e55dcb1d..83931784 100644 --- a/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc.py +++ b/google/cloud/dataproc_v1/services/autoscaling_policy_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/dataproc_v1/services/autoscaling_policy_service/transports/grpc_asyncio.py b/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc_asyncio.py index 654f7eee..ae024621 100644 --- a/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc_asyncio.py +++ b/google/cloud/dataproc_v1/services/autoscaling_policy_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/dataproc_v1/services/cluster_controller/client.py b/google/cloud/dataproc_v1/services/cluster_controller/client.py index a746eeba..870eb9e9 100644 --- a/google/cloud/dataproc_v1/services/cluster_controller/client.py +++ b/google/cloud/dataproc_v1/services/cluster_controller/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -377,7 +377,7 @@ def __init__( def create_cluster( self, - request: clusters.CreateClusterRequest = None, + request: Union[clusters.CreateClusterRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -392,7 +392,7 @@ def create_cluster( `ClusterOperationMetadata `__. Args: - request (google.cloud.dataproc_v1.types.CreateClusterRequest): + request (Union[google.cloud.dataproc_v1.types.CreateClusterRequest, dict]): The request object. A request to create a cluster. project_id (str): Required. The ID of the Google Cloud @@ -473,7 +473,7 @@ def create_cluster( def update_cluster( self, - request: clusters.UpdateClusterRequest = None, + request: Union[clusters.UpdateClusterRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -490,7 +490,7 @@ def update_cluster( `ClusterOperationMetadata `__. Args: - request (google.cloud.dataproc_v1.types.UpdateClusterRequest): + request (Union[google.cloud.dataproc_v1.types.UpdateClusterRequest, dict]): The request object. A request to update a cluster. project_id (str): Required. The ID of the Google Cloud @@ -648,7 +648,7 @@ def update_cluster( def stop_cluster( self, - request: clusters.StopClusterRequest = None, + request: Union[clusters.StopClusterRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -657,7 +657,7 @@ def stop_cluster( r"""Stops a cluster in a project. Args: - request (google.cloud.dataproc_v1.types.StopClusterRequest): + request (Union[google.cloud.dataproc_v1.types.StopClusterRequest, dict]): The request object. A request to stop a cluster. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -701,7 +701,7 @@ def stop_cluster( def start_cluster( self, - request: clusters.StartClusterRequest = None, + request: Union[clusters.StartClusterRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -710,7 +710,7 @@ def start_cluster( r"""Starts a cluster in a project. Args: - request (google.cloud.dataproc_v1.types.StartClusterRequest): + request (Union[google.cloud.dataproc_v1.types.StartClusterRequest, dict]): The request object. A request to start a cluster. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -754,7 +754,7 @@ def start_cluster( def delete_cluster( self, - request: clusters.DeleteClusterRequest = None, + request: Union[clusters.DeleteClusterRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -769,7 +769,7 @@ def delete_cluster( `ClusterOperationMetadata `__. Args: - request (google.cloud.dataproc_v1.types.DeleteClusterRequest): + request (Union[google.cloud.dataproc_v1.types.DeleteClusterRequest, dict]): The request object. A request to delete a cluster. project_id (str): Required. The ID of the Google Cloud @@ -861,7 +861,7 @@ def delete_cluster( def get_cluster( self, - request: clusters.GetClusterRequest = None, + request: Union[clusters.GetClusterRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -874,7 +874,7 @@ def get_cluster( project. Args: - request (google.cloud.dataproc_v1.types.GetClusterRequest): + request (Union[google.cloud.dataproc_v1.types.GetClusterRequest, dict]): The request object. Request to get the resource representation for a cluster in a project. project_id (str): @@ -947,7 +947,7 @@ def get_cluster( def list_clusters( self, - request: clusters.ListClustersRequest = None, + request: Union[clusters.ListClustersRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -960,7 +960,7 @@ def list_clusters( alphabetically. Args: - request (google.cloud.dataproc_v1.types.ListClustersRequest): + request (Union[google.cloud.dataproc_v1.types.ListClustersRequest, dict]): The request object. A request to list the clusters in a project. project_id (str): @@ -1064,7 +1064,7 @@ def list_clusters( def diagnose_cluster( self, - request: clusters.DiagnoseClusterRequest = None, + request: Union[clusters.DiagnoseClusterRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -1083,7 +1083,7 @@ def diagnose_cluster( `DiagnoseClusterResults `__. Args: - request (google.cloud.dataproc_v1.types.DiagnoseClusterRequest): + request (Union[google.cloud.dataproc_v1.types.DiagnoseClusterRequest, dict]): The request object. A request to collect cluster diagnostic information. project_id (str): diff --git a/google/cloud/dataproc_v1/services/cluster_controller/pagers.py b/google/cloud/dataproc_v1/services/cluster_controller/pagers.py index ead31b4b..c3445e3a 100644 --- a/google/cloud/dataproc_v1/services/cluster_controller/pagers.py +++ b/google/cloud/dataproc_v1/services/cluster_controller/pagers.py @@ -15,13 +15,13 @@ # from typing import ( Any, - AsyncIterable, + AsyncIterator, Awaitable, Callable, - Iterable, Sequence, Tuple, Optional, + Iterator, ) from google.cloud.dataproc_v1.types import clusters @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any: return getattr(self._response, name) @property - def pages(self) -> Iterable[clusters.ListClustersResponse]: + def pages(self) -> Iterator[clusters.ListClustersResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = self._method(self._request, metadata=self._metadata) yield self._response - def __iter__(self) -> Iterable[clusters.Cluster]: + def __iter__(self) -> Iterator[clusters.Cluster]: for page in self.pages: yield from page.clusters @@ -136,14 +136,14 @@ def __getattr__(self, name: str) -> Any: return getattr(self._response, name) @property - async def pages(self) -> AsyncIterable[clusters.ListClustersResponse]: + async def pages(self) -> AsyncIterator[clusters.ListClustersResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = await self._method(self._request, metadata=self._metadata) yield self._response - def __aiter__(self) -> AsyncIterable[clusters.Cluster]: + def __aiter__(self) -> AsyncIterator[clusters.Cluster]: async def async_generator(): async for page in self.pages: for response in page.clusters: diff --git a/google/cloud/dataproc_v1/services/cluster_controller/transports/base.py b/google/cloud/dataproc_v1/services/cluster_controller/transports/base.py index 39261518..508158ed 100644 --- a/google/cloud/dataproc_v1/services/cluster_controller/transports/base.py +++ b/google/cloud/dataproc_v1/services/cluster_controller/transports/base.py @@ -117,7 +117,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dataproc_v1/services/cluster_controller/transports/grpc.py b/google/cloud/dataproc_v1/services/cluster_controller/transports/grpc.py index 8e063266..67d97c46 100644 --- a/google/cloud/dataproc_v1/services/cluster_controller/transports/grpc.py +++ b/google/cloud/dataproc_v1/services/cluster_controller/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/dataproc_v1/services/cluster_controller/transports/grpc_asyncio.py b/google/cloud/dataproc_v1/services/cluster_controller/transports/grpc_asyncio.py index c9d6a6a1..e19d261b 100644 --- a/google/cloud/dataproc_v1/services/cluster_controller/transports/grpc_asyncio.py +++ b/google/cloud/dataproc_v1/services/cluster_controller/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/dataproc_v1/services/job_controller/client.py b/google/cloud/dataproc_v1/services/job_controller/client.py index 2ad64ee3..1648b69c 100644 --- a/google/cloud/dataproc_v1/services/job_controller/client.py +++ b/google/cloud/dataproc_v1/services/job_controller/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 @@ -336,7 +336,7 @@ def __init__( def submit_job( self, - request: jobs.SubmitJobRequest = None, + request: Union[jobs.SubmitJobRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -348,7 +348,7 @@ def submit_job( r"""Submits a job to a cluster. Args: - request (google.cloud.dataproc_v1.types.SubmitJobRequest): + request (Union[google.cloud.dataproc_v1.types.SubmitJobRequest, dict]): The request object. A request to submit a job. project_id (str): Required. The ID of the Google Cloud @@ -417,7 +417,7 @@ def submit_job( def submit_job_as_operation( self, - request: jobs.SubmitJobRequest = None, + request: Union[jobs.SubmitJobRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -429,7 +429,7 @@ def submit_job_as_operation( r"""Submits job to a cluster. Args: - request (google.cloud.dataproc_v1.types.SubmitJobRequest): + request (Union[google.cloud.dataproc_v1.types.SubmitJobRequest, dict]): The request object. A request to submit a job. project_id (str): Required. The ID of the Google Cloud @@ -511,7 +511,7 @@ def submit_job_as_operation( def get_job( self, - request: jobs.GetJobRequest = None, + request: Union[jobs.GetJobRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -524,7 +524,7 @@ def get_job( project. Args: - request (google.cloud.dataproc_v1.types.GetJobRequest): + request (Union[google.cloud.dataproc_v1.types.GetJobRequest, dict]): The request object. A request to get the resource representation for a job in a project. project_id (str): @@ -594,7 +594,7 @@ def get_job( def list_jobs( self, - request: jobs.ListJobsRequest = None, + request: Union[jobs.ListJobsRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -606,7 +606,7 @@ def list_jobs( r"""Lists regions/{region}/jobs in a project. Args: - request (google.cloud.dataproc_v1.types.ListJobsRequest): + request (Union[google.cloud.dataproc_v1.types.ListJobsRequest, dict]): The request object. A request to list jobs in a project. project_id (str): Required. The ID of the Google Cloud @@ -702,7 +702,7 @@ def list_jobs( def update_job( self, - request: jobs.UpdateJobRequest = None, + request: Union[jobs.UpdateJobRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -711,7 +711,7 @@ def update_job( r"""Updates a job in a project. Args: - request (google.cloud.dataproc_v1.types.UpdateJobRequest): + request (Union[google.cloud.dataproc_v1.types.UpdateJobRequest, dict]): The request object. A request to update a job. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -743,7 +743,7 @@ def update_job( def cancel_job( self, - request: jobs.CancelJobRequest = None, + request: Union[jobs.CancelJobRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -759,7 +759,7 @@ def cancel_job( `regions/{region}/jobs.get `__. Args: - request (google.cloud.dataproc_v1.types.CancelJobRequest): + request (Union[google.cloud.dataproc_v1.types.CancelJobRequest, dict]): The request object. A request to cancel a job. project_id (str): Required. The ID of the Google Cloud @@ -828,7 +828,7 @@ def cancel_job( def delete_job( self, - request: jobs.DeleteJobRequest = None, + request: Union[jobs.DeleteJobRequest, dict] = None, *, project_id: str = None, region: str = None, @@ -841,7 +841,7 @@ def delete_job( delete fails, and the response returns ``FAILED_PRECONDITION``. Args: - request (google.cloud.dataproc_v1.types.DeleteJobRequest): + request (Union[google.cloud.dataproc_v1.types.DeleteJobRequest, dict]): The request object. A request to delete a job. project_id (str): Required. The ID of the Google Cloud diff --git a/google/cloud/dataproc_v1/services/job_controller/pagers.py b/google/cloud/dataproc_v1/services/job_controller/pagers.py index da3c2c46..e9bb2433 100644 --- a/google/cloud/dataproc_v1/services/job_controller/pagers.py +++ b/google/cloud/dataproc_v1/services/job_controller/pagers.py @@ -15,13 +15,13 @@ # from typing import ( Any, - AsyncIterable, + AsyncIterator, Awaitable, Callable, - Iterable, Sequence, Tuple, Optional, + Iterator, ) from google.cloud.dataproc_v1.types import jobs @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any: return getattr(self._response, name) @property - def pages(self) -> Iterable[jobs.ListJobsResponse]: + def pages(self) -> Iterator[jobs.ListJobsResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = self._method(self._request, metadata=self._metadata) yield self._response - def __iter__(self) -> Iterable[jobs.Job]: + def __iter__(self) -> Iterator[jobs.Job]: for page in self.pages: yield from page.jobs @@ -136,14 +136,14 @@ def __getattr__(self, name: str) -> Any: return getattr(self._response, name) @property - async def pages(self) -> AsyncIterable[jobs.ListJobsResponse]: + async def pages(self) -> AsyncIterator[jobs.ListJobsResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = await self._method(self._request, metadata=self._metadata) yield self._response - def __aiter__(self) -> AsyncIterable[jobs.Job]: + def __aiter__(self) -> AsyncIterator[jobs.Job]: async def async_generator(): async for page in self.pages: for response in page.jobs: diff --git a/google/cloud/dataproc_v1/services/job_controller/transports/base.py b/google/cloud/dataproc_v1/services/job_controller/transports/base.py index 306acbef..de2683cd 100644 --- a/google/cloud/dataproc_v1/services/job_controller/transports/base.py +++ b/google/cloud/dataproc_v1/services/job_controller/transports/base.py @@ -118,7 +118,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dataproc_v1/services/job_controller/transports/grpc.py b/google/cloud/dataproc_v1/services/job_controller/transports/grpc.py index 0215e3ba..e20d4103 100644 --- a/google/cloud/dataproc_v1/services/job_controller/transports/grpc.py +++ b/google/cloud/dataproc_v1/services/job_controller/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/dataproc_v1/services/job_controller/transports/grpc_asyncio.py b/google/cloud/dataproc_v1/services/job_controller/transports/grpc_asyncio.py index 5a58094b..59de6e20 100644 --- a/google/cloud/dataproc_v1/services/job_controller/transports/grpc_asyncio.py +++ b/google/cloud/dataproc_v1/services/job_controller/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/dataproc_v1/services/workflow_template_service/client.py b/google/cloud/dataproc_v1/services/workflow_template_service/client.py index a66567e6..7725b1ad 100644 --- a/google/cloud/dataproc_v1/services/workflow_template_service/client.py +++ b/google/cloud/dataproc_v1/services/workflow_template_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 @@ -395,7 +395,7 @@ def __init__( def create_workflow_template( self, - request: workflow_templates.CreateWorkflowTemplateRequest = None, + request: Union[workflow_templates.CreateWorkflowTemplateRequest, dict] = None, *, parent: str = None, template: workflow_templates.WorkflowTemplate = None, @@ -406,7 +406,7 @@ def create_workflow_template( r"""Creates new workflow template. Args: - request (google.cloud.dataproc_v1.types.CreateWorkflowTemplateRequest): + request (Union[google.cloud.dataproc_v1.types.CreateWorkflowTemplateRequest, dict]): The request object. A request to create a workflow template. parent (str): @@ -486,7 +486,7 @@ def create_workflow_template( def get_workflow_template( self, - request: workflow_templates.GetWorkflowTemplateRequest = None, + request: Union[workflow_templates.GetWorkflowTemplateRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -498,7 +498,7 @@ def get_workflow_template( specifying optional version parameter. Args: - request (google.cloud.dataproc_v1.types.GetWorkflowTemplateRequest): + request (Union[google.cloud.dataproc_v1.types.GetWorkflowTemplateRequest, dict]): The request object. A request to fetch a workflow template. name (str): @@ -570,7 +570,9 @@ def get_workflow_template( def instantiate_workflow_template( self, - request: workflow_templates.InstantiateWorkflowTemplateRequest = None, + request: Union[ + workflow_templates.InstantiateWorkflowTemplateRequest, dict + ] = None, *, name: str = None, parameters: Sequence[ @@ -603,7 +605,7 @@ def instantiate_workflow_template( be [Empty][google.protobuf.Empty]. Args: - request (google.cloud.dataproc_v1.types.InstantiateWorkflowTemplateRequest): + request (Union[google.cloud.dataproc_v1.types.InstantiateWorkflowTemplateRequest, dict]): The request object. A request to instantiate a workflow template. name (str): @@ -713,7 +715,9 @@ def instantiate_workflow_template( def instantiate_inline_workflow_template( self, - request: workflow_templates.InstantiateInlineWorkflowTemplateRequest = None, + request: Union[ + workflow_templates.InstantiateInlineWorkflowTemplateRequest, dict + ] = None, *, parent: str = None, template: workflow_templates.WorkflowTemplate = None, @@ -749,7 +753,7 @@ def instantiate_inline_workflow_template( be [Empty][google.protobuf.Empty]. Args: - request (google.cloud.dataproc_v1.types.InstantiateInlineWorkflowTemplateRequest): + request (Union[google.cloud.dataproc_v1.types.InstantiateInlineWorkflowTemplateRequest, dict]): The request object. A request to instantiate an inline workflow template. parent (str): @@ -858,7 +862,7 @@ def instantiate_inline_workflow_template( def update_workflow_template( self, - request: workflow_templates.UpdateWorkflowTemplateRequest = None, + request: Union[workflow_templates.UpdateWorkflowTemplateRequest, dict] = None, *, template: workflow_templates.WorkflowTemplate = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -870,7 +874,7 @@ def update_workflow_template( server version. Args: - request (google.cloud.dataproc_v1.types.UpdateWorkflowTemplateRequest): + request (Union[google.cloud.dataproc_v1.types.UpdateWorkflowTemplateRequest, dict]): The request object. A request to update a workflow template. template (google.cloud.dataproc_v1.types.WorkflowTemplate): @@ -935,7 +939,7 @@ def update_workflow_template( def list_workflow_templates( self, - request: workflow_templates.ListWorkflowTemplatesRequest = None, + request: Union[workflow_templates.ListWorkflowTemplatesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -946,7 +950,7 @@ def list_workflow_templates( the request. Args: - request (google.cloud.dataproc_v1.types.ListWorkflowTemplatesRequest): + request (Union[google.cloud.dataproc_v1.types.ListWorkflowTemplatesRequest, dict]): The request object. A request to list workflow templates in a project. parent (str): @@ -1026,7 +1030,7 @@ def list_workflow_templates( def delete_workflow_template( self, - request: workflow_templates.DeleteWorkflowTemplateRequest = None, + request: Union[workflow_templates.DeleteWorkflowTemplateRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1037,7 +1041,7 @@ def delete_workflow_template( rogress workflows. Args: - request (google.cloud.dataproc_v1.types.DeleteWorkflowTemplateRequest): + request (Union[google.cloud.dataproc_v1.types.DeleteWorkflowTemplateRequest, dict]): The request object. A request to delete a workflow template. Currently started workflows will remain running. diff --git a/google/cloud/dataproc_v1/services/workflow_template_service/pagers.py b/google/cloud/dataproc_v1/services/workflow_template_service/pagers.py index 33bbb914..05526efe 100644 --- a/google/cloud/dataproc_v1/services/workflow_template_service/pagers.py +++ b/google/cloud/dataproc_v1/services/workflow_template_service/pagers.py @@ -15,13 +15,13 @@ # from typing import ( Any, - AsyncIterable, + AsyncIterator, Awaitable, Callable, - Iterable, Sequence, Tuple, Optional, + Iterator, ) from google.cloud.dataproc_v1.types import workflow_templates @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any: return getattr(self._response, name) @property - def pages(self) -> Iterable[workflow_templates.ListWorkflowTemplatesResponse]: + def pages(self) -> Iterator[workflow_templates.ListWorkflowTemplatesResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = self._method(self._request, metadata=self._metadata) yield self._response - def __iter__(self) -> Iterable[workflow_templates.WorkflowTemplate]: + def __iter__(self) -> Iterator[workflow_templates.WorkflowTemplate]: for page in self.pages: yield from page.templates @@ -140,14 +140,14 @@ def __getattr__(self, name: str) -> Any: @property async def pages( self, - ) -> AsyncIterable[workflow_templates.ListWorkflowTemplatesResponse]: + ) -> AsyncIterator[workflow_templates.ListWorkflowTemplatesResponse]: yield self._response while self._response.next_page_token: self._request.page_token = self._response.next_page_token self._response = await self._method(self._request, metadata=self._metadata) yield self._response - def __aiter__(self) -> AsyncIterable[workflow_templates.WorkflowTemplate]: + def __aiter__(self) -> AsyncIterator[workflow_templates.WorkflowTemplate]: async def async_generator(): async for page in self.pages: for response in page.templates: diff --git a/google/cloud/dataproc_v1/services/workflow_template_service/transports/base.py b/google/cloud/dataproc_v1/services/workflow_template_service/transports/base.py index 4c59aa97..6991402f 100644 --- a/google/cloud/dataproc_v1/services/workflow_template_service/transports/base.py +++ b/google/cloud/dataproc_v1/services/workflow_template_service/transports/base.py @@ -118,7 +118,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc.py b/google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc.py index 9dc3315b..d609525c 100644 --- a/google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc.py +++ b/google/cloud/dataproc_v1/services/workflow_template_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/dataproc_v1/services/workflow_template_service/transports/grpc_asyncio.py b/google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc_asyncio.py index 5d4b23c7..c9a93367 100644 --- a/google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc_asyncio.py +++ b/google/cloud/dataproc_v1/services/workflow_template_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/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index b008613f..1fd8956f 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks # diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 35421079..34decddd 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,8 +1,8 @@ backoff==1.11.1 -grpcio==1.40.0 -google-auth==2.1.0 +grpcio==1.41.0 +google-auth==2.2.1 google-auth-httplib2==0.1.0 google-cloud==0.34.0 -google-cloud-storage==1.42.2 +google-cloud-storage==1.42.3 google-cloud-dataproc==2.5.0 diff --git a/scripts/fixup_dataproc_v1_keywords.py b/scripts/fixup_dataproc_v1_keywords.py index a976d109..c5d79a7f 100644 --- a/scripts/fixup_dataproc_v1_keywords.py +++ b/scripts/fixup_dataproc_v1_keywords.py @@ -39,33 +39,33 @@ def partition( class dataprocCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'cancel_job': ('project_id', 'region', 'job_id', ), - 'create_autoscaling_policy': ('parent', 'policy', ), - 'create_cluster': ('project_id', 'region', 'cluster', 'request_id', ), - 'create_workflow_template': ('parent', 'template', ), - 'delete_autoscaling_policy': ('name', ), - 'delete_cluster': ('project_id', 'region', 'cluster_name', 'cluster_uuid', 'request_id', ), - 'delete_job': ('project_id', 'region', 'job_id', ), - 'delete_workflow_template': ('name', 'version', ), - 'diagnose_cluster': ('project_id', 'region', 'cluster_name', ), - 'get_autoscaling_policy': ('name', ), - 'get_cluster': ('project_id', 'region', 'cluster_name', ), - 'get_job': ('project_id', 'region', 'job_id', ), - 'get_workflow_template': ('name', 'version', ), - 'instantiate_inline_workflow_template': ('parent', 'template', 'request_id', ), - 'instantiate_workflow_template': ('name', 'version', 'request_id', 'parameters', ), - 'list_autoscaling_policies': ('parent', 'page_size', 'page_token', ), - 'list_clusters': ('project_id', 'region', 'filter', 'page_size', 'page_token', ), - 'list_jobs': ('project_id', 'region', 'page_size', 'page_token', 'cluster_name', 'job_state_matcher', 'filter', ), - 'list_workflow_templates': ('parent', 'page_size', 'page_token', ), - 'start_cluster': ('project_id', 'region', 'cluster_name', 'cluster_uuid', 'request_id', ), - 'stop_cluster': ('project_id', 'region', 'cluster_name', 'cluster_uuid', 'request_id', ), - 'submit_job': ('project_id', 'region', 'job', 'request_id', ), - 'submit_job_as_operation': ('project_id', 'region', 'job', 'request_id', ), - 'update_autoscaling_policy': ('policy', ), - 'update_cluster': ('project_id', 'region', 'cluster_name', 'cluster', 'update_mask', 'graceful_decommission_timeout', 'request_id', ), - 'update_job': ('project_id', 'region', 'job_id', 'job', 'update_mask', ), - 'update_workflow_template': ('template', ), + 'cancel_job': ('project_id', 'region', 'job_id', ), + 'create_autoscaling_policy': ('parent', 'policy', ), + 'create_cluster': ('project_id', 'region', 'cluster', 'request_id', ), + 'create_workflow_template': ('parent', 'template', ), + 'delete_autoscaling_policy': ('name', ), + 'delete_cluster': ('project_id', 'region', 'cluster_name', 'cluster_uuid', 'request_id', ), + 'delete_job': ('project_id', 'region', 'job_id', ), + 'delete_workflow_template': ('name', 'version', ), + 'diagnose_cluster': ('project_id', 'region', 'cluster_name', ), + 'get_autoscaling_policy': ('name', ), + 'get_cluster': ('project_id', 'region', 'cluster_name', ), + 'get_job': ('project_id', 'region', 'job_id', ), + 'get_workflow_template': ('name', 'version', ), + 'instantiate_inline_workflow_template': ('parent', 'template', 'request_id', ), + 'instantiate_workflow_template': ('name', 'version', 'request_id', 'parameters', ), + 'list_autoscaling_policies': ('parent', 'page_size', 'page_token', ), + 'list_clusters': ('project_id', 'region', 'filter', 'page_size', 'page_token', ), + 'list_jobs': ('project_id', 'region', 'page_size', 'page_token', 'cluster_name', 'job_state_matcher', 'filter', ), + 'list_workflow_templates': ('parent', 'page_size', 'page_token', ), + 'start_cluster': ('project_id', 'region', 'cluster_name', 'cluster_uuid', 'request_id', ), + 'stop_cluster': ('project_id', 'region', 'cluster_name', 'cluster_uuid', 'request_id', ), + 'submit_job': ('project_id', 'region', 'job', 'request_id', ), + 'submit_job_as_operation': ('project_id', 'region', 'job', 'request_id', ), + 'update_autoscaling_policy': ('policy', ), + 'update_cluster': ('project_id', 'region', 'cluster_name', 'cluster', 'update_mask', 'graceful_decommission_timeout', 'request_id', ), + 'update_job': ('project_id', 'region', 'job_id', 'job', 'update_mask', ), + 'update_workflow_template': ('template', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -84,7 +84,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/setup.py b/setup.py index 9f268a8d..f933a258 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-dataproc" description = "Google Cloud Dataproc API client library" -version = "2.6.0" +version = "3.0.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta'