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 (#295)
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: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44
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: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e
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: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b
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: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f
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 authored Nov 26, 2022
1 parent 4341d15 commit ab1a908
Show file tree
Hide file tree
Showing 35 changed files with 520 additions and 329 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 @@
{
".": "2.7.3"
}
1 change: 0 additions & 1 deletion docs/scheduler_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Scheduler v1 API

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

.. automodule:: google.cloud.scheduler_v1beta1.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions google/cloud/scheduler/__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.scheduler import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.scheduler_v1.services.cloud_scheduler.async_client import (
CloudSchedulerAsyncClient,
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/scheduler/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__ = "2.7.3" # {x-release-please-version}
4 changes: 4 additions & 0 deletions google/cloud/scheduler_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.scheduler import gapic_version as package_version

__version__ = package_version.__version__


from .services.cloud_scheduler import CloudSchedulerAsyncClient, CloudSchedulerClient
from .types.cloudscheduler import (
Expand Down
84 changes: 47 additions & 37 deletions google/cloud/scheduler_v1/services/cloud_scheduler/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 @@ -171,9 +181,9 @@ def transport(self) -> CloudSchedulerTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, CloudSchedulerTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the cloud scheduler client.
Expand Down Expand Up @@ -217,11 +227,11 @@ def __init__(

async def list_jobs(
self,
request: Union[cloudscheduler.ListJobsRequest, dict] = None,
request: Optional[Union[cloudscheduler.ListJobsRequest, 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.ListJobsAsyncPager:
r"""Lists jobs.
Expand Down Expand Up @@ -254,7 +264,7 @@ async def sample_list_jobs():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.ListJobsRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.ListJobsRequest, dict]]):
The request object. Request message for listing jobs
using
[ListJobs][google.cloud.scheduler.v1.CloudScheduler.ListJobs].
Expand Down Expand Up @@ -343,11 +353,11 @@ async def sample_list_jobs():

async def get_job(
self,
request: Union[cloudscheduler.GetJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.GetJobRequest, 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]] = (),
) -> job.Job:
r"""Gets a job.
Expand Down Expand Up @@ -379,7 +389,7 @@ async def sample_get_job():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.GetJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.GetJobRequest, dict]]):
The request object. Request message for
[GetJob][google.cloud.scheduler.v1.CloudScheduler.GetJob].
name (:class:`str`):
Expand Down Expand Up @@ -456,12 +466,12 @@ async def sample_get_job():

async def create_job(
self,
request: Union[cloudscheduler.CreateJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.CreateJobRequest, dict]] = None,
*,
parent: str = None,
job: gcs_job.Job = None,
parent: Optional[str] = None,
job: Optional[gcs_job.Job] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_job.Job:
r"""Creates a job.
Expand Down Expand Up @@ -493,7 +503,7 @@ async def sample_create_job():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.CreateJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.CreateJobRequest, dict]]):
The request object. Request message for
[CreateJob][google.cloud.scheduler.v1.CloudScheduler.CreateJob].
parent (:class:`str`):
Expand Down Expand Up @@ -575,12 +585,12 @@ async def sample_create_job():

async def update_job(
self,
request: Union[cloudscheduler.UpdateJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.UpdateJobRequest, dict]] = None,
*,
job: gcs_job.Job = None,
update_mask: field_mask_pb2.FieldMask = None,
job: Optional[gcs_job.Job] = 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]] = (),
) -> gcs_job.Job:
r"""Updates a job.
Expand Down Expand Up @@ -622,7 +632,7 @@ async def sample_update_job():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.UpdateJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.UpdateJobRequest, dict]]):
The request object. Request message for
[UpdateJob][google.cloud.scheduler.v1.CloudScheduler.UpdateJob].
job (:class:`google.cloud.scheduler_v1.types.Job`):
Expand Down Expand Up @@ -703,11 +713,11 @@ async def sample_update_job():

async def delete_job(
self,
request: Union[cloudscheduler.DeleteJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.DeleteJobRequest, 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 a job.
Expand Down Expand Up @@ -736,7 +746,7 @@ async def sample_delete_job():
await client.delete_job(request=request)
Args:
request (Union[google.cloud.scheduler_v1.types.DeleteJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.DeleteJobRequest, dict]]):
The request object. Request message for deleting a job
using
[DeleteJob][google.cloud.scheduler.v1.CloudScheduler.DeleteJob].
Expand Down Expand Up @@ -804,11 +814,11 @@ async def sample_delete_job():

async def pause_job(
self,
request: Union[cloudscheduler.PauseJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.PauseJobRequest, 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]] = (),
) -> job.Job:
r"""Pauses a job.
Expand Down Expand Up @@ -851,7 +861,7 @@ async def sample_pause_job():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.PauseJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.PauseJobRequest, dict]]):
The request object. Request message for
[PauseJob][google.cloud.scheduler.v1.CloudScheduler.PauseJob].
name (:class:`str`):
Expand Down Expand Up @@ -918,11 +928,11 @@ async def sample_pause_job():

async def resume_job(
self,
request: Union[cloudscheduler.ResumeJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.ResumeJobRequest, 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]] = (),
) -> job.Job:
r"""Resume a job.
Expand Down Expand Up @@ -964,7 +974,7 @@ async def sample_resume_job():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.ResumeJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.ResumeJobRequest, dict]]):
The request object. Request message for
[ResumeJob][google.cloud.scheduler.v1.CloudScheduler.ResumeJob].
name (:class:`str`):
Expand Down Expand Up @@ -1031,11 +1041,11 @@ async def sample_resume_job():

async def run_job(
self,
request: Union[cloudscheduler.RunJobRequest, dict] = None,
request: Optional[Union[cloudscheduler.RunJobRequest, 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]] = (),
) -> job.Job:
r"""Forces a job to run now.
Expand Down Expand Up @@ -1069,7 +1079,7 @@ async def sample_run_job():
print(response)
Args:
request (Union[google.cloud.scheduler_v1.types.RunJobRequest, dict]):
request (Optional[Union[google.cloud.scheduler_v1.types.RunJobRequest, dict]]):
The request object. Request message for forcing a job to
run now using
[RunJob][google.cloud.scheduler.v1.CloudScheduler.RunJob].
Expand Down
Loading

0 comments on commit ab1a908

Please sign in to comment.