Skip to content

Commit

Permalink
chore: Update to gapic-generator-python 1.6.0 (#67)
Browse files Browse the repository at this point in the history
* 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 authored Nov 12, 2022
1 parent 40f0e83 commit 46c2a0e
Show file tree
Hide file tree
Showing 14 changed files with 404 additions and 364 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Bare Metal Solution v2 API

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
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 @@ -72,7 +83,7 @@ class BareMetalSolutionClientMeta(type):

def get_transport_class(
cls,
label: str = None,
label: Optional[str] = None,
) -> Type[BareMetalSolutionTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -468,7 +479,7 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, BareMetalSolutionTransport, None] = None,
transport: Optional[Union[str, BareMetalSolutionTransport]] = 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 @@ -566,11 +577,11 @@ def __init__(

def list_instances(
self,
request: Union[instance.ListInstancesRequest, dict] = None,
request: Optional[Union[instance.ListInstancesRequest, 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.ListInstancesPager:
r"""List servers in a given project and location.
Expand Down Expand Up @@ -681,11 +692,11 @@ def sample_list_instances():

def get_instance(
self,
request: Union[instance.GetInstanceRequest, dict] = None,
request: Optional[Union[instance.GetInstanceRequest, 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]] = (),
) -> instance.Instance:
r"""Get details about a single server.
Expand Down Expand Up @@ -779,12 +790,12 @@ def sample_get_instance():

def update_instance(
self,
request: Union[gcb_instance.UpdateInstanceRequest, dict] = None,
request: Optional[Union[gcb_instance.UpdateInstanceRequest, dict]] = None,
*,
instance: gcb_instance.Instance = None,
update_mask: field_mask_pb2.FieldMask = None,
instance: Optional[gcb_instance.Instance] = 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"""Update details of a single server.
Expand Down Expand Up @@ -911,11 +922,11 @@ def sample_update_instance():

def reset_instance(
self,
request: Union[instance.ResetInstanceRequest, dict] = None,
request: Optional[Union[instance.ResetInstanceRequest, 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"""Perform an ungraceful, hard reset on a server.
Expand Down Expand Up @@ -1028,11 +1039,11 @@ def sample_reset_instance():

def start_instance(
self,
request: Union[instance.StartInstanceRequest, dict] = None,
request: Optional[Union[instance.StartInstanceRequest, 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"""Starts a server that was shutdown.
Expand Down Expand Up @@ -1143,11 +1154,11 @@ def sample_start_instance():

def stop_instance(
self,
request: Union[instance.StopInstanceRequest, dict] = None,
request: Optional[Union[instance.StopInstanceRequest, 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"""Stop a running server.
Expand Down Expand Up @@ -1257,12 +1268,12 @@ def sample_stop_instance():

def detach_lun(
self,
request: Union[gcb_instance.DetachLunRequest, dict] = None,
request: Optional[Union[gcb_instance.DetachLunRequest, dict]] = None,
*,
instance: str = None,
lun: str = None,
instance: Optional[str] = None,
lun: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Detach LUN from Instance.
Expand Down Expand Up @@ -1381,11 +1392,11 @@ def sample_detach_lun():

def list_volumes(
self,
request: Union[volume.ListVolumesRequest, dict] = None,
request: Optional[Union[volume.ListVolumesRequest, 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.ListVolumesPager:
r"""List storage volumes in a given project and location.
Expand Down Expand Up @@ -1496,11 +1507,11 @@ def sample_list_volumes():

def get_volume(
self,
request: Union[volume.GetVolumeRequest, dict] = None,
request: Optional[Union[volume.GetVolumeRequest, 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]] = (),
) -> volume.Volume:
r"""Get details of a single storage volume.
Expand Down Expand Up @@ -1594,12 +1605,12 @@ def sample_get_volume():

def update_volume(
self,
request: Union[gcb_volume.UpdateVolumeRequest, dict] = None,
request: Optional[Union[gcb_volume.UpdateVolumeRequest, dict]] = None,
*,
volume: gcb_volume.Volume = None,
update_mask: field_mask_pb2.FieldMask = None,
volume: Optional[gcb_volume.Volume] = 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"""Update details of a single storage volume.
Expand Down Expand Up @@ -1727,12 +1738,12 @@ def sample_update_volume():

def resize_volume(
self,
request: Union[gcb_volume.ResizeVolumeRequest, dict] = None,
request: Optional[Union[gcb_volume.ResizeVolumeRequest, dict]] = None,
*,
volume: str = None,
size_gib: int = None,
volume: Optional[str] = None,
size_gib: Optional[int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Emergency Volume resize.
Expand Down Expand Up @@ -1849,11 +1860,11 @@ def sample_resize_volume():

def list_networks(
self,
request: Union[network.ListNetworksRequest, dict] = None,
request: Optional[Union[network.ListNetworksRequest, 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.ListNetworksPager:
r"""List network in a given project and location.
Expand Down Expand Up @@ -1964,11 +1975,11 @@ def sample_list_networks():

def list_network_usage(
self,
request: Union[network.ListNetworkUsageRequest, dict] = None,
request: Optional[Union[network.ListNetworkUsageRequest, dict]] = None,
*,
location: str = None,
location: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> network.ListNetworkUsageResponse:
r"""List all Networks (and used IPs for each Network) in
Expand Down Expand Up @@ -2065,11 +2076,11 @@ def sample_list_network_usage():

def get_network(
self,
request: Union[network.GetNetworkRequest, dict] = None,
request: Optional[Union[network.GetNetworkRequest, 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]] = (),
) -> network.Network:
r"""Get details of a single network.
Expand Down Expand Up @@ -2163,12 +2174,12 @@ def sample_get_network():

def update_network(
self,
request: Union[gcb_network.UpdateNetworkRequest, dict] = None,
request: Optional[Union[gcb_network.UpdateNetworkRequest, dict]] = None,
*,
network: gcb_network.Network = None,
update_mask: field_mask_pb2.FieldMask = None,
network: Optional[gcb_network.Network] = 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"""Update details of a single network.
Expand Down Expand Up @@ -2294,11 +2305,11 @@ def sample_update_network():

def get_lun(
self,
request: Union[lun.GetLunRequest, dict] = None,
request: Optional[Union[lun.GetLunRequest, 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]] = (),
) -> lun.Lun:
r"""Get details of a single storage logical unit
Expand Down Expand Up @@ -2395,11 +2406,11 @@ def sample_get_lun():

def list_luns(
self,
request: Union[lun.ListLunsRequest, dict] = None,
request: Optional[Union[lun.ListLunsRequest, 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.ListLunsPager:
r"""List storage volume luns for given storage volume.
Expand Down Expand Up @@ -2510,11 +2521,11 @@ def sample_list_luns():

def get_nfs_share(
self,
request: Union[nfs_share.GetNfsShareRequest, dict] = None,
request: Optional[Union[nfs_share.GetNfsShareRequest, 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]] = (),
) -> nfs_share.NfsShare:
r"""Get details of a single NFS share.
Expand Down Expand Up @@ -2608,11 +2619,11 @@ def sample_get_nfs_share():

def list_nfs_shares(
self,
request: Union[nfs_share.ListNfsSharesRequest, dict] = None,
request: Optional[Union[nfs_share.ListNfsSharesRequest, 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.ListNfsSharesPager:
r"""List NFS shares.
Expand Down Expand Up @@ -2723,12 +2734,12 @@ def sample_list_nfs_shares():

def update_nfs_share(
self,
request: Union[gcb_nfs_share.UpdateNfsShareRequest, dict] = None,
request: Optional[Union[gcb_nfs_share.UpdateNfsShareRequest, dict]] = None,
*,
nfs_share: gcb_nfs_share.NfsShare = None,
update_mask: field_mask_pb2.FieldMask = None,
nfs_share: Optional[gcb_nfs_share.NfsShare] = 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"""Update details of a single NFS share.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def __init__(
self,
*,
host: str = "baremetalsolution.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 @@ -198,8 +198,8 @@ def __init__(
def create_channel(
cls,
host: str = "baremetalsolution.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
Loading

0 comments on commit 46c2a0e

Please sign in to comment.