Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit be5c115

Browse files
chore: use gapic-generator-python 0.51.2 (#269)
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
1 parent d8ffed5 commit be5c115

File tree

17 files changed

+126
-114
lines changed

17 files changed

+126
-114
lines changed

google/cloud/dataproc_v1/services/autoscaling_policy_service/client.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -358,7 +358,9 @@ def __init__(
358358

359359
def create_autoscaling_policy(
360360
self,
361-
request: autoscaling_policies.CreateAutoscalingPolicyRequest = None,
361+
request: Union[
362+
autoscaling_policies.CreateAutoscalingPolicyRequest, dict
363+
] = None,
362364
*,
363365
parent: str = None,
364366
policy: autoscaling_policies.AutoscalingPolicy = None,
@@ -369,7 +371,7 @@ def create_autoscaling_policy(
369371
r"""Creates new autoscaling policy.
370372
371373
Args:
372-
request (google.cloud.dataproc_v1.types.CreateAutoscalingPolicyRequest):
374+
request (Union[google.cloud.dataproc_v1.types.CreateAutoscalingPolicyRequest, dict]):
373375
The request object. A request to create an autoscaling
374376
policy.
375377
parent (str):
@@ -452,7 +454,9 @@ def create_autoscaling_policy(
452454

453455
def update_autoscaling_policy(
454456
self,
455-
request: autoscaling_policies.UpdateAutoscalingPolicyRequest = None,
457+
request: Union[
458+
autoscaling_policies.UpdateAutoscalingPolicyRequest, dict
459+
] = None,
456460
*,
457461
policy: autoscaling_policies.AutoscalingPolicy = None,
458462
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -465,7 +469,7 @@ def update_autoscaling_policy(
465469
replacements.
466470
467471
Args:
468-
request (google.cloud.dataproc_v1.types.UpdateAutoscalingPolicyRequest):
472+
request (Union[google.cloud.dataproc_v1.types.UpdateAutoscalingPolicyRequest, dict]):
469473
The request object. A request to update an autoscaling
470474
policy.
471475
policy (google.cloud.dataproc_v1.types.AutoscalingPolicy):
@@ -530,7 +534,7 @@ def update_autoscaling_policy(
530534

531535
def get_autoscaling_policy(
532536
self,
533-
request: autoscaling_policies.GetAutoscalingPolicyRequest = None,
537+
request: Union[autoscaling_policies.GetAutoscalingPolicyRequest, dict] = None,
534538
*,
535539
name: str = None,
536540
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -540,7 +544,7 @@ def get_autoscaling_policy(
540544
r"""Retrieves autoscaling policy.
541545
542546
Args:
543-
request (google.cloud.dataproc_v1.types.GetAutoscalingPolicyRequest):
547+
request (Union[google.cloud.dataproc_v1.types.GetAutoscalingPolicyRequest, dict]):
544548
The request object. A request to fetch an autoscaling
545549
policy.
546550
name (str):
@@ -611,7 +615,9 @@ def get_autoscaling_policy(
611615

612616
def list_autoscaling_policies(
613617
self,
614-
request: autoscaling_policies.ListAutoscalingPoliciesRequest = None,
618+
request: Union[
619+
autoscaling_policies.ListAutoscalingPoliciesRequest, dict
620+
] = None,
615621
*,
616622
parent: str = None,
617623
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -621,7 +627,7 @@ def list_autoscaling_policies(
621627
r"""Lists autoscaling policies in the project.
622628
623629
Args:
624-
request (google.cloud.dataproc_v1.types.ListAutoscalingPoliciesRequest):
630+
request (Union[google.cloud.dataproc_v1.types.ListAutoscalingPoliciesRequest, dict]):
625631
The request object. A request to list autoscaling
626632
policies in a project.
627633
parent (str):
@@ -703,7 +709,9 @@ def list_autoscaling_policies(
703709

704710
def delete_autoscaling_policy(
705711
self,
706-
request: autoscaling_policies.DeleteAutoscalingPolicyRequest = None,
712+
request: Union[
713+
autoscaling_policies.DeleteAutoscalingPolicyRequest, dict
714+
] = None,
707715
*,
708716
name: str = None,
709717
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -715,7 +723,7 @@ def delete_autoscaling_policy(
715723
more clusters.
716724
717725
Args:
718-
request (google.cloud.dataproc_v1.types.DeleteAutoscalingPolicyRequest):
726+
request (Union[google.cloud.dataproc_v1.types.DeleteAutoscalingPolicyRequest, dict]):
719727
The request object. A request to delete an autoscaling
720728
policy.
721729
Autoscaling policies in use by one or more clusters will

google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __init__(
116116
**scopes_kwargs, quota_project_id=quota_project_id
117117
)
118118

119-
# If the credentials is service account credentials, then always try to use self signed JWT.
119+
# If the credentials are service account credentials, then always try to use self signed JWT.
120120
if (
121121
always_use_jwt_access
122122
and isinstance(credentials, service_account.Credentials)

google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ def __init__(
8282
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8383
If provided, it overrides the ``host`` argument and tries to create
8484
a mutual TLS channel with client SSL credentials from
85-
``client_cert_source`` or applicatin default SSL credentials.
85+
``client_cert_source`` or application default SSL credentials.
8686
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8787
Deprecated. A callback to provide client SSL certificate bytes and
8888
private key bytes, both in PEM format. It is ignored if
8989
``api_mtls_endpoint`` is None.
9090
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
91-
for grpc channel. It is ignored if ``channel`` is provided.
91+
for the grpc channel. It is ignored if ``channel`` is provided.
9292
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9393
A callback to provide client certificate bytes and private key bytes,
94-
both in PEM format. It is used to configure mutual TLS channel. It is
94+
both in PEM format. It is used to configure a mutual TLS channel. It is
9595
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9696
quota_project_id (Optional[str]): An optional project to use for billing
9797
and quota.

google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,16 @@ def __init__(
129129
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
130130
If provided, it overrides the ``host`` argument and tries to create
131131
a mutual TLS channel with client SSL credentials from
132-
``client_cert_source`` or applicatin default SSL credentials.
132+
``client_cert_source`` or application default SSL credentials.
133133
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
134134
Deprecated. A callback to provide client SSL certificate bytes and
135135
private key bytes, both in PEM format. It is ignored if
136136
``api_mtls_endpoint`` is None.
137137
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
138-
for grpc channel. It is ignored if ``channel`` is provided.
138+
for the grpc channel. It is ignored if ``channel`` is provided.
139139
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
140140
A callback to provide client certificate bytes and private key bytes,
141-
both in PEM format. It is used to configure mutual TLS channel. It is
141+
both in PEM format. It is used to configure a mutual TLS channel. It is
142142
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
143143
quota_project_id (Optional[str]): An optional project to use for billing
144144
and quota.

google/cloud/dataproc_v1/services/cluster_controller/client.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -377,7 +377,7 @@ def __init__(
377377

378378
def create_cluster(
379379
self,
380-
request: clusters.CreateClusterRequest = None,
380+
request: Union[clusters.CreateClusterRequest, dict] = None,
381381
*,
382382
project_id: str = None,
383383
region: str = None,
@@ -392,7 +392,7 @@ def create_cluster(
392392
`ClusterOperationMetadata <https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata>`__.
393393
394394
Args:
395-
request (google.cloud.dataproc_v1.types.CreateClusterRequest):
395+
request (Union[google.cloud.dataproc_v1.types.CreateClusterRequest, dict]):
396396
The request object. A request to create a cluster.
397397
project_id (str):
398398
Required. The ID of the Google Cloud
@@ -473,7 +473,7 @@ def create_cluster(
473473

474474
def update_cluster(
475475
self,
476-
request: clusters.UpdateClusterRequest = None,
476+
request: Union[clusters.UpdateClusterRequest, dict] = None,
477477
*,
478478
project_id: str = None,
479479
region: str = None,
@@ -490,7 +490,7 @@ def update_cluster(
490490
`ClusterOperationMetadata <https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata>`__.
491491
492492
Args:
493-
request (google.cloud.dataproc_v1.types.UpdateClusterRequest):
493+
request (Union[google.cloud.dataproc_v1.types.UpdateClusterRequest, dict]):
494494
The request object. A request to update a cluster.
495495
project_id (str):
496496
Required. The ID of the Google Cloud
@@ -648,7 +648,7 @@ def update_cluster(
648648

649649
def stop_cluster(
650650
self,
651-
request: clusters.StopClusterRequest = None,
651+
request: Union[clusters.StopClusterRequest, dict] = None,
652652
*,
653653
retry: retries.Retry = gapic_v1.method.DEFAULT,
654654
timeout: float = None,
@@ -657,7 +657,7 @@ def stop_cluster(
657657
r"""Stops a cluster in a project.
658658
659659
Args:
660-
request (google.cloud.dataproc_v1.types.StopClusterRequest):
660+
request (Union[google.cloud.dataproc_v1.types.StopClusterRequest, dict]):
661661
The request object. A request to stop a cluster.
662662
retry (google.api_core.retry.Retry): Designation of what errors, if any,
663663
should be retried.
@@ -701,7 +701,7 @@ def stop_cluster(
701701

702702
def start_cluster(
703703
self,
704-
request: clusters.StartClusterRequest = None,
704+
request: Union[clusters.StartClusterRequest, dict] = None,
705705
*,
706706
retry: retries.Retry = gapic_v1.method.DEFAULT,
707707
timeout: float = None,
@@ -710,7 +710,7 @@ def start_cluster(
710710
r"""Starts a cluster in a project.
711711
712712
Args:
713-
request (google.cloud.dataproc_v1.types.StartClusterRequest):
713+
request (Union[google.cloud.dataproc_v1.types.StartClusterRequest, dict]):
714714
The request object. A request to start a cluster.
715715
retry (google.api_core.retry.Retry): Designation of what errors, if any,
716716
should be retried.
@@ -754,7 +754,7 @@ def start_cluster(
754754

755755
def delete_cluster(
756756
self,
757-
request: clusters.DeleteClusterRequest = None,
757+
request: Union[clusters.DeleteClusterRequest, dict] = None,
758758
*,
759759
project_id: str = None,
760760
region: str = None,
@@ -769,7 +769,7 @@ def delete_cluster(
769769
`ClusterOperationMetadata <https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata>`__.
770770
771771
Args:
772-
request (google.cloud.dataproc_v1.types.DeleteClusterRequest):
772+
request (Union[google.cloud.dataproc_v1.types.DeleteClusterRequest, dict]):
773773
The request object. A request to delete a cluster.
774774
project_id (str):
775775
Required. The ID of the Google Cloud
@@ -861,7 +861,7 @@ def delete_cluster(
861861

862862
def get_cluster(
863863
self,
864-
request: clusters.GetClusterRequest = None,
864+
request: Union[clusters.GetClusterRequest, dict] = None,
865865
*,
866866
project_id: str = None,
867867
region: str = None,
@@ -874,7 +874,7 @@ def get_cluster(
874874
project.
875875
876876
Args:
877-
request (google.cloud.dataproc_v1.types.GetClusterRequest):
877+
request (Union[google.cloud.dataproc_v1.types.GetClusterRequest, dict]):
878878
The request object. Request to get the resource
879879
representation for a cluster in a project.
880880
project_id (str):
@@ -947,7 +947,7 @@ def get_cluster(
947947

948948
def list_clusters(
949949
self,
950-
request: clusters.ListClustersRequest = None,
950+
request: Union[clusters.ListClustersRequest, dict] = None,
951951
*,
952952
project_id: str = None,
953953
region: str = None,
@@ -960,7 +960,7 @@ def list_clusters(
960960
alphabetically.
961961
962962
Args:
963-
request (google.cloud.dataproc_v1.types.ListClustersRequest):
963+
request (Union[google.cloud.dataproc_v1.types.ListClustersRequest, dict]):
964964
The request object. A request to list the clusters in a
965965
project.
966966
project_id (str):
@@ -1064,7 +1064,7 @@ def list_clusters(
10641064

10651065
def diagnose_cluster(
10661066
self,
1067-
request: clusters.DiagnoseClusterRequest = None,
1067+
request: Union[clusters.DiagnoseClusterRequest, dict] = None,
10681068
*,
10691069
project_id: str = None,
10701070
region: str = None,
@@ -1083,7 +1083,7 @@ def diagnose_cluster(
10831083
`DiagnoseClusterResults <https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults>`__.
10841084
10851085
Args:
1086-
request (google.cloud.dataproc_v1.types.DiagnoseClusterRequest):
1086+
request (Union[google.cloud.dataproc_v1.types.DiagnoseClusterRequest, dict]):
10871087
The request object. A request to collect cluster
10881088
diagnostic information.
10891089
project_id (str):

google/cloud/dataproc_v1/services/cluster_controller/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def __init__(
117117
**scopes_kwargs, quota_project_id=quota_project_id
118118
)
119119

120-
# If the credentials is service account credentials, then always try to use self signed JWT.
120+
# If the credentials are service account credentials, then always try to use self signed JWT.
121121
if (
122122
always_use_jwt_access
123123
and isinstance(credentials, service_account.Credentials)

google/cloud/dataproc_v1/services/cluster_controller/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ def __init__(
8383
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8484
If provided, it overrides the ``host`` argument and tries to create
8585
a mutual TLS channel with client SSL credentials from
86-
``client_cert_source`` or applicatin default SSL credentials.
86+
``client_cert_source`` or application default SSL credentials.
8787
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8888
Deprecated. A callback to provide client SSL certificate bytes and
8989
private key bytes, both in PEM format. It is ignored if
9090
``api_mtls_endpoint`` is None.
9191
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
92-
for grpc channel. It is ignored if ``channel`` is provided.
92+
for the grpc channel. It is ignored if ``channel`` is provided.
9393
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9494
A callback to provide client certificate bytes and private key bytes,
95-
both in PEM format. It is used to configure mutual TLS channel. It is
95+
both in PEM format. It is used to configure a mutual TLS channel. It is
9696
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9797
quota_project_id (Optional[str]): An optional project to use for billing
9898
and quota.

google/cloud/dataproc_v1/services/cluster_controller/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ def __init__(
130130
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
131131
If provided, it overrides the ``host`` argument and tries to create
132132
a mutual TLS channel with client SSL credentials from
133-
``client_cert_source`` or applicatin default SSL credentials.
133+
``client_cert_source`` or application default SSL credentials.
134134
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
135135
Deprecated. A callback to provide client SSL certificate bytes and
136136
private key bytes, both in PEM format. It is ignored if
137137
``api_mtls_endpoint`` is None.
138138
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
139-
for grpc channel. It is ignored if ``channel`` is provided.
139+
for the grpc channel. It is ignored if ``channel`` is provided.
140140
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
141141
A callback to provide client certificate bytes and private key bytes,
142-
both in PEM format. It is used to configure mutual TLS channel. It is
142+
both in PEM format. It is used to configure a mutual TLS channel. It is
143143
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
144144
quota_project_id (Optional[str]): An optional project to use for billing
145145
and quota.

0 commit comments

Comments
 (0)