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

Commit 7d49e68

Browse files
chore: use gapic-generator-python 0.51.2 (#123)
- [ ] 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 00d3db2 commit 7d49e68

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/client.py

Lines changed: 19 additions & 19 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
@@ -378,7 +378,7 @@ def __init__(
378378

379379
def create_assessment(
380380
self,
381-
request: recaptchaenterprise.CreateAssessmentRequest = None,
381+
request: Union[recaptchaenterprise.CreateAssessmentRequest, dict] = None,
382382
*,
383383
parent: str = None,
384384
assessment: recaptchaenterprise.Assessment = None,
@@ -390,7 +390,7 @@ def create_assessment(
390390
legitimate.
391391
392392
Args:
393-
request (google.cloud.recaptchaenterprise_v1.types.CreateAssessmentRequest):
393+
request (Union[google.cloud.recaptchaenterprise_v1.types.CreateAssessmentRequest, dict]):
394394
The request object. The create assessment request
395395
message.
396396
parent (str):
@@ -457,7 +457,7 @@ def create_assessment(
457457

458458
def annotate_assessment(
459459
self,
460-
request: recaptchaenterprise.AnnotateAssessmentRequest = None,
460+
request: Union[recaptchaenterprise.AnnotateAssessmentRequest, dict] = None,
461461
*,
462462
name: str = None,
463463
annotation: recaptchaenterprise.AnnotateAssessmentRequest.Annotation = None,
@@ -470,7 +470,7 @@ def annotate_assessment(
470470
to be authentic or fraudulent.
471471
472472
Args:
473-
request (google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentRequest):
473+
request (Union[google.cloud.recaptchaenterprise_v1.types.AnnotateAssessmentRequest, dict]):
474474
The request object. The request message to annotate an
475475
Assessment.
476476
name (str):
@@ -544,7 +544,7 @@ def annotate_assessment(
544544

545545
def create_key(
546546
self,
547-
request: recaptchaenterprise.CreateKeyRequest = None,
547+
request: Union[recaptchaenterprise.CreateKeyRequest, dict] = None,
548548
*,
549549
retry: retries.Retry = gapic_v1.method.DEFAULT,
550550
timeout: float = None,
@@ -553,7 +553,7 @@ def create_key(
553553
r"""Creates a new reCAPTCHA Enterprise key.
554554
555555
Args:
556-
request (google.cloud.recaptchaenterprise_v1.types.CreateKeyRequest):
556+
request (Union[google.cloud.recaptchaenterprise_v1.types.CreateKeyRequest, dict]):
557557
The request object. The create key request message.
558558
retry (google.api_core.retry.Retry): Designation of what errors, if any,
559559
should be retried.
@@ -594,7 +594,7 @@ def create_key(
594594

595595
def list_keys(
596596
self,
597-
request: recaptchaenterprise.ListKeysRequest = None,
597+
request: Union[recaptchaenterprise.ListKeysRequest, dict] = None,
598598
*,
599599
retry: retries.Retry = gapic_v1.method.DEFAULT,
600600
timeout: float = None,
@@ -604,7 +604,7 @@ def list_keys(
604604
project.
605605
606606
Args:
607-
request (google.cloud.recaptchaenterprise_v1.types.ListKeysRequest):
607+
request (Union[google.cloud.recaptchaenterprise_v1.types.ListKeysRequest, dict]):
608608
The request object. The list keys request message.
609609
retry (google.api_core.retry.Retry): Designation of what errors, if any,
610610
should be retried.
@@ -653,7 +653,7 @@ def list_keys(
653653

654654
def get_key(
655655
self,
656-
request: recaptchaenterprise.GetKeyRequest = None,
656+
request: Union[recaptchaenterprise.GetKeyRequest, dict] = None,
657657
*,
658658
retry: retries.Retry = gapic_v1.method.DEFAULT,
659659
timeout: float = None,
@@ -662,7 +662,7 @@ def get_key(
662662
r"""Returns the specified key.
663663
664664
Args:
665-
request (google.cloud.recaptchaenterprise_v1.types.GetKeyRequest):
665+
request (Union[google.cloud.recaptchaenterprise_v1.types.GetKeyRequest, dict]):
666666
The request object. The get key request message.
667667
retry (google.api_core.retry.Retry): Designation of what errors, if any,
668668
should be retried.
@@ -703,7 +703,7 @@ def get_key(
703703

704704
def update_key(
705705
self,
706-
request: recaptchaenterprise.UpdateKeyRequest = None,
706+
request: Union[recaptchaenterprise.UpdateKeyRequest, dict] = None,
707707
*,
708708
retry: retries.Retry = gapic_v1.method.DEFAULT,
709709
timeout: float = None,
@@ -712,7 +712,7 @@ def update_key(
712712
r"""Updates the specified key.
713713
714714
Args:
715-
request (google.cloud.recaptchaenterprise_v1.types.UpdateKeyRequest):
715+
request (Union[google.cloud.recaptchaenterprise_v1.types.UpdateKeyRequest, dict]):
716716
The request object. The update key request message.
717717
retry (google.api_core.retry.Retry): Designation of what errors, if any,
718718
should be retried.
@@ -753,7 +753,7 @@ def update_key(
753753

754754
def delete_key(
755755
self,
756-
request: recaptchaenterprise.DeleteKeyRequest = None,
756+
request: Union[recaptchaenterprise.DeleteKeyRequest, dict] = None,
757757
*,
758758
retry: retries.Retry = gapic_v1.method.DEFAULT,
759759
timeout: float = None,
@@ -762,7 +762,7 @@ def delete_key(
762762
r"""Deletes the specified key.
763763
764764
Args:
765-
request (google.cloud.recaptchaenterprise_v1.types.DeleteKeyRequest):
765+
request (Union[google.cloud.recaptchaenterprise_v1.types.DeleteKeyRequest, dict]):
766766
The request object. The delete key request message.
767767
retry (google.api_core.retry.Retry): Designation of what errors, if any,
768768
should be retried.
@@ -795,7 +795,7 @@ def delete_key(
795795

796796
def migrate_key(
797797
self,
798-
request: recaptchaenterprise.MigrateKeyRequest = None,
798+
request: Union[recaptchaenterprise.MigrateKeyRequest, dict] = None,
799799
*,
800800
retry: retries.Retry = gapic_v1.method.DEFAULT,
801801
timeout: float = None,
@@ -810,7 +810,7 @@ def migrate_key(
810810
role in the destination project.
811811
812812
Args:
813-
request (google.cloud.recaptchaenterprise_v1.types.MigrateKeyRequest):
813+
request (Union[google.cloud.recaptchaenterprise_v1.types.MigrateKeyRequest, dict]):
814814
The request object. The migrate key request message.
815815
retry (google.api_core.retry.Retry): Designation of what errors, if any,
816816
should be retried.
@@ -851,7 +851,7 @@ def migrate_key(
851851

852852
def get_metrics(
853853
self,
854-
request: recaptchaenterprise.GetMetricsRequest = None,
854+
request: Union[recaptchaenterprise.GetMetricsRequest, dict] = None,
855855
*,
856856
name: str = None,
857857
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -862,7 +862,7 @@ def get_metrics(
862862
be used to build dashboards.
863863
864864
Args:
865-
request (google.cloud.recaptchaenterprise_v1.types.GetMetricsRequest):
865+
request (Union[google.cloud.recaptchaenterprise_v1.types.GetMetricsRequest, dict]):
866866
The request object. The get metrics request message.
867867
name (str):
868868
Required. The name of the requested

google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/transports/base.py

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

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

google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/transports/grpc.py

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

google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/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.

scripts/fixup_recaptchaenterprise_v1_keywords.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ def partition(
3939
class recaptchaenterpriseCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'annotate_assessment': ('name', 'annotation', 'reasons', ),
43-
'create_assessment': ('parent', 'assessment', ),
44-
'create_key': ('parent', 'key', ),
45-
'delete_key': ('name', ),
46-
'get_key': ('name', ),
47-
'get_metrics': ('name', ),
48-
'list_keys': ('parent', 'page_size', 'page_token', ),
49-
'migrate_key': ('name', ),
50-
'update_key': ('key', 'update_mask', ),
42+
'annotate_assessment': ('name', 'annotation', 'reasons', ),
43+
'create_assessment': ('parent', 'assessment', ),
44+
'create_key': ('parent', 'key', ),
45+
'delete_key': ('name', ),
46+
'get_key': ('name', ),
47+
'get_metrics': ('name', ),
48+
'list_keys': ('parent', 'page_size', 'page_token', ),
49+
'migrate_key': ('name', ),
50+
'update_key': ('key', 'update_mask', ),
5151
}
5252

5353
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -66,7 +66,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6666
return updated
6767

6868
kwargs, ctrl_kwargs = partition(
69-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
69+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
7070
kwargs
7171
)
7272

0 commit comments

Comments
 (0)