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

Commit

Permalink
chore: Update gapic-generator-python to v1.6.1 (#248)
Browse files Browse the repository at this point in the history
* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

Source-Link: googleapis/googleapis-gen@c8aa327
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

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

* update version in gapic_version.py

* add .release-please-manifest.json with correct version

* add owlbot.py to exclude generated gapic_version.py

* set manifest to true in .github/release-please.yml

* add release-please-config.json

* 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

* chore: Update gapic-generator-python to v1.6.1

PiperOrigin-RevId: 488036204

Source-Link: googleapis/googleapis@08f275f

Source-Link: googleapis/googleapis-gen@555c094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9

* 🦉 Updates from OwlBot post-processor

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

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 25, 2022
1 parent 754bbcf commit 0980ecc
Show file tree
Hide file tree
Showing 51 changed files with 1,564 additions and 1,196 deletions.
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.12.4"
}
1 change: 0 additions & 1 deletion docs/osconfig_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Osconfig v1 API

.. automodule:: google.cloud.osconfig_v1.types
:members:
:undoc-members:
:show-inheritance:
1 change: 0 additions & 1 deletion docs/osconfig_v1alpha/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Osconfig v1alpha API

.. automodule:: google.cloud.osconfig_v1alpha.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions google/cloud/osconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.osconfig import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.osconfig_v1.services.os_config_service.async_client import (
OsConfigServiceAsyncClient,
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/osconfig/gapic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.12.4" # {x-release-please-version}
4 changes: 4 additions & 0 deletions google/cloud/osconfig_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.osconfig import gapic_version as package_version

__version__ = package_version.__version__


from .services.os_config_service import (
OsConfigServiceAsyncClient,
Expand Down
130 changes: 78 additions & 52 deletions google/cloud/osconfig_v1/services/os_config_service/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 @@ -173,9 +183,9 @@ def transport(self) -> OsConfigServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, OsConfigServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the os config service client.
Expand Down Expand Up @@ -219,10 +229,10 @@ def __init__(

async def execute_patch_job(
self,
request: Union[patch_jobs.ExecutePatchJobRequest, dict] = None,
request: Optional[Union[patch_jobs.ExecutePatchJobRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> patch_jobs.PatchJob:
r"""Patch VM instances by creating and running a patch
Expand Down Expand Up @@ -255,7 +265,7 @@ async def sample_execute_patch_job():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.ExecutePatchJobRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.ExecutePatchJobRequest, dict]]):
The request object. A request message to initiate
patching across Compute Engine instances.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -308,11 +318,11 @@ async def sample_execute_patch_job():

async def get_patch_job(
self,
request: Union[patch_jobs.GetPatchJobRequest, dict] = None,
request: Optional[Union[patch_jobs.GetPatchJobRequest, 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]] = (),
) -> patch_jobs.PatchJob:
r"""Get the patch job. This can be used to track the
Expand Down Expand Up @@ -346,7 +356,7 @@ async def sample_get_patch_job():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.GetPatchJobRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.GetPatchJobRequest, dict]]):
The request object. Request to get an active or
completed patch job.
name (:class:`str`):
Expand Down Expand Up @@ -420,10 +430,10 @@ async def sample_get_patch_job():

async def cancel_patch_job(
self,
request: Union[patch_jobs.CancelPatchJobRequest, dict] = None,
request: Optional[Union[patch_jobs.CancelPatchJobRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> patch_jobs.PatchJob:
r"""Cancel a patch job. The patch job must be active.
Expand Down Expand Up @@ -456,7 +466,7 @@ async def sample_cancel_patch_job():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.CancelPatchJobRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.CancelPatchJobRequest, dict]]):
The request object. Message for canceling a patch job.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -508,11 +518,11 @@ async def sample_cancel_patch_job():

async def list_patch_jobs(
self,
request: Union[patch_jobs.ListPatchJobsRequest, dict] = None,
request: Optional[Union[patch_jobs.ListPatchJobsRequest, 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.ListPatchJobsAsyncPager:
r"""Get a list of patch jobs.
Expand Down Expand Up @@ -545,7 +555,7 @@ async def sample_list_patch_jobs():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.ListPatchJobsRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.ListPatchJobsRequest, dict]]):
The request object. A request message for listing patch
jobs.
parent (:class:`str`):
Expand Down Expand Up @@ -621,11 +631,13 @@ async def sample_list_patch_jobs():

async def list_patch_job_instance_details(
self,
request: Union[patch_jobs.ListPatchJobInstanceDetailsRequest, dict] = None,
request: Optional[
Union[patch_jobs.ListPatchJobInstanceDetailsRequest, 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.ListPatchJobInstanceDetailsAsyncPager:
r"""Get a list of instance details for a given patch job.
Expand Down Expand Up @@ -658,7 +670,7 @@ async def sample_list_patch_job_instance_details():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.ListPatchJobInstanceDetailsRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.ListPatchJobInstanceDetailsRequest, dict]]):
The request object. Request to list details for all
instances that are part of a patch job.
parent (:class:`str`):
Expand Down Expand Up @@ -736,13 +748,15 @@ async def sample_list_patch_job_instance_details():

async def create_patch_deployment(
self,
request: Union[patch_deployments.CreatePatchDeploymentRequest, dict] = None,
request: Optional[
Union[patch_deployments.CreatePatchDeploymentRequest, dict]
] = None,
*,
parent: str = None,
patch_deployment: patch_deployments.PatchDeployment = None,
patch_deployment_id: str = None,
parent: Optional[str] = None,
patch_deployment: Optional[patch_deployments.PatchDeployment] = None,
patch_deployment_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> patch_deployments.PatchDeployment:
r"""Create an OS Config patch deployment.
Expand Down Expand Up @@ -775,7 +789,7 @@ async def sample_create_patch_deployment():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.CreatePatchDeploymentRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.CreatePatchDeploymentRequest, dict]]):
The request object. A request message for creating a
patch deployment.
parent (:class:`str`):
Expand Down Expand Up @@ -870,11 +884,13 @@ async def sample_create_patch_deployment():

async def get_patch_deployment(
self,
request: Union[patch_deployments.GetPatchDeploymentRequest, dict] = None,
request: Optional[
Union[patch_deployments.GetPatchDeploymentRequest, 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]] = (),
) -> patch_deployments.PatchDeployment:
r"""Get an OS Config patch deployment.
Expand Down Expand Up @@ -906,7 +922,7 @@ async def sample_get_patch_deployment():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.GetPatchDeploymentRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.GetPatchDeploymentRequest, dict]]):
The request object. A request message for retrieving a
patch deployment.
name (:class:`str`):
Expand Down Expand Up @@ -976,11 +992,13 @@ async def sample_get_patch_deployment():

async def list_patch_deployments(
self,
request: Union[patch_deployments.ListPatchDeploymentsRequest, dict] = None,
request: Optional[
Union[patch_deployments.ListPatchDeploymentsRequest, 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.ListPatchDeploymentsAsyncPager:
r"""Get a page of OS Config patch deployments.
Expand Down Expand Up @@ -1013,7 +1031,7 @@ async def sample_list_patch_deployments():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.ListPatchDeploymentsRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.ListPatchDeploymentsRequest, dict]]):
The request object. A request message for listing patch
deployments.
parent (:class:`str`):
Expand Down Expand Up @@ -1091,11 +1109,13 @@ async def sample_list_patch_deployments():

async def delete_patch_deployment(
self,
request: Union[patch_deployments.DeletePatchDeploymentRequest, dict] = None,
request: Optional[
Union[patch_deployments.DeletePatchDeploymentRequest, 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"""Delete an OS Config patch deployment.
Expand Down Expand Up @@ -1124,7 +1144,7 @@ async def sample_delete_patch_deployment():
await client.delete_patch_deployment(request=request)
Args:
request (Union[google.cloud.osconfig_v1.types.DeletePatchDeploymentRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.DeletePatchDeploymentRequest, dict]]):
The request object. A request message for deleting a
patch deployment.
name (:class:`str`):
Expand Down Expand Up @@ -1181,12 +1201,14 @@ async def sample_delete_patch_deployment():

async def update_patch_deployment(
self,
request: Union[patch_deployments.UpdatePatchDeploymentRequest, dict] = None,
request: Optional[
Union[patch_deployments.UpdatePatchDeploymentRequest, dict]
] = None,
*,
patch_deployment: patch_deployments.PatchDeployment = None,
update_mask: field_mask_pb2.FieldMask = None,
patch_deployment: Optional[patch_deployments.PatchDeployment] = 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]] = (),
) -> patch_deployments.PatchDeployment:
r"""Update an OS Config patch deployment.
Expand Down Expand Up @@ -1217,7 +1239,7 @@ async def sample_update_patch_deployment():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.UpdatePatchDeploymentRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.UpdatePatchDeploymentRequest, dict]]):
The request object. A request message for updating a
patch deployment.
patch_deployment (:class:`google.cloud.osconfig_v1.types.PatchDeployment`):
Expand Down Expand Up @@ -1299,11 +1321,13 @@ async def sample_update_patch_deployment():

async def pause_patch_deployment(
self,
request: Union[patch_deployments.PausePatchDeploymentRequest, dict] = None,
request: Optional[
Union[patch_deployments.PausePatchDeploymentRequest, 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]] = (),
) -> patch_deployments.PatchDeployment:
r"""Change state of patch deployment to "PAUSED".
Expand Down Expand Up @@ -1337,7 +1361,7 @@ async def sample_pause_patch_deployment():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.PausePatchDeploymentRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.PausePatchDeploymentRequest, dict]]):
The request object. A request message for pausing a
patch deployment.
name (:class:`str`):
Expand Down Expand Up @@ -1407,11 +1431,13 @@ async def sample_pause_patch_deployment():

async def resume_patch_deployment(
self,
request: Union[patch_deployments.ResumePatchDeploymentRequest, dict] = None,
request: Optional[
Union[patch_deployments.ResumePatchDeploymentRequest, 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]] = (),
) -> patch_deployments.PatchDeployment:
r"""Change state of patch deployment back to "ACTIVE".
Expand Down Expand Up @@ -1445,7 +1471,7 @@ async def sample_resume_patch_deployment():
print(response)
Args:
request (Union[google.cloud.osconfig_v1.types.ResumePatchDeploymentRequest, dict]):
request (Optional[Union[google.cloud.osconfig_v1.types.ResumePatchDeploymentRequest, dict]]):
The request object. A request message for resuming a
patch deployment.
name (:class:`str`):
Expand Down
Loading

0 comments on commit 0980ecc

Please sign in to comment.