Skip to content

Commit d23a525

Browse files
authored
feat: generate v2alpha/v2beta (#226)
* feat: generate v2alpha/v2beta * chore: fix docstring formatting
1 parent 1fa69f9 commit d23a525

File tree

176 files changed

+22311
-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.

176 files changed

+22311
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 AddCatalogAttribute
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_v2alpha_generated_CatalogService_AddCatalogAttribute_async]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
async def sample_add_catalog_attribute():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
catalog_attribute = retail_v2alpha.CatalogAttribute()
36+
catalog_attribute.key = "key_value"
37+
38+
request = retail_v2alpha.AddCatalogAttributeRequest(
39+
attributes_config="attributes_config_value",
40+
catalog_attribute=catalog_attribute,
41+
)
42+
43+
# Make the request
44+
response = await client.add_catalog_attribute(request=request)
45+
46+
# Handle the response
47+
print(response)
48+
49+
# [END retail_v2alpha_generated_CatalogService_AddCatalogAttribute_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 AddCatalogAttribute
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_v2alpha_generated_CatalogService_AddCatalogAttribute_sync]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
def sample_add_catalog_attribute():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
catalog_attribute = retail_v2alpha.CatalogAttribute()
36+
catalog_attribute.key = "key_value"
37+
38+
request = retail_v2alpha.AddCatalogAttributeRequest(
39+
attributes_config="attributes_config_value",
40+
catalog_attribute=catalog_attribute,
41+
)
42+
43+
# Make the request
44+
response = client.add_catalog_attribute(request=request)
45+
46+
# Handle the response
47+
print(response)
48+
49+
# [END retail_v2alpha_generated_CatalogService_AddCatalogAttribute_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 GetAttributesConfig
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_v2alpha_generated_CatalogService_GetAttributesConfig_async]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
async def sample_get_attributes_config():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2alpha.GetAttributesConfigRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = await client.get_attributes_config(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END retail_v2alpha_generated_CatalogService_GetAttributesConfig_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 GetAttributesConfig
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_v2alpha_generated_CatalogService_GetAttributesConfig_sync]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
def sample_get_attributes_config():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2alpha.GetAttributesConfigRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = client.get_attributes_config(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END retail_v2alpha_generated_CatalogService_GetAttributesConfig_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 GetCompletionConfig
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_v2alpha_generated_CatalogService_GetCompletionConfig_async]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
async def sample_get_completion_config():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2alpha.GetCompletionConfigRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = await client.get_completion_config(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END retail_v2alpha_generated_CatalogService_GetCompletionConfig_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 GetCompletionConfig
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_v2alpha_generated_CatalogService_GetCompletionConfig_sync]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
def sample_get_completion_config():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2alpha.GetCompletionConfigRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
response = client.get_completion_config(request=request)
41+
42+
# Handle the response
43+
print(response)
44+
45+
# [END retail_v2alpha_generated_CatalogService_GetCompletionConfig_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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_v2alpha_generated_CatalogService_GetDefaultBranch_async]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
async def sample_get_default_branch():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2alpha.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_v2alpha_generated_CatalogService_GetDefaultBranch_async]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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_v2alpha_generated_CatalogService_GetDefaultBranch_sync]
27+
from google.cloud import retail_v2alpha
28+
29+
30+
def sample_get_default_branch():
31+
# Create a client
32+
client = retail_v2alpha.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2alpha.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_v2alpha_generated_CatalogService_GetDefaultBranch_sync]

0 commit comments

Comments
 (0)