Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#43)
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 5c0c52e commit 9fdb6bf
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
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 @@ -356,7 +356,7 @@ def __init__(

def create_contact(
self,
request: service.CreateContactRequest = None,
request: Union[service.CreateContactRequest, dict] = None,
*,
parent: str = None,
contact: service.Contact = None,
Expand All @@ -367,7 +367,7 @@ def create_contact(
r"""Adds a new contact for a resource.
Args:
request (google.cloud.essential_contacts_v1.types.CreateContactRequest):
request (Union[google.cloud.essential_contacts_v1.types.CreateContactRequest, dict]):
The request object. Request message for the
CreateContact method.
parent (str):
Expand Down Expand Up @@ -439,7 +439,7 @@ def create_contact(

def update_contact(
self,
request: service.UpdateContactRequest = None,
request: Union[service.UpdateContactRequest, dict] = None,
*,
contact: service.Contact = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -451,7 +451,7 @@ def update_contact(
Note: A contact's email address cannot be changed.
Args:
request (google.cloud.essential_contacts_v1.types.UpdateContactRequest):
request (Union[google.cloud.essential_contacts_v1.types.UpdateContactRequest, dict]):
The request object. Request message for the
UpdateContact method.
contact (google.cloud.essential_contacts_v1.types.Contact):
Expand Down Expand Up @@ -526,7 +526,7 @@ def update_contact(

def list_contacts(
self,
request: service.ListContactsRequest = None,
request: Union[service.ListContactsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -536,7 +536,7 @@ def list_contacts(
r"""Lists the contacts that have been set on a resource.
Args:
request (google.cloud.essential_contacts_v1.types.ListContactsRequest):
request (Union[google.cloud.essential_contacts_v1.types.ListContactsRequest, dict]):
The request object. Request message for the ListContacts
method.
parent (str):
Expand Down Expand Up @@ -607,7 +607,7 @@ def list_contacts(

def get_contact(
self,
request: service.GetContactRequest = None,
request: Union[service.GetContactRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -617,7 +617,7 @@ def get_contact(
r"""Gets a single contact.
Args:
request (google.cloud.essential_contacts_v1.types.GetContactRequest):
request (Union[google.cloud.essential_contacts_v1.types.GetContactRequest, dict]):
The request object. Request message for the GetContact
method.
name (str):
Expand Down Expand Up @@ -680,7 +680,7 @@ def get_contact(

def delete_contact(
self,
request: service.DeleteContactRequest = None,
request: Union[service.DeleteContactRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -690,7 +690,7 @@ def delete_contact(
r"""Deletes a contact.
Args:
request (google.cloud.essential_contacts_v1.types.DeleteContactRequest):
request (Union[google.cloud.essential_contacts_v1.types.DeleteContactRequest, dict]):
The request object. Request message for the
DeleteContact method.
name (str):
Expand Down Expand Up @@ -746,7 +746,7 @@ def delete_contact(

def compute_contacts(
self,
request: service.ComputeContactsRequest = None,
request: Union[service.ComputeContactsRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -757,7 +757,7 @@ def compute_contacts(
including contacts inherited from any parent resources.
Args:
request (google.cloud.essential_contacts_v1.types.ComputeContactsRequest):
request (Union[google.cloud.essential_contacts_v1.types.ComputeContactsRequest, dict]):
The request object. Request message for the
ComputeContacts method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -807,7 +807,7 @@ def compute_contacts(

def send_test_message(
self,
request: service.SendTestMessageRequest = None,
request: Union[service.SendTestMessageRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -817,7 +817,7 @@ def send_test_message(
contact to verify that it has been configured correctly.
Args:
request (google.cloud.essential_contacts_v1.types.SendTestMessageRequest):
request (Union[google.cloud.essential_contacts_v1.types.SendTestMessageRequest, dict]):
The request object. Request message for the
SendTestMessage method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,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
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,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_essential_contacts_v1_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def partition(
class essential_contactsCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'compute_contacts': ('parent', 'notification_categories', 'page_size', 'page_token', ),
'create_contact': ('parent', 'contact', ),
'delete_contact': ('name', ),
'get_contact': ('name', ),
'list_contacts': ('parent', 'page_size', 'page_token', ),
'send_test_message': ('contacts', 'resource', 'notification_category', ),
'update_contact': ('contact', 'update_mask', ),
'compute_contacts': ('parent', 'notification_categories', 'page_size', 'page_token', ),
'create_contact': ('parent', 'contact', ),
'delete_contact': ('name', ),
'get_contact': ('name', ),
'list_contacts': ('parent', 'page_size', 'page_token', ),
'send_test_message': ('contacts', 'resource', 'notification_category', ),
'update_contact': ('contact', 'update_mask', ),
}

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 9fdb6bf

Please sign in to comment.