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

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: use gapic-generator-python 0.51.2 (#57)
- [ ] 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 9651061 commit 7547e3a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
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
import warnings

Expand Down Expand Up @@ -366,7 +366,7 @@ def __init__(

def list_services(
self,
request: servicemanager.ListServicesRequest = None,
request: Union[servicemanager.ListServicesRequest, dict] = None,
*,
producer_project_id: str = None,
consumer_id: str = None,
Expand All @@ -385,7 +385,7 @@ def list_services(
``consumer_id`` must have the format of "project:{PROJECT-ID}".
Args:
request (google.cloud.servicemanagement_v1.types.ListServicesRequest):
request (Union[google.cloud.servicemanagement_v1.types.ListServicesRequest, dict]):
The request object. Request message for `ListServices`
method.
producer_project_id (str):
Expand Down Expand Up @@ -461,7 +461,7 @@ def list_services(

def get_service(
self,
request: servicemanager.GetServiceRequest = None,
request: Union[servicemanager.GetServiceRequest, dict] = None,
*,
service_name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -472,7 +472,7 @@ def get_service(
unless the service is public.
Args:
request (google.cloud.servicemanagement_v1.types.GetServiceRequest):
request (Union[google.cloud.servicemanagement_v1.types.GetServiceRequest, dict]):
The request object. Request message for `GetService`
method.
service_name (str):
Expand Down Expand Up @@ -529,7 +529,7 @@ def get_service(

def create_service(
self,
request: servicemanager.CreateServiceRequest = None,
request: Union[servicemanager.CreateServiceRequest, dict] = None,
*,
service: resources.ManagedService = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -542,7 +542,7 @@ def create_service(
Operation<response: ManagedService>
Args:
request (google.cloud.servicemanagement_v1.types.CreateServiceRequest):
request (Union[google.cloud.servicemanagement_v1.types.CreateServiceRequest, dict]):
The request object. Request message for CreateService
method.
service (google.cloud.servicemanagement_v1.types.ManagedService):
Expand Down Expand Up @@ -607,7 +607,7 @@ def create_service(

def delete_service(
self,
request: servicemanager.DeleteServiceRequest = None,
request: Union[servicemanager.DeleteServiceRequest, dict] = None,
*,
service_name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -624,7 +624,7 @@ def delete_service(
Operation<response: google.protobuf.Empty>
Args:
request (google.cloud.servicemanagement_v1.types.DeleteServiceRequest):
request (Union[google.cloud.servicemanagement_v1.types.DeleteServiceRequest, dict]):
The request object. Request message for DeleteService
method.
service_name (str):
Expand Down Expand Up @@ -702,7 +702,7 @@ def delete_service(

def undelete_service(
self,
request: servicemanager.UndeleteServiceRequest = None,
request: Union[servicemanager.UndeleteServiceRequest, dict] = None,
*,
service_name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -718,7 +718,7 @@ def undelete_service(
Operation<response: UndeleteServiceResponse>
Args:
request (google.cloud.servicemanagement_v1.types.UndeleteServiceRequest):
request (Union[google.cloud.servicemanagement_v1.types.UndeleteServiceRequest, dict]):
The request object. Request message for UndeleteService
method.
service_name (str):
Expand Down Expand Up @@ -786,7 +786,7 @@ def undelete_service(

def list_service_configs(
self,
request: servicemanager.ListServiceConfigsRequest = None,
request: Union[servicemanager.ListServiceConfigsRequest, dict] = None,
*,
service_name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -797,7 +797,7 @@ def list_service_configs(
managed service, from the newest to the oldest.
Args:
request (google.cloud.servicemanagement_v1.types.ListServiceConfigsRequest):
request (Union[google.cloud.servicemanagement_v1.types.ListServiceConfigsRequest, dict]):
The request object. Request message for
ListServiceConfigs method.
service_name (str):
Expand Down Expand Up @@ -863,7 +863,7 @@ def list_service_configs(

def get_service_config(
self,
request: servicemanager.GetServiceConfigRequest = None,
request: Union[servicemanager.GetServiceConfigRequest, dict] = None,
*,
service_name: str = None,
config_id: str = None,
Expand All @@ -876,7 +876,7 @@ def get_service_config(
service.
Args:
request (google.cloud.servicemanagement_v1.types.GetServiceConfigRequest):
request (Union[google.cloud.servicemanagement_v1.types.GetServiceConfigRequest, dict]):
The request object. Request message for GetServiceConfig
method.
service_name (str):
Expand Down Expand Up @@ -971,7 +971,7 @@ def get_service_config(

def create_service_config(
self,
request: servicemanager.CreateServiceConfigRequest = None,
request: Union[servicemanager.CreateServiceConfigRequest, dict] = None,
*,
service_name: str = None,
service_config: service_pb2.Service = None,
Expand All @@ -990,7 +990,7 @@ def create_service_config(
rest will be deleted eventually.
Args:
request (google.cloud.servicemanagement_v1.types.CreateServiceConfigRequest):
request (Union[google.cloud.servicemanagement_v1.types.CreateServiceConfigRequest, dict]):
The request object. Request message for
CreateServiceConfig method.
service_name (str):
Expand Down Expand Up @@ -1073,7 +1073,7 @@ def create_service_config(

def submit_config_source(
self,
request: servicemanager.SubmitConfigSourceRequest = None,
request: Union[servicemanager.SubmitConfigSourceRequest, dict] = None,
*,
service_name: str = None,
config_source: resources.ConfigSource = None,
Expand All @@ -1097,7 +1097,7 @@ def submit_config_source(
Operation<response: SubmitConfigSourceResponse>
Args:
request (google.cloud.servicemanagement_v1.types.SubmitConfigSourceRequest):
request (Union[google.cloud.servicemanagement_v1.types.SubmitConfigSourceRequest, dict]):
The request object. Request message for
SubmitConfigSource method.
service_name (str):
Expand Down Expand Up @@ -1185,7 +1185,7 @@ def submit_config_source(

def list_service_rollouts(
self,
request: servicemanager.ListServiceRolloutsRequest = None,
request: Union[servicemanager.ListServiceRolloutsRequest, dict] = None,
*,
service_name: str = None,
filter: str = None,
Expand All @@ -1198,7 +1198,7 @@ def list_service_rollouts(
oldest.
Args:
request (google.cloud.servicemanagement_v1.types.ListServiceRolloutsRequest):
request (Union[google.cloud.servicemanagement_v1.types.ListServiceRolloutsRequest, dict]):
The request object. Request message for
'ListServiceRollouts'
service_name (str):
Expand Down Expand Up @@ -1280,7 +1280,7 @@ def list_service_rollouts(

def get_service_rollout(
self,
request: servicemanager.GetServiceRolloutRequest = None,
request: Union[servicemanager.GetServiceRolloutRequest, dict] = None,
*,
service_name: str = None,
rollout_id: str = None,
Expand All @@ -1292,7 +1292,7 @@ def get_service_rollout(
[rollout][google.api.servicemanagement.v1.Rollout].
Args:
request (google.cloud.servicemanagement_v1.types.GetServiceRolloutRequest):
request (Union[google.cloud.servicemanagement_v1.types.GetServiceRolloutRequest, dict]):
The request object. Request message for
GetServiceRollout method.
service_name (str):
Expand Down Expand Up @@ -1362,7 +1362,7 @@ def get_service_rollout(

def create_service_rollout(
self,
request: servicemanager.CreateServiceRolloutRequest = None,
request: Union[servicemanager.CreateServiceRolloutRequest, dict] = None,
*,
service_name: str = None,
rollout: resources.Rollout = None,
Expand All @@ -1389,7 +1389,7 @@ def create_service_rollout(
Operation<response: Rollout>
Args:
request (google.cloud.servicemanagement_v1.types.CreateServiceRolloutRequest):
request (Union[google.cloud.servicemanagement_v1.types.CreateServiceRolloutRequest, dict]):
The request object. Request message for
'CreateServiceRollout'
service_name (str):
Expand Down Expand Up @@ -1467,7 +1467,7 @@ def create_service_rollout(

def generate_config_report(
self,
request: servicemanager.GenerateConfigReportRequest = None,
request: Union[servicemanager.GenerateConfigReportRequest, dict] = None,
*,
new_config: any_pb2.Any = None,
old_config: any_pb2.Any = None,
Expand All @@ -1489,7 +1489,7 @@ def generate_config_report(
the last pushed service configuration.
Args:
request (google.cloud.servicemanagement_v1.types.GenerateConfigReportRequest):
request (Union[google.cloud.servicemanagement_v1.types.GenerateConfigReportRequest, dict]):
The request object. Request message for
GenerateConfigReport method.
new_config (google.protobuf.any_pb2.Any):
Expand Down Expand Up @@ -1561,7 +1561,7 @@ def generate_config_report(

def enable_service(
self,
request: servicemanager.EnableServiceRequest = None,
request: Union[servicemanager.EnableServiceRequest, dict] = None,
*,
service_name: str = None,
consumer_id: str = None,
Expand All @@ -1578,7 +1578,7 @@ def enable_service(
Operation<response: EnableServiceResponse>
Args:
request (google.cloud.servicemanagement_v1.types.EnableServiceRequest):
request (Union[google.cloud.servicemanagement_v1.types.EnableServiceRequest, dict]):
The request object. Request message for EnableService
method.
service_name (str):
Expand Down Expand Up @@ -1666,7 +1666,7 @@ def enable_service(

def disable_service(
self,
request: servicemanager.DisableServiceRequest = None,
request: Union[servicemanager.DisableServiceRequest, dict] = None,
*,
service_name: str = None,
consumer_id: str = None,
Expand All @@ -1683,7 +1683,7 @@ def disable_service(
Operation<response: DisableServiceResponse>
Args:
request (google.cloud.servicemanagement_v1.types.DisableServiceRequest):
request (Union[google.cloud.servicemanagement_v1.types.DisableServiceRequest, dict]):
The request object. Request message for DisableService
method.
service_name (str):
Expand Down
Expand Up @@ -126,7 +126,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 @@ -85,16 +85,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 @@ -132,16 +132,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
32 changes: 16 additions & 16 deletions scripts/fixup_servicemanagement_v1_keywords.py
Expand Up @@ -39,21 +39,21 @@ def partition(
class servicemanagementCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'create_service': ('service', ),
'create_service_config': ('service_name', 'service_config', ),
'create_service_rollout': ('service_name', 'rollout', ),
'delete_service': ('service_name', ),
'disable_service': ('service_name', 'consumer_id', ),
'enable_service': ('service_name', 'consumer_id', ),
'generate_config_report': ('new_config', 'old_config', ),
'get_service': ('service_name', ),
'get_service_config': ('service_name', 'config_id', 'view', ),
'get_service_rollout': ('service_name', 'rollout_id', ),
'list_service_configs': ('service_name', 'page_token', 'page_size', ),
'list_service_rollouts': ('service_name', 'filter', 'page_token', 'page_size', ),
'list_services': ('producer_project_id', 'page_size', 'page_token', 'consumer_id', ),
'submit_config_source': ('service_name', 'config_source', 'validate_only', ),
'undelete_service': ('service_name', ),
'create_service': ('service', ),
'create_service_config': ('service_name', 'service_config', ),
'create_service_rollout': ('service_name', 'rollout', ),
'delete_service': ('service_name', ),
'disable_service': ('service_name', 'consumer_id', ),
'enable_service': ('service_name', 'consumer_id', ),
'generate_config_report': ('new_config', 'old_config', ),
'get_service': ('service_name', ),
'get_service_config': ('service_name', 'config_id', 'view', ),
'get_service_rollout': ('service_name', 'rollout_id', ),
'list_service_configs': ('service_name', 'page_token', 'page_size', ),
'list_service_rollouts': ('service_name', 'filter', 'page_token', 'page_size', ),
'list_services': ('producer_project_id', 'page_size', 'page_token', 'consumer_id', ),
'submit_config_source': ('service_name', 'config_source', 'validate_only', ),
'undelete_service': ('service_name', ),
}

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

Please sign in to comment.