Skip to content

Commit

Permalink
chore: Update to gapic-generator-python 1.6.0 (#216)
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

* 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

* 🦉 Updates from OwlBot post-processor

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

* 🦉 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 <[email protected]>
  • Loading branch information
3 people authored Nov 12, 2022
1 parent 40ceafe commit a476b64
Show file tree
Hide file tree
Showing 17 changed files with 428 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Assuredworkloads v1 API

.. automodule:: google.cloud.assuredworkloads_v1.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Assuredworkloads v1beta1 API

.. automodule:: google.cloud.assuredworkloads_v1beta1.types
:members:
:undoc-members:
:show-inheritance:
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 @@ -176,9 +186,9 @@ def transport(self) -> AssuredWorkloadsServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, AssuredWorkloadsServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the assured workloads service client.
Expand Down Expand Up @@ -222,12 +232,12 @@ def __init__(

async def create_workload(
self,
request: Union[assuredworkloads.CreateWorkloadRequest, dict] = None,
request: Optional[Union[assuredworkloads.CreateWorkloadRequest, dict]] = None,
*,
parent: str = None,
workload: assuredworkloads.Workload = None,
parent: Optional[str] = None,
workload: Optional[assuredworkloads.Workload] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Creates Assured Workload.
Expand Down Expand Up @@ -268,7 +278,7 @@ async def sample_create_workload():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.CreateWorkloadRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.CreateWorkloadRequest, dict]]):
The request object. Request for creating a workload.
parent (:class:`str`):
Required. The resource name of the new Workload's
Expand Down Expand Up @@ -351,12 +361,12 @@ async def sample_create_workload():

async def update_workload(
self,
request: Union[assuredworkloads.UpdateWorkloadRequest, dict] = None,
request: Optional[Union[assuredworkloads.UpdateWorkloadRequest, dict]] = None,
*,
workload: assuredworkloads.Workload = None,
update_mask: field_mask_pb2.FieldMask = None,
workload: Optional[assuredworkloads.Workload] = 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]] = (),
) -> assuredworkloads.Workload:
r"""Updates an existing workload. Currently allows updating of
Expand Down Expand Up @@ -395,7 +405,7 @@ async def sample_update_workload():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.UpdateWorkloadRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.UpdateWorkloadRequest, dict]]):
The request object. Request for Updating a workload.
workload (:class:`google.cloud.assuredworkloads_v1.types.Workload`):
Required. The workload to update. The workload's
Expand Down Expand Up @@ -473,10 +483,12 @@ async def sample_update_workload():

async def restrict_allowed_resources(
self,
request: Union[assuredworkloads.RestrictAllowedResourcesRequest, dict] = None,
request: Optional[
Union[assuredworkloads.RestrictAllowedResourcesRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> assuredworkloads.RestrictAllowedResourcesResponse:
r"""Restrict the list of resources allowed in the
Expand Down Expand Up @@ -516,7 +528,7 @@ async def sample_restrict_allowed_resources():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.RestrictAllowedResourcesRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.RestrictAllowedResourcesRequest, dict]]):
The request object. Request for restricting list of
available resources in Workload environment.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -561,11 +573,11 @@ async def sample_restrict_allowed_resources():

async def delete_workload(
self,
request: Union[assuredworkloads.DeleteWorkloadRequest, dict] = None,
request: Optional[Union[assuredworkloads.DeleteWorkloadRequest, 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]] = (),
) -> None:
r"""Deletes the workload. Make sure that workload's direct children
Expand Down Expand Up @@ -596,7 +608,7 @@ async def sample_delete_workload():
await client.delete_workload(request=request)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.DeleteWorkloadRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.DeleteWorkloadRequest, dict]]):
The request object. Request for deleting a Workload.
name (:class:`str`):
Required. The ``name`` field is used to identify the
Expand Down Expand Up @@ -653,11 +665,11 @@ async def sample_delete_workload():

async def get_workload(
self,
request: Union[assuredworkloads.GetWorkloadRequest, dict] = None,
request: Optional[Union[assuredworkloads.GetWorkloadRequest, 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]] = (),
) -> assuredworkloads.Workload:
r"""Gets Assured Workload associated with a CRM Node
Expand Down Expand Up @@ -689,7 +701,7 @@ async def sample_get_workload():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.GetWorkloadRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.GetWorkloadRequest, dict]]):
The request object. Request for fetching a workload.
name (:class:`str`):
Required. The resource name of the Workload to fetch.
Expand Down Expand Up @@ -758,11 +770,11 @@ async def sample_get_workload():

async def list_workloads(
self,
request: Union[assuredworkloads.ListWorkloadsRequest, dict] = None,
request: Optional[Union[assuredworkloads.ListWorkloadsRequest, 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.ListWorkloadsAsyncPager:
r"""Lists Assured Workloads under a CRM Node.
Expand Down Expand Up @@ -795,7 +807,7 @@ async def sample_list_workloads():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.ListWorkloadsRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.ListWorkloadsRequest, dict]]):
The request object. Request for fetching workloads in an
organization.
parent (:class:`str`):
Expand Down Expand Up @@ -873,11 +885,11 @@ async def sample_list_workloads():

async def list_violations(
self,
request: Union[assuredworkloads.ListViolationsRequest, dict] = None,
request: Optional[Union[assuredworkloads.ListViolationsRequest, 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.ListViolationsAsyncPager:
r"""Lists the Violations in the AssuredWorkload Environment. Callers
Expand Down Expand Up @@ -915,7 +927,7 @@ async def sample_list_violations():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.ListViolationsRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.ListViolationsRequest, dict]]):
The request object. Request for fetching violations in
an organization.
parent (:class:`str`):
Expand Down Expand Up @@ -986,11 +998,11 @@ async def sample_list_violations():

async def get_violation(
self,
request: Union[assuredworkloads.GetViolationRequest, dict] = None,
request: Optional[Union[assuredworkloads.GetViolationRequest, 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]] = (),
) -> assuredworkloads.Violation:
r"""Retrieves Assured Workload Violation based on ID.
Expand Down Expand Up @@ -1022,7 +1034,7 @@ async def sample_get_violation():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.GetViolationRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.GetViolationRequest, dict]]):
The request object. Request for fetching a Workload
Violation.
name (:class:`str`):
Expand Down Expand Up @@ -1082,10 +1094,12 @@ async def sample_get_violation():

async def acknowledge_violation(
self,
request: Union[assuredworkloads.AcknowledgeViolationRequest, dict] = None,
request: Optional[
Union[assuredworkloads.AcknowledgeViolationRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> assuredworkloads.AcknowledgeViolationResponse:
r"""Acknowledges an existing violation. By acknowledging
Expand Down Expand Up @@ -1123,7 +1137,7 @@ async def sample_acknowledge_violation():
print(response)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.AcknowledgeViolationRequest, dict]):
request (Optional[Union[google.cloud.assuredworkloads_v1.types.AcknowledgeViolationRequest, dict]]):
The request object. Request for acknowledging the
violation Next Id: 4
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1162,10 +1176,10 @@ async def sample_acknowledge_violation():

async def list_operations(
self,
request: operations_pb2.ListOperationsRequest = None,
request: Optional[operations_pb2.ListOperationsRequest] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operations_pb2.ListOperationsResponse:
r"""Lists operations that match the specified filter in the request.
Expand Down Expand Up @@ -1216,10 +1230,10 @@ async def list_operations(

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 a476b64

Please sign in to comment.