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 (#30)
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

* update path to snippet metadata json

* fix docs build

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 899cd48 commit d336d7d
Show file tree
Hide file tree
Showing 11 changed files with 184 additions and 154 deletions.
1 change: 0 additions & 1 deletion docs/api_keys_v2/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Api Keys v2 API

.. automodule:: google.cloud.api_keys_v2.types
:members:
:undoc-members:
:show-inheritance:
86 changes: 48 additions & 38 deletions google/cloud/api_keys_v2/services/api_keys/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
Expand Down Expand Up @@ -158,9 +168,9 @@ def transport(self) -> ApiKeysTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, ApiKeysTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the api keys client.
Expand Down Expand Up @@ -204,13 +214,13 @@ def __init__(

async def create_key(
self,
request: Union[apikeys.CreateKeyRequest, dict] = None,
request: Optional[Union[apikeys.CreateKeyRequest, dict]] = None,
*,
parent: str = None,
key: resources.Key = None,
key_id: str = None,
parent: Optional[str] = None,
key: Optional[resources.Key] = None,
key_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Creates a new API key.
Expand Down Expand Up @@ -249,7 +259,7 @@ async def sample_create_key():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.CreateKeyRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.CreateKeyRequest, dict]]):
The request object. Request message for `CreateKey`
method.
parent (:class:`str`):
Expand Down Expand Up @@ -353,11 +363,11 @@ async def sample_create_key():

async def list_keys(
self,
request: Union[apikeys.ListKeysRequest, dict] = None,
request: Optional[Union[apikeys.ListKeysRequest, 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.ListKeysAsyncPager:
r"""Lists the API keys owned by a project. The key string of the API
Expand Down Expand Up @@ -394,7 +404,7 @@ async def sample_list_keys():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.ListKeysRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.ListKeysRequest, dict]]):
The request object. Request message for `ListKeys`
method.
parent (:class:`str`):
Expand Down Expand Up @@ -471,11 +481,11 @@ async def sample_list_keys():

async def get_key(
self,
request: Union[apikeys.GetKeyRequest, dict] = None,
request: Optional[Union[apikeys.GetKeyRequest, 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]] = (),
) -> resources.Key:
r"""Gets the metadata for an API key. The key string of the API key
Expand Down Expand Up @@ -511,7 +521,7 @@ async def sample_get_key():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.GetKeyRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.GetKeyRequest, dict]]):
The request object. Request message for `GetKey` method.
name (:class:`str`):
Required. The resource name of the
Expand Down Expand Up @@ -576,11 +586,11 @@ async def sample_get_key():

async def get_key_string(
self,
request: Union[apikeys.GetKeyStringRequest, dict] = None,
request: Optional[Union[apikeys.GetKeyStringRequest, 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]] = (),
) -> apikeys.GetKeyStringResponse:
r"""Get the key string for an API key.
Expand Down Expand Up @@ -615,7 +625,7 @@ async def sample_get_key_string():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.GetKeyStringRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.GetKeyStringRequest, dict]]):
The request object. Request message for `GetKeyString`
method.
name (:class:`str`):
Expand Down Expand Up @@ -679,12 +689,12 @@ async def sample_get_key_string():

async def update_key(
self,
request: Union[apikeys.UpdateKeyRequest, dict] = None,
request: Optional[Union[apikeys.UpdateKeyRequest, dict]] = None,
*,
key: resources.Key = None,
update_mask: field_mask_pb2.FieldMask = None,
key: Optional[resources.Key] = 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_async.AsyncOperation:
r"""Patches the modifiable fields of an API key. The key string of
Expand Down Expand Up @@ -723,7 +733,7 @@ async def sample_update_key():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.UpdateKeyRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.UpdateKeyRequest, dict]]):
The request object. Request message for `UpdateKey`
method.
key (:class:`google.cloud.api_keys_v2.types.Key`):
Expand Down Expand Up @@ -817,11 +827,11 @@ async def sample_update_key():

async def delete_key(
self,
request: Union[apikeys.DeleteKeyRequest, dict] = None,
request: Optional[Union[apikeys.DeleteKeyRequest, 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_async.AsyncOperation:
r"""Deletes an API key. Deleted key can be retrieved within 30 days
Expand Down Expand Up @@ -861,7 +871,7 @@ async def sample_delete_key():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.DeleteKeyRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.DeleteKeyRequest, dict]]):
The request object. Request message for `DeleteKey`
method.
name (:class:`str`):
Expand Down Expand Up @@ -938,10 +948,10 @@ async def sample_delete_key():

async def undelete_key(
self,
request: Union[apikeys.UndeleteKeyRequest, dict] = None,
request: Optional[Union[apikeys.UndeleteKeyRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Undeletes an API key which was deleted within 30 days.
Expand Down Expand Up @@ -980,7 +990,7 @@ async def sample_undelete_key():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.UndeleteKeyRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.UndeleteKeyRequest, dict]]):
The request object. Request message for `UndeleteKey`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1036,10 +1046,10 @@ async def sample_undelete_key():

async def lookup_key(
self,
request: Union[apikeys.LookupKeyRequest, dict] = None,
request: Optional[Union[apikeys.LookupKeyRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> apikeys.LookupKeyResponse:
r"""Find the parent project and resource name of the API key that
Expand Down Expand Up @@ -1075,7 +1085,7 @@ async def sample_lookup_key():
print(response)
Args:
request (Union[google.cloud.api_keys_v2.types.LookupKeyRequest, dict]):
request (Optional[Union[google.cloud.api_keys_v2.types.LookupKeyRequest, dict]]):
The request object. Request message for `LookupKey`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1112,10 +1122,10 @@ async def sample_lookup_key():

async def get_operation(
self,
request: operations_pb2.GetOperationRequest = None,
request: Optional[operations_pb2.GetOperationRequest] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operations_pb2.Operation:
r"""Gets the latest state of a long-running operation.
Expand Down
Loading

0 comments on commit d336d7d

Please sign in to comment.