Skip to content

Commit 5f5a8ca

Browse files
gcf-owl-bot[bot]dandhlee
authored andcommitted
feat: release Control and ServingConfig serivces to v2 version (#319)
- [ ] Regenerate this pull request now. feat: release AttributesConfig APIs to v2 version feat: release CompletionConfig APIs to v2 version feat: add local inventories info to the Product resource docs: Improved documentation for Fullfillment and Inventory API in ProductService docs: minor documentation format and typo fixes PiperOrigin-RevId: 469399525 Source-Link: googleapis/googleapis@e9bcb6c Source-Link: googleapis/googleapis-gen@14169c6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTQxNjljNjQ1ZTY0MTc1YjQ0MWQ1OTljZGI1MDBjMTdmOTY0NDFiMiJ9
1 parent 9ca74f4 commit 5f5a8ca

File tree

39 files changed

+5660
-793
lines changed

39 files changed

+5660
-793
lines changed
Lines changed: 49 additions & 0 deletions
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_v2_generated_CatalogService_AddCatalogAttribute_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_add_catalog_attribute():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
catalog_attribute = retail_v2.CatalogAttribute()
36+
catalog_attribute.key = "key_value"
37+
38+
request = retail_v2.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_v2_generated_CatalogService_AddCatalogAttribute_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 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_v2_generated_CatalogService_AddCatalogAttribute_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_add_catalog_attribute():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
catalog_attribute = retail_v2.CatalogAttribute()
36+
catalog_attribute.key = "key_value"
37+
38+
request = retail_v2.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_v2_generated_CatalogService_AddCatalogAttribute_sync]
Lines changed: 45 additions & 0 deletions
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_v2_generated_CatalogService_GetAttributesConfig_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_get_attributes_config():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.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_v2_generated_CatalogService_GetAttributesConfig_async]
Lines changed: 45 additions & 0 deletions
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_v2_generated_CatalogService_GetAttributesConfig_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_get_attributes_config():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.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_v2_generated_CatalogService_GetAttributesConfig_sync]
Lines changed: 45 additions & 0 deletions
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_v2_generated_CatalogService_GetCompletionConfig_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_get_completion_config():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.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_v2_generated_CatalogService_GetCompletionConfig_async]
Lines changed: 45 additions & 0 deletions
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_v2_generated_CatalogService_GetCompletionConfig_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_get_completion_config():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.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_v2_generated_CatalogService_GetCompletionConfig_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 RemoveCatalogAttribute
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_v2_generated_CatalogService_RemoveCatalogAttribute_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_remove_catalog_attribute():
31+
# Create a client
32+
client = retail_v2.CatalogServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.RemoveCatalogAttributeRequest(
36+
attributes_config="attributes_config_value",
37+
key="key_value",
38+
)
39+
40+
# Make the request
41+
response = await client.remove_catalog_attribute(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END retail_v2_generated_CatalogService_RemoveCatalogAttribute_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 RemoveCatalogAttribute
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_v2_generated_CatalogService_RemoveCatalogAttribute_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_remove_catalog_attribute():
31+
# Create a client
32+
client = retail_v2.CatalogServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.RemoveCatalogAttributeRequest(
36+
attributes_config="attributes_config_value",
37+
key="key_value",
38+
)
39+
40+
# Make the request
41+
response = client.remove_catalog_attribute(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END retail_v2_generated_CatalogService_RemoveCatalogAttribute_sync]

0 commit comments

Comments
 (0)