Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#86)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: add 'dict' annotation type to 'request'

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent 4d54f46 commit c2ea337
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
30 changes: 15 additions & 15 deletions google/cloud/orgpolicy_v2/services/org_policy/client.py
Expand Up @@ -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
Expand Down Expand Up @@ -385,7 +385,7 @@ def __init__(

def list_constraints(
self,
request: orgpolicy.ListConstraintsRequest = None,
request: Union[orgpolicy.ListConstraintsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -396,7 +396,7 @@ def list_constraints(
resource.
Args:
request (google.cloud.orgpolicy_v2.types.ListConstraintsRequest):
request (Union[google.cloud.orgpolicy_v2.types.ListConstraintsRequest, dict]):
The request object. The request sent to the
[ListConstraints]
[google.cloud.orgpolicy.v2.OrgPolicy.ListConstraints]
Expand Down Expand Up @@ -474,7 +474,7 @@ def list_constraints(

def list_policies(
self,
request: orgpolicy.ListPoliciesRequest = None,
request: Union[orgpolicy.ListPoliciesRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -485,7 +485,7 @@ def list_policies(
resource.
Args:
request (google.cloud.orgpolicy_v2.types.ListPoliciesRequest):
request (Union[google.cloud.orgpolicy_v2.types.ListPoliciesRequest, dict]):
The request object. The request sent to the
[ListPolicies]
[google.cloud.orgpolicy.v2.OrgPolicy.ListPolicies]
Expand Down Expand Up @@ -565,7 +565,7 @@ def list_policies(

def get_policy(
self,
request: orgpolicy.GetPolicyRequest = None,
request: Union[orgpolicy.GetPolicyRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -579,7 +579,7 @@ def get_policy(
a ``Policy`` during read-modify-write.
Args:
request (google.cloud.orgpolicy_v2.types.GetPolicyRequest):
request (Union[google.cloud.orgpolicy_v2.types.GetPolicyRequest, dict]):
The request object. The request sent to the [GetPolicy]
[google.cloud.orgpolicy.v2.OrgPolicy.GetPolicy] method.
name (str):
Expand Down Expand Up @@ -640,7 +640,7 @@ def get_policy(

def get_effective_policy(
self,
request: orgpolicy.GetEffectivePolicyRequest = None,
request: Union[orgpolicy.GetEffectivePolicyRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -655,7 +655,7 @@ def get_effective_policy(
hierarchy with 'under:' prefix will not be expanded.
Args:
request (google.cloud.orgpolicy_v2.types.GetEffectivePolicyRequest):
request (Union[google.cloud.orgpolicy_v2.types.GetEffectivePolicyRequest, dict]):
The request object. The request sent to the
[GetEffectivePolicy]
[google.cloud.orgpolicy.v2.OrgPolicy.GetEffectivePolicy]
Expand Down Expand Up @@ -718,7 +718,7 @@ def get_effective_policy(

def create_policy(
self,
request: orgpolicy.CreatePolicyRequest = None,
request: Union[orgpolicy.CreatePolicyRequest, dict] = None,
*,
parent: str = None,
policy: orgpolicy.Policy = None,
Expand All @@ -735,7 +735,7 @@ def create_policy(
on the given Cloud resource.
Args:
request (google.cloud.orgpolicy_v2.types.CreatePolicyRequest):
request (Union[google.cloud.orgpolicy_v2.types.CreatePolicyRequest, dict]):
The request object. The request sent to the
[CreatePolicyRequest]
[google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy]
Expand Down Expand Up @@ -810,7 +810,7 @@ def create_policy(

def update_policy(
self,
request: orgpolicy.UpdatePolicyRequest = None,
request: Union[orgpolicy.UpdatePolicyRequest, dict] = None,
*,
policy: orgpolicy.Policy = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -829,7 +829,7 @@ def update_policy(
fields.
Args:
request (google.cloud.orgpolicy_v2.types.UpdatePolicyRequest):
request (Union[google.cloud.orgpolicy_v2.types.UpdatePolicyRequest, dict]):
The request object. The request sent to the
[UpdatePolicyRequest]
[google.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicy]
Expand Down Expand Up @@ -892,7 +892,7 @@ def update_policy(

def delete_policy(
self,
request: orgpolicy.DeletePolicyRequest = None,
request: Union[orgpolicy.DeletePolicyRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -906,7 +906,7 @@ def delete_policy(
does not exist.
Args:
request (google.cloud.orgpolicy_v2.types.DeletePolicyRequest):
request (Union[google.cloud.orgpolicy_v2.types.DeletePolicyRequest, dict]):
The request object. The request sent to the
[DeletePolicy]
[google.cloud.orgpolicy.v2.OrgPolicy.DeletePolicy]
Expand Down
Expand Up @@ -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)
Expand Down
Expand Up @@ -102,16 +102,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.
Expand Down
Expand Up @@ -149,16 +149,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.
Expand Down
16 changes: 8 additions & 8 deletions scripts/fixup_orgpolicy_v2_keywords.py
Expand Up @@ -39,13 +39,13 @@ def partition(
class orgpolicyCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_policy': ('parent', 'policy', ),
'delete_policy': ('name', ),
'get_effective_policy': ('name', ),
'get_policy': ('name', ),
'list_constraints': ('parent', 'page_size', 'page_token', ),
'list_policies': ('parent', 'page_size', 'page_token', ),
'update_policy': ('policy', ),
'create_policy': ('parent', 'policy', ),
'delete_policy': ('name', ),
'get_effective_policy': ('name', ),
'get_policy': ('name', ),
'list_constraints': ('parent', 'page_size', 'page_token', ),
'list_policies': ('parent', 'page_size', 'page_token', ),
'update_policy': ('policy', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand All @@ -64,7 +64,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
)

Expand Down

0 comments on commit c2ea337

Please sign in to comment.