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

Commit

Permalink
chore: Update to gapic-generator-python 1.6.0 (#184)
Browse files Browse the repository at this point in the history
* chore: Update to gapic-generator-python 1.6.0

feat(python): Add typing to proto.Message based class attributes

feat(python): Snippetgen handling of repeated enum field

PiperOrigin-RevId: 487326846

Source-Link: googleapis/googleapis@da380c7

Source-Link: googleapis/googleapis-gen@61ef576
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: new APIs added to reflect updates to the filestore service

- Add ENTERPRISE Tier
- Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot
- Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare
- Add ConnectMode to NetworkConfig (for Private Service Access support)
- New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING)
- Add SuspensionReason (for KMS related suspension)
- Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled

PiperOrigin-RevId: 487492758

Source-Link: googleapis/googleapis@5be5981

Source-Link: googleapis/googleapis-gen@ab0e217
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix docs build

* update path to snippet metadata json

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Nov 12, 2022
1 parent b1417a2 commit 7b87c92
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 252 deletions.
1 change: 0 additions & 1 deletion docs/apigateway_v1/types.rst
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Apigateway v1 API

.. automodule:: google.cloud.apigateway_v1.types
:members:
:undoc-members:
:show-inheritance:

Large diffs are not rendered by default.

125 changes: 68 additions & 57 deletions google/cloud/apigateway_v1/services/api_gateway_service/client.py
Expand Up @@ -16,7 +16,18 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)

from google.api_core import client_options as client_options_lib
from google.api_core import exceptions as core_exceptions
Expand Down Expand Up @@ -64,7 +75,7 @@ class ApiGatewayServiceClientMeta(type):

def get_transport_class(
cls,
label: str = None,
label: Optional[str] = None,
) -> Type[ApiGatewayServiceTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -434,7 +445,7 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, ApiGatewayServiceTransport, None] = None,
transport: Optional[Union[str, ApiGatewayServiceTransport]] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
Expand Down Expand Up @@ -532,11 +543,11 @@ def __init__(

def list_gateways(
self,
request: Union[apigateway.ListGatewaysRequest, dict] = None,
request: Optional[Union[apigateway.ListGatewaysRequest, dict]] = None,
*,
parent: str = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListGatewaysPager:
r"""Lists Gateways in a given project and location.
Expand Down Expand Up @@ -647,11 +658,11 @@ def sample_list_gateways():

def get_gateway(
self,
request: Union[apigateway.GetGatewayRequest, dict] = None,
request: Optional[Union[apigateway.GetGatewayRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> apigateway.Gateway:
r"""Gets details of a single Gateway.
Expand Down Expand Up @@ -753,13 +764,13 @@ def sample_get_gateway():

def create_gateway(
self,
request: Union[apigateway.CreateGatewayRequest, dict] = None,
request: Optional[Union[apigateway.CreateGatewayRequest, dict]] = None,
*,
parent: str = None,
gateway: apigateway.Gateway = None,
gateway_id: str = None,
parent: Optional[str] = None,
gateway: Optional[apigateway.Gateway] = None,
gateway_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Creates a new Gateway in a given project and
Expand Down Expand Up @@ -896,12 +907,12 @@ def sample_create_gateway():

def update_gateway(
self,
request: Union[apigateway.UpdateGatewayRequest, dict] = None,
request: Optional[Union[apigateway.UpdateGatewayRequest, dict]] = None,
*,
gateway: apigateway.Gateway = None,
update_mask: field_mask_pb2.FieldMask = None,
gateway: Optional[apigateway.Gateway] = None,
update_mask: Optional[field_mask_pb2.FieldMask] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Updates the parameters of a single Gateway.
Expand Down Expand Up @@ -1031,11 +1042,11 @@ def sample_update_gateway():

def delete_gateway(
self,
request: Union[apigateway.DeleteGatewayRequest, dict] = None,
request: Optional[Union[apigateway.DeleteGatewayRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Deletes a single Gateway.
Expand Down Expand Up @@ -1155,11 +1166,11 @@ def sample_delete_gateway():

def list_apis(
self,
request: Union[apigateway.ListApisRequest, dict] = None,
request: Optional[Union[apigateway.ListApisRequest, dict]] = None,
*,
parent: str = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListApisPager:
r"""Lists Apis in a given project and location.
Expand Down Expand Up @@ -1270,11 +1281,11 @@ def sample_list_apis():

def get_api(
self,
request: Union[apigateway.GetApiRequest, dict] = None,
request: Optional[Union[apigateway.GetApiRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> apigateway.Api:
r"""Gets details of a single Api.
Expand Down Expand Up @@ -1372,13 +1383,13 @@ def sample_get_api():

def create_api(
self,
request: Union[apigateway.CreateApiRequest, dict] = None,
request: Optional[Union[apigateway.CreateApiRequest, dict]] = None,
*,
parent: str = None,
api: apigateway.Api = None,
api_id: str = None,
parent: Optional[str] = None,
api: Optional[apigateway.Api] = None,
api_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Creates a new Api in a given project and location.
Expand Down Expand Up @@ -1509,12 +1520,12 @@ def sample_create_api():

def update_api(
self,
request: Union[apigateway.UpdateApiRequest, dict] = None,
request: Optional[Union[apigateway.UpdateApiRequest, dict]] = None,
*,
api: apigateway.Api = None,
update_mask: field_mask_pb2.FieldMask = None,
api: Optional[apigateway.Api] = None,
update_mask: Optional[field_mask_pb2.FieldMask] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Updates the parameters of a single Api.
Expand Down Expand Up @@ -1637,11 +1648,11 @@ def sample_update_api():

def delete_api(
self,
request: Union[apigateway.DeleteApiRequest, dict] = None,
request: Optional[Union[apigateway.DeleteApiRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Deletes a single Api.
Expand Down Expand Up @@ -1761,11 +1772,11 @@ def sample_delete_api():

def list_api_configs(
self,
request: Union[apigateway.ListApiConfigsRequest, dict] = None,
request: Optional[Union[apigateway.ListApiConfigsRequest, dict]] = None,
*,
parent: str = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListApiConfigsPager:
r"""Lists ApiConfigs in a given project and location.
Expand Down Expand Up @@ -1876,11 +1887,11 @@ def sample_list_api_configs():

def get_api_config(
self,
request: Union[apigateway.GetApiConfigRequest, dict] = None,
request: Optional[Union[apigateway.GetApiConfigRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> apigateway.ApiConfig:
r"""Gets details of a single ApiConfig.
Expand Down Expand Up @@ -1979,13 +1990,13 @@ def sample_get_api_config():

def create_api_config(
self,
request: Union[apigateway.CreateApiConfigRequest, dict] = None,
request: Optional[Union[apigateway.CreateApiConfigRequest, dict]] = None,
*,
parent: str = None,
api_config: apigateway.ApiConfig = None,
api_config_id: str = None,
parent: Optional[str] = None,
api_config: Optional[apigateway.ApiConfig] = None,
api_config_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Creates a new ApiConfig in a given project and
Expand Down Expand Up @@ -2116,12 +2127,12 @@ def sample_create_api_config():

def update_api_config(
self,
request: Union[apigateway.UpdateApiConfigRequest, dict] = None,
request: Optional[Union[apigateway.UpdateApiConfigRequest, dict]] = None,
*,
api_config: apigateway.ApiConfig = None,
update_mask: field_mask_pb2.FieldMask = None,
api_config: Optional[apigateway.ApiConfig] = None,
update_mask: Optional[field_mask_pb2.FieldMask] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Updates the parameters of a single ApiConfig.
Expand Down Expand Up @@ -2245,11 +2256,11 @@ def sample_update_api_config():

def delete_api_config(
self,
request: Union[apigateway.DeleteApiConfigRequest, dict] = None,
request: Optional[Union[apigateway.DeleteApiConfigRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Deletes a single ApiConfig.
Expand Down
Expand Up @@ -49,7 +49,7 @@ def __init__(
self,
*,
host: str = DEFAULT_HOST,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down
Expand Up @@ -48,14 +48,14 @@ def __init__(
self,
*,
host: str = "apigateway.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
scopes: Sequence[str] = None,
channel: grpc.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[grpc.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
Expand Down Expand Up @@ -183,8 +183,8 @@ def __init__(
def create_channel(
cls,
host: str = "apigateway.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
**kwargs,
Expand Down
Expand Up @@ -50,7 +50,7 @@ class ApiGatewayServiceGrpcAsyncIOTransport(ApiGatewayServiceTransport):
def create_channel(
cls,
host: str = "apigateway.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down Expand Up @@ -93,15 +93,15 @@ def __init__(
self,
*,
host: str = "apigateway.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: aio.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id=None,
channel: Optional[aio.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
Expand Down

0 comments on commit 7b87c92

Please sign in to comment.