-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use gapic-generator-python 0.63.2 (#151)
* chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: googleapis/googleapis-gen@bf4e86b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot 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>
- Loading branch information
Showing
45 changed files
with
4,086 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
.../generated_samples/retail_generated_retail_v2_catalog_service_get_default_branch_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for GetDefaultBranch | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_GetDefaultBranch_async] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
async def sample_get_default_branch(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = retail_v2.GetDefaultBranchRequest( | ||
) | ||
|
||
# Make the request | ||
response = await client.get_default_branch(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END retail_generated_retail_v2_CatalogService_GetDefaultBranch_async] |
44 changes: 44 additions & 0 deletions
44
...s/generated_samples/retail_generated_retail_v2_catalog_service_get_default_branch_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for GetDefaultBranch | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_GetDefaultBranch_sync] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
def sample_get_default_branch(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = retail_v2.GetDefaultBranchRequest( | ||
) | ||
|
||
# Make the request | ||
response = client.get_default_branch(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END retail_generated_retail_v2_CatalogService_GetDefaultBranch_sync] |
46 changes: 46 additions & 0 deletions
46
...mples/generated_samples/retail_generated_retail_v2_catalog_service_list_catalogs_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for ListCatalogs | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_ListCatalogs_async] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
async def sample_list_catalogs(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = retail_v2.ListCatalogsRequest( | ||
parent="parent_value", | ||
) | ||
|
||
# Make the request | ||
page_result = client.list_catalogs(request=request) | ||
|
||
# Handle the response | ||
async for response in page_result: | ||
print(response) | ||
|
||
# [END retail_generated_retail_v2_CatalogService_ListCatalogs_async] |
46 changes: 46 additions & 0 deletions
46
...amples/generated_samples/retail_generated_retail_v2_catalog_service_list_catalogs_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for ListCatalogs | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_ListCatalogs_sync] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
def sample_list_catalogs(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = retail_v2.ListCatalogsRequest( | ||
parent="parent_value", | ||
) | ||
|
||
# Make the request | ||
page_result = client.list_catalogs(request=request) | ||
|
||
# Handle the response | ||
for response in page_result: | ||
print(response) | ||
|
||
# [END retail_generated_retail_v2_CatalogService_ListCatalogs_sync] |
42 changes: 42 additions & 0 deletions
42
.../generated_samples/retail_generated_retail_v2_catalog_service_set_default_branch_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for SetDefaultBranch | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_SetDefaultBranch_async] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
async def sample_set_default_branch(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = retail_v2.SetDefaultBranchRequest( | ||
) | ||
|
||
# Make the request | ||
await client.set_default_branch(request=request) | ||
|
||
|
||
# [END retail_generated_retail_v2_CatalogService_SetDefaultBranch_async] |
42 changes: 42 additions & 0 deletions
42
...s/generated_samples/retail_generated_retail_v2_catalog_service_set_default_branch_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for SetDefaultBranch | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_SetDefaultBranch_sync] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
def sample_set_default_branch(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = retail_v2.SetDefaultBranchRequest( | ||
) | ||
|
||
# Make the request | ||
client.set_default_branch(request=request) | ||
|
||
|
||
# [END retail_generated_retail_v2_CatalogService_SetDefaultBranch_sync] |
49 changes: 49 additions & 0 deletions
49
...ples/generated_samples/retail_generated_retail_v2_catalog_service_update_catalog_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for UpdateCatalog | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_UpdateCatalog_async] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
async def sample_update_catalog(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
catalog = retail_v2.Catalog() | ||
catalog.name = "name_value" | ||
catalog.display_name = "display_name_value" | ||
|
||
request = retail_v2.UpdateCatalogRequest( | ||
catalog=catalog, | ||
) | ||
|
||
# Make the request | ||
response = await client.update_catalog(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END retail_generated_retail_v2_CatalogService_UpdateCatalog_async] |
49 changes: 49 additions & 0 deletions
49
...mples/generated_samples/retail_generated_retail_v2_catalog_service_update_catalog_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2020 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for UpdateCatalog | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-retail | ||
|
||
|
||
# [START retail_generated_retail_v2_CatalogService_UpdateCatalog_sync] | ||
from google.cloud import retail_v2 | ||
|
||
|
||
def sample_update_catalog(): | ||
# Create a client | ||
client = retail_v2.CatalogServiceClient() | ||
|
||
# Initialize request argument(s) | ||
catalog = retail_v2.Catalog() | ||
catalog.name = "name_value" | ||
catalog.display_name = "display_name_value" | ||
|
||
request = retail_v2.UpdateCatalogRequest( | ||
catalog=catalog, | ||
) | ||
|
||
# Make the request | ||
response = client.update_catalog(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END retail_generated_retail_v2_CatalogService_UpdateCatalog_sync] |
Oops, something went wrong.