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

Commit

Permalink
chore: Update gapic-generator-python to v1.6.1 (#358)
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 6b1dde8 commit b113357
Show file tree
Hide file tree
Showing 232 changed files with 4,691 additions and 3,562 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.10.2"
}
1 change: 0 additions & 1 deletion docs/retail_v2/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Retail v2 API

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

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

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

__version__ = package_version.__version__


from google.cloud.retail_v2.services.catalog_service.async_client import (
CatalogServiceAsyncClient,
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/retail/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.10.2" # {x-release-please-version}
4 changes: 4 additions & 0 deletions google/cloud/retail_v2/__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.retail import gapic_version as package_version

__version__ = package_version.__version__


from .services.catalog_service import CatalogServiceAsyncClient, CatalogServiceClient
from .services.completion_service import (
Expand Down
118 changes: 71 additions & 47 deletions google/cloud/retail_v2/services/catalog_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 @@ -174,9 +184,9 @@ def transport(self) -> CatalogServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, CatalogServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the catalog service client.
Expand Down Expand Up @@ -220,11 +230,11 @@ def __init__(

async def list_catalogs(
self,
request: Union[catalog_service.ListCatalogsRequest, dict] = None,
request: Optional[Union[catalog_service.ListCatalogsRequest, 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.ListCatalogsAsyncPager:
r"""Lists all the [Catalog][google.cloud.retail.v2.Catalog]s
Expand Down Expand Up @@ -258,7 +268,7 @@ async def sample_list_catalogs():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.ListCatalogsRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.ListCatalogsRequest, dict]]):
The request object. Request for
[CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs]
method.
Expand Down Expand Up @@ -343,12 +353,12 @@ async def sample_list_catalogs():

async def update_catalog(
self,
request: Union[catalog_service.UpdateCatalogRequest, dict] = None,
request: Optional[Union[catalog_service.UpdateCatalogRequest, dict]] = None,
*,
catalog: gcr_catalog.Catalog = None,
update_mask: field_mask_pb2.FieldMask = None,
catalog: Optional[gcr_catalog.Catalog] = 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]] = (),
) -> gcr_catalog.Catalog:
r"""Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Expand Down Expand Up @@ -384,7 +394,7 @@ async def sample_update_catalog():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.UpdateCatalogRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.UpdateCatalogRequest, dict]]):
The request object. Request for
[CatalogService.UpdateCatalog][google.cloud.retail.v2.CatalogService.UpdateCatalog]
method.
Expand Down Expand Up @@ -471,11 +481,11 @@ async def sample_update_catalog():

async def set_default_branch(
self,
request: Union[catalog_service.SetDefaultBranchRequest, dict] = None,
request: Optional[Union[catalog_service.SetDefaultBranchRequest, dict]] = None,
*,
catalog: str = None,
catalog: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Set a specified branch id as default branch. API methods such as
Expand Down Expand Up @@ -537,7 +547,7 @@ async def sample_set_default_branch():
await client.set_default_branch(request=request)
Args:
request (Union[google.cloud.retail_v2.types.SetDefaultBranchRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.SetDefaultBranchRequest, dict]]):
The request object. Request message to set a specified
branch as new default_branch.
catalog (:class:`str`):
Expand Down Expand Up @@ -594,11 +604,11 @@ async def sample_set_default_branch():

async def get_default_branch(
self,
request: Union[catalog_service.GetDefaultBranchRequest, dict] = None,
request: Optional[Union[catalog_service.GetDefaultBranchRequest, dict]] = None,
*,
catalog: str = None,
catalog: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> catalog_service.GetDefaultBranchResponse:
r"""Get which branch is currently default branch set by
Expand Down Expand Up @@ -631,7 +641,7 @@ async def sample_get_default_branch():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.GetDefaultBranchRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.GetDefaultBranchRequest, dict]]):
The request object. Request message to show which branch
is currently the default branch.
catalog (:class:`str`):
Expand Down Expand Up @@ -697,11 +707,13 @@ async def sample_get_default_branch():

async def get_completion_config(
self,
request: Union[catalog_service.GetCompletionConfigRequest, dict] = None,
request: Optional[
Union[catalog_service.GetCompletionConfigRequest, 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]] = (),
) -> catalog.CompletionConfig:
r"""Gets a
Expand Down Expand Up @@ -734,7 +746,7 @@ async def sample_get_completion_config():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.GetCompletionConfigRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.GetCompletionConfigRequest, dict]]):
The request object. Request for
[CatalogService.GetCompletionConfig][google.cloud.retail.v2.CatalogService.GetCompletionConfig]
method.
Expand Down Expand Up @@ -802,12 +814,14 @@ async def sample_get_completion_config():

async def update_completion_config(
self,
request: Union[catalog_service.UpdateCompletionConfigRequest, dict] = None,
request: Optional[
Union[catalog_service.UpdateCompletionConfigRequest, dict]
] = None,
*,
completion_config: catalog.CompletionConfig = None,
update_mask: field_mask_pb2.FieldMask = None,
completion_config: Optional[catalog.CompletionConfig] = 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]] = (),
) -> catalog.CompletionConfig:
r"""Updates the
Expand Down Expand Up @@ -843,7 +857,7 @@ async def sample_update_completion_config():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.UpdateCompletionConfigRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.UpdateCompletionConfigRequest, dict]]):
The request object. Request for
[CatalogService.UpdateCompletionConfig][google.cloud.retail.v2.CatalogService.UpdateCompletionConfig]
method.
Expand Down Expand Up @@ -939,11 +953,13 @@ async def sample_update_completion_config():

async def get_attributes_config(
self,
request: Union[catalog_service.GetAttributesConfigRequest, dict] = None,
request: Optional[
Union[catalog_service.GetAttributesConfigRequest, 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]] = (),
) -> catalog.AttributesConfig:
r"""Gets an
Expand Down Expand Up @@ -976,7 +992,7 @@ async def sample_get_attributes_config():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.GetAttributesConfigRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.GetAttributesConfigRequest, dict]]):
The request object. Request for
[CatalogService.GetAttributesConfig][google.cloud.retail.v2.CatalogService.GetAttributesConfig]
method.
Expand Down Expand Up @@ -1041,12 +1057,14 @@ async def sample_get_attributes_config():

async def update_attributes_config(
self,
request: Union[catalog_service.UpdateAttributesConfigRequest, dict] = None,
request: Optional[
Union[catalog_service.UpdateAttributesConfigRequest, dict]
] = None,
*,
attributes_config: catalog.AttributesConfig = None,
update_mask: field_mask_pb2.FieldMask = None,
attributes_config: Optional[catalog.AttributesConfig] = 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]] = (),
) -> catalog.AttributesConfig:
r"""Updates the
Expand Down Expand Up @@ -1091,7 +1109,7 @@ async def sample_update_attributes_config():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.UpdateAttributesConfigRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.UpdateAttributesConfigRequest, dict]]):
The request object. Request for
[CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
method.
Expand Down Expand Up @@ -1173,10 +1191,12 @@ async def sample_update_attributes_config():

async def add_catalog_attribute(
self,
request: Union[catalog_service.AddCatalogAttributeRequest, dict] = None,
request: Optional[
Union[catalog_service.AddCatalogAttributeRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> catalog.AttributesConfig:
r"""Adds the specified
Expand Down Expand Up @@ -1218,7 +1238,7 @@ async def sample_add_catalog_attribute():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.AddCatalogAttributeRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.AddCatalogAttributeRequest, dict]]):
The request object. Request for
[CatalogService.AddCatalogAttribute][google.cloud.retail.v2.CatalogService.AddCatalogAttribute]
method.
Expand Down Expand Up @@ -1264,10 +1284,12 @@ async def sample_add_catalog_attribute():

async def remove_catalog_attribute(
self,
request: Union[catalog_service.RemoveCatalogAttributeRequest, dict] = None,
request: Optional[
Union[catalog_service.RemoveCatalogAttributeRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> catalog.AttributesConfig:
r"""Removes the specified
Expand Down Expand Up @@ -1306,7 +1328,7 @@ async def sample_remove_catalog_attribute():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.RemoveCatalogAttributeRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.RemoveCatalogAttributeRequest, dict]]):
The request object. Request for
[CatalogService.RemoveCatalogAttribute][google.cloud.retail.v2.CatalogService.RemoveCatalogAttribute]
method.
Expand Down Expand Up @@ -1352,10 +1374,12 @@ async def sample_remove_catalog_attribute():

async def replace_catalog_attribute(
self,
request: Union[catalog_service.ReplaceCatalogAttributeRequest, dict] = None,
request: Optional[
Union[catalog_service.ReplaceCatalogAttributeRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> catalog.AttributesConfig:
r"""Replaces the specified
Expand Down Expand Up @@ -1399,7 +1423,7 @@ async def sample_replace_catalog_attribute():
print(response)
Args:
request (Union[google.cloud.retail_v2.types.ReplaceCatalogAttributeRequest, dict]):
request (Optional[Union[google.cloud.retail_v2.types.ReplaceCatalogAttributeRequest, dict]]):
The request object. Request for
[CatalogService.ReplaceCatalogAttribute][google.cloud.retail.v2.CatalogService.ReplaceCatalogAttribute]
method.
Expand Down
Loading

0 comments on commit b113357

Please sign in to comment.