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

Commit a5b27d2

Browse files
chore: use gapic-generator-python 0.51.2 (#27)
- [ ] 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 f87ead8 commit a5b27d2

9 files changed

Lines changed: 56 additions & 56 deletions

File tree

google/cloud/iap_v1/services/identity_aware_proxy_admin_service/client.py

Lines changed: 11 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
@@ -346,7 +346,7 @@ def __init__(
346346

347347
def set_iam_policy(
348348
self,
349-
request: iam_policy_pb2.SetIamPolicyRequest = None,
349+
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
350350
*,
351351
retry: retries.Retry = gapic_v1.method.DEFAULT,
352352
timeout: float = None,
@@ -358,7 +358,7 @@ def set_iam_policy(
358358
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
359359
360360
Args:
361-
request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest):
361+
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
362362
The request object. Request message for `SetIamPolicy`
363363
method.
364364
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -453,7 +453,7 @@ def set_iam_policy(
453453

454454
def get_iam_policy(
455455
self,
456-
request: iam_policy_pb2.GetIamPolicyRequest = None,
456+
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
457457
*,
458458
retry: retries.Retry = gapic_v1.method.DEFAULT,
459459
timeout: float = None,
@@ -465,7 +465,7 @@ def get_iam_policy(
465465
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
466466
467467
Args:
468-
request (google.iam.v1.iam_policy_pb2.GetIamPolicyRequest):
468+
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
469469
The request object. Request message for `GetIamPolicy`
470470
method.
471471
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -560,7 +560,7 @@ def get_iam_policy(
560560

561561
def test_iam_permissions(
562562
self,
563-
request: iam_policy_pb2.TestIamPermissionsRequest = None,
563+
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
564564
*,
565565
retry: retries.Retry = gapic_v1.method.DEFAULT,
566566
timeout: float = None,
@@ -572,7 +572,7 @@ def test_iam_permissions(
572572
https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
573573
574574
Args:
575-
request (google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest):
575+
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
576576
The request object. Request message for
577577
`TestIamPermissions` method.
578578
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -612,7 +612,7 @@ def test_iam_permissions(
612612

613613
def get_iap_settings(
614614
self,
615-
request: service.GetIapSettingsRequest = None,
615+
request: Union[service.GetIapSettingsRequest, dict] = None,
616616
*,
617617
retry: retries.Retry = gapic_v1.method.DEFAULT,
618618
timeout: float = None,
@@ -622,7 +622,7 @@ def get_iap_settings(
622622
resource.
623623
624624
Args:
625-
request (google.cloud.iap_v1.types.GetIapSettingsRequest):
625+
request (Union[google.cloud.iap_v1.types.GetIapSettingsRequest, dict]):
626626
The request object. The request sent to GetIapSettings.
627627
retry (google.api_core.retry.Retry): Designation of what errors, if any,
628628
should be retried.
@@ -660,7 +660,7 @@ def get_iap_settings(
660660

661661
def update_iap_settings(
662662
self,
663-
request: service.UpdateIapSettingsRequest = None,
663+
request: Union[service.UpdateIapSettingsRequest, dict] = None,
664664
*,
665665
retry: retries.Retry = gapic_v1.method.DEFAULT,
666666
timeout: float = None,
@@ -670,7 +670,7 @@ def update_iap_settings(
670670
It replaces all fields unless the ``update_mask`` is set.
671671
672672
Args:
673-
request (google.cloud.iap_v1.types.UpdateIapSettingsRequest):
673+
request (Union[google.cloud.iap_v1.types.UpdateIapSettingsRequest, dict]):
674674
The request object. The request sent to
675675
UpdateIapSettings.
676676
retry (google.api_core.retry.Retry): Designation of what errors, if any,

google/cloud/iap_v1/services/identity_aware_proxy_admin_service/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/iap_v1/services/identity_aware_proxy_admin_service/transports/grpc.py

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

google/cloud/iap_v1/services/identity_aware_proxy_admin_service/transports/grpc_asyncio.py

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

google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/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
@@ -348,7 +348,7 @@ def __init__(
348348

349349
def list_brands(
350350
self,
351-
request: service.ListBrandsRequest = None,
351+
request: Union[service.ListBrandsRequest, dict] = None,
352352
*,
353353
retry: retries.Retry = gapic_v1.method.DEFAULT,
354354
timeout: float = None,
@@ -357,7 +357,7 @@ def list_brands(
357357
r"""Lists the existing brands for the project.
358358
359359
Args:
360-
request (google.cloud.iap_v1.types.ListBrandsRequest):
360+
request (Union[google.cloud.iap_v1.types.ListBrandsRequest, dict]):
361361
The request object. The request sent to ListBrands.
362362
retry (google.api_core.retry.Retry): Designation of what errors, if any,
363363
should be retried.
@@ -395,7 +395,7 @@ def list_brands(
395395

396396
def create_brand(
397397
self,
398-
request: service.CreateBrandRequest = None,
398+
request: Union[service.CreateBrandRequest, dict] = None,
399399
*,
400400
retry: retries.Retry = gapic_v1.method.DEFAULT,
401401
timeout: float = None,
@@ -413,7 +413,7 @@ def create_brand(
413413
by the caller.
414414
415415
Args:
416-
request (google.cloud.iap_v1.types.CreateBrandRequest):
416+
request (Union[google.cloud.iap_v1.types.CreateBrandRequest, dict]):
417417
The request object. The request sent to CreateBrand.
418418
retry (google.api_core.retry.Retry): Designation of what errors, if any,
419419
should be retried.
@@ -454,7 +454,7 @@ def create_brand(
454454

455455
def get_brand(
456456
self,
457-
request: service.GetBrandRequest = None,
457+
request: Union[service.GetBrandRequest, dict] = None,
458458
*,
459459
retry: retries.Retry = gapic_v1.method.DEFAULT,
460460
timeout: float = None,
@@ -463,7 +463,7 @@ def get_brand(
463463
r"""Retrieves the OAuth brand of the project.
464464
465465
Args:
466-
request (google.cloud.iap_v1.types.GetBrandRequest):
466+
request (Union[google.cloud.iap_v1.types.GetBrandRequest, dict]):
467467
The request object. The request sent to GetBrand.
468468
retry (google.api_core.retry.Retry): Designation of what errors, if any,
469469
should be retried.
@@ -504,7 +504,7 @@ def get_brand(
504504

505505
def create_identity_aware_proxy_client(
506506
self,
507-
request: service.CreateIdentityAwareProxyClientRequest = None,
507+
request: Union[service.CreateIdentityAwareProxyClientRequest, dict] = None,
508508
*,
509509
retry: retries.Retry = gapic_v1.method.DEFAULT,
510510
timeout: float = None,
@@ -516,7 +516,7 @@ def create_identity_aware_proxy_client(
516516
use.
517517
518518
Args:
519-
request (google.cloud.iap_v1.types.CreateIdentityAwareProxyClientRequest):
519+
request (Union[google.cloud.iap_v1.types.CreateIdentityAwareProxyClientRequest, dict]):
520520
The request object. The request sent to
521521
CreateIdentityAwareProxyClient.
522522
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -559,7 +559,7 @@ def create_identity_aware_proxy_client(
559559

560560
def list_identity_aware_proxy_clients(
561561
self,
562-
request: service.ListIdentityAwareProxyClientsRequest = None,
562+
request: Union[service.ListIdentityAwareProxyClientsRequest, dict] = None,
563563
*,
564564
retry: retries.Retry = gapic_v1.method.DEFAULT,
565565
timeout: float = None,
@@ -568,7 +568,7 @@ def list_identity_aware_proxy_clients(
568568
r"""Lists the existing clients for the brand.
569569
570570
Args:
571-
request (google.cloud.iap_v1.types.ListIdentityAwareProxyClientsRequest):
571+
request (Union[google.cloud.iap_v1.types.ListIdentityAwareProxyClientsRequest, dict]):
572572
The request object. The request sent to
573573
ListIdentityAwareProxyClients.
574574
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -620,7 +620,7 @@ def list_identity_aware_proxy_clients(
620620

621621
def get_identity_aware_proxy_client(
622622
self,
623-
request: service.GetIdentityAwareProxyClientRequest = None,
623+
request: Union[service.GetIdentityAwareProxyClientRequest, dict] = None,
624624
*,
625625
retry: retries.Retry = gapic_v1.method.DEFAULT,
626626
timeout: float = None,
@@ -630,7 +630,7 @@ def get_identity_aware_proxy_client(
630630
Requires that the client is owned by IAP.
631631
632632
Args:
633-
request (google.cloud.iap_v1.types.GetIdentityAwareProxyClientRequest):
633+
request (Union[google.cloud.iap_v1.types.GetIdentityAwareProxyClientRequest, dict]):
634634
The request object. The request sent to
635635
GetIdentityAwareProxyClient.
636636
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -673,7 +673,7 @@ def get_identity_aware_proxy_client(
673673

674674
def reset_identity_aware_proxy_client_secret(
675675
self,
676-
request: service.ResetIdentityAwareProxyClientSecretRequest = None,
676+
request: Union[service.ResetIdentityAwareProxyClientSecretRequest, dict] = None,
677677
*,
678678
retry: retries.Retry = gapic_v1.method.DEFAULT,
679679
timeout: float = None,
@@ -684,7 +684,7 @@ def reset_identity_aware_proxy_client_secret(
684684
that the client is owned by IAP.
685685
686686
Args:
687-
request (google.cloud.iap_v1.types.ResetIdentityAwareProxyClientSecretRequest):
687+
request (Union[google.cloud.iap_v1.types.ResetIdentityAwareProxyClientSecretRequest, dict]):
688688
The request object. The request sent to
689689
ResetIdentityAwareProxyClientSecret.
690690
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -727,7 +727,7 @@ def reset_identity_aware_proxy_client_secret(
727727

728728
def delete_identity_aware_proxy_client(
729729
self,
730-
request: service.DeleteIdentityAwareProxyClientRequest = None,
730+
request: Union[service.DeleteIdentityAwareProxyClientRequest, dict] = None,
731731
*,
732732
retry: retries.Retry = gapic_v1.method.DEFAULT,
733733
timeout: float = None,
@@ -739,7 +739,7 @@ def delete_identity_aware_proxy_client(
739739
after tests. Requires that the client is owned by IAP.
740740
741741
Args:
742-
request (google.cloud.iap_v1.types.DeleteIdentityAwareProxyClientRequest):
742+
request (Union[google.cloud.iap_v1.types.DeleteIdentityAwareProxyClientRequest, dict]):
743743
The request object. The request sent to
744744
DeleteIdentityAwareProxyClient.
745745
retry (google.api_core.retry.Retry): Designation of what errors, if any,

google/cloud/iap_v1/services/identity_aware_proxy_o_auth_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/iap_v1/services/identity_aware_proxy_o_auth_service/transports/grpc.py

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

google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/transports/grpc_asyncio.py

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

scripts/fixup_iap_v1_keywords.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ def partition(
3939
class iapCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'create_brand': ('parent', 'brand', ),
43-
'create_identity_aware_proxy_client': ('parent', 'identity_aware_proxy_client', ),
44-
'delete_identity_aware_proxy_client': ('name', ),
45-
'get_brand': ('name', ),
46-
'get_iam_policy': ('resource', 'options', ),
47-
'get_iap_settings': ('name', ),
48-
'get_identity_aware_proxy_client': ('name', ),
49-
'list_brands': ('parent', ),
50-
'list_identity_aware_proxy_clients': ('parent', 'page_size', 'page_token', ),
51-
'reset_identity_aware_proxy_client_secret': ('name', ),
52-
'set_iam_policy': ('resource', 'policy', ),
53-
'test_iam_permissions': ('resource', 'permissions', ),
54-
'update_iap_settings': ('iap_settings', 'update_mask', ),
42+
'create_brand': ('parent', 'brand', ),
43+
'create_identity_aware_proxy_client': ('parent', 'identity_aware_proxy_client', ),
44+
'delete_identity_aware_proxy_client': ('name', ),
45+
'get_brand': ('name', ),
46+
'get_iam_policy': ('resource', 'options', ),
47+
'get_iap_settings': ('name', ),
48+
'get_identity_aware_proxy_client': ('name', ),
49+
'list_brands': ('parent', ),
50+
'list_identity_aware_proxy_clients': ('parent', 'page_size', 'page_token', ),
51+
'reset_identity_aware_proxy_client_secret': ('name', ),
52+
'set_iam_policy': ('resource', 'policy', ),
53+
'test_iam_permissions': ('resource', 'permissions', ),
54+
'update_iap_settings': ('iap_settings', 'update_mask', ),
5555
}
5656

5757
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -70,7 +70,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
7070
return updated
7171

7272
kwargs, ctrl_kwargs = partition(
73-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
73+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
7474
kwargs
7575
)
7676

0 commit comments

Comments
 (0)