Skip to content

Commit 757a4b3

Browse files
gcf-owl-bot[bot]dandhlee
authored andcommitted
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>
1 parent 8c042c3 commit 757a4b3

File tree

45 files changed

+4086
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4086
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetDefaultBranch
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_GetDefaultBranch_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_get_default_branch():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.GetDefaultBranchRequest(
36+
)
37+
38+
# Make the request
39+
response = await client.get_default_branch(request=request)
40+
41+
# Handle the response
42+
print(response)
43+
44+
# [END retail_generated_retail_v2_CatalogService_GetDefaultBranch_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for GetDefaultBranch
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_GetDefaultBranch_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_get_default_branch():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.GetDefaultBranchRequest(
36+
)
37+
38+
# Make the request
39+
response = client.get_default_branch(request=request)
40+
41+
# Handle the response
42+
print(response)
43+
44+
# [END retail_generated_retail_v2_CatalogService_GetDefaultBranch_sync]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ListCatalogs
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_ListCatalogs_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_list_catalogs():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.ListCatalogsRequest(
36+
parent="parent_value",
37+
)
38+
39+
# Make the request
40+
page_result = client.list_catalogs(request=request)
41+
42+
# Handle the response
43+
async for response in page_result:
44+
print(response)
45+
46+
# [END retail_generated_retail_v2_CatalogService_ListCatalogs_async]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ListCatalogs
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_ListCatalogs_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_list_catalogs():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.ListCatalogsRequest(
36+
parent="parent_value",
37+
)
38+
39+
# Make the request
40+
page_result = client.list_catalogs(request=request)
41+
42+
# Handle the response
43+
for response in page_result:
44+
print(response)
45+
46+
# [END retail_generated_retail_v2_CatalogService_ListCatalogs_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for SetDefaultBranch
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_SetDefaultBranch_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_set_default_branch():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.SetDefaultBranchRequest(
36+
)
37+
38+
# Make the request
39+
await client.set_default_branch(request=request)
40+
41+
42+
# [END retail_generated_retail_v2_CatalogService_SetDefaultBranch_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for SetDefaultBranch
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_SetDefaultBranch_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_set_default_branch():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.SetDefaultBranchRequest(
36+
)
37+
38+
# Make the request
39+
client.set_default_branch(request=request)
40+
41+
42+
# [END retail_generated_retail_v2_CatalogService_SetDefaultBranch_sync]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for UpdateCatalog
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_UpdateCatalog_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_update_catalog():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
catalog = retail_v2.Catalog()
36+
catalog.name = "name_value"
37+
catalog.display_name = "display_name_value"
38+
39+
request = retail_v2.UpdateCatalogRequest(
40+
catalog=catalog,
41+
)
42+
43+
# Make the request
44+
response = await client.update_catalog(request=request)
45+
46+
# Handle the response
47+
print(response)
48+
49+
# [END retail_generated_retail_v2_CatalogService_UpdateCatalog_async]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for UpdateCatalog
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-retail
24+
25+
26+
# [START retail_generated_retail_v2_CatalogService_UpdateCatalog_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_update_catalog():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
catalog = retail_v2.Catalog()
36+
catalog.name = "name_value"
37+
catalog.display_name = "display_name_value"
38+
39+
request = retail_v2.UpdateCatalogRequest(
40+
catalog=catalog,
41+
)
42+
43+
# Make the request
44+
response = client.update_catalog(request=request)
45+
46+
# Handle the response
47+
print(response)
48+
49+
# [END retail_generated_retail_v2_CatalogService_UpdateCatalog_sync]

0 commit comments

Comments
 (0)