Skip to content

Commit b0dad35

Browse files
docs: users can self enroll retail search feature on cloud console (#195)
* docs: users can self enroll retail search feature on cloud console docs: suggest search users not to send IP and use hashed user id docs: deprecate request_id in ImportProductsRequest docs: deprecate search dynamic_facet_spec and suggest to config on cloud console docs: keep the API doc up-to-date with recent changes feat: add new AddLocalInventories and RemoveLocalInventories APIs feat: users cannot switch to empty default branch unless force override feat: allow search users to skip validation for invalid boost specs feat: support search personalization feat: search returns applied control ids in the response PiperOrigin-RevId: 437355889 Source-Link: googleapis/googleapis@4d00815 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b2b798247d46c932737cf689744a827fae7e5313 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJiNzk4MjQ3ZDQ2YzkzMjczN2NmNjg5NzQ0YTgyN2ZhZTdlNTMxMyJ9 * 🦉 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>
1 parent 291df3d commit b0dad35

5 files changed

+376
-0
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 AddLocalInventories
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_ProductService_AddLocalInventories_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_add_local_inventories():
31+
# Create a client
32+
client = retail_v2.ProductServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.AddLocalInventoriesRequest(
36+
product="product_value",
37+
)
38+
39+
# Make the request
40+
operation = client.add_local_inventories(request=request)
41+
42+
print("Waiting for operation to complete...")
43+
44+
response = await operation.result()
45+
46+
# Handle the response
47+
print(response)
48+
49+
# [END retail_v2_generated_ProductService_AddLocalInventories_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 AddLocalInventories
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_ProductService_AddLocalInventories_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_add_local_inventories():
31+
# Create a client
32+
client = retail_v2.ProductServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.AddLocalInventoriesRequest(
36+
product="product_value",
37+
)
38+
39+
# Make the request
40+
operation = client.add_local_inventories(request=request)
41+
42+
print("Waiting for operation to complete...")
43+
44+
response = operation.result()
45+
46+
# Handle the response
47+
print(response)
48+
49+
# [END retail_v2_generated_ProductService_AddLocalInventories_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 RemoveLocalInventories
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_ProductService_RemoveLocalInventories_async]
27+
from google.cloud import retail_v2
28+
29+
30+
async def sample_remove_local_inventories():
31+
# Create a client
32+
client = retail_v2.ProductServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.RemoveLocalInventoriesRequest(
36+
product="product_value",
37+
place_ids=['place_ids_value_1', 'place_ids_value_2'],
38+
)
39+
40+
# Make the request
41+
operation = client.remove_local_inventories(request=request)
42+
43+
print("Waiting for operation to complete...")
44+
45+
response = await operation.result()
46+
47+
# Handle the response
48+
print(response)
49+
50+
# [END retail_v2_generated_ProductService_RemoveLocalInventories_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 RemoveLocalInventories
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_ProductService_RemoveLocalInventories_sync]
27+
from google.cloud import retail_v2
28+
29+
30+
def sample_remove_local_inventories():
31+
# Create a client
32+
client = retail_v2.ProductServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = retail_v2.RemoveLocalInventoriesRequest(
36+
product="product_value",
37+
place_ids=['place_ids_value_1', 'place_ids_value_2'],
38+
)
39+
40+
# Make the request
41+
operation = client.remove_local_inventories(request=request)
42+
43+
print("Waiting for operation to complete...")
44+
45+
response = operation.result()
46+
47+
# Handle the response
48+
print(response)
49+
50+
# [END retail_v2_generated_ProductService_RemoveLocalInventories_sync]

generated_samples/generated_samples/snippet_metadata_retail_v2.json

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,95 @@
708708
}
709709
]
710710
},
711+
{
712+
"clientMethod": {
713+
"async": true,
714+
"method": {
715+
"service": {
716+
"shortName": "ProductService"
717+
},
718+
"shortName": "AddLocalInventories"
719+
}
720+
},
721+
"file": "retail_v2_generated_product_service_add_local_inventories_async.py",
722+
"regionTag": "retail_v2_generated_ProductService_AddLocalInventories_async",
723+
"segments": [
724+
{
725+
"end": 48,
726+
"start": 27,
727+
"type": "FULL"
728+
},
729+
{
730+
"end": 48,
731+
"start": 27,
732+
"type": "SHORT"
733+
},
734+
{
735+
"end": 33,
736+
"start": 31,
737+
"type": "CLIENT_INITIALIZATION"
738+
},
739+
{
740+
"end": 38,
741+
"start": 34,
742+
"type": "REQUEST_INITIALIZATION"
743+
},
744+
{
745+
"end": 45,
746+
"start": 39,
747+
"type": "REQUEST_EXECUTION"
748+
},
749+
{
750+
"end": 49,
751+
"start": 46,
752+
"type": "RESPONSE_HANDLING"
753+
}
754+
]
755+
},
756+
{
757+
"clientMethod": {
758+
"method": {
759+
"service": {
760+
"shortName": "ProductService"
761+
},
762+
"shortName": "AddLocalInventories"
763+
}
764+
},
765+
"file": "retail_v2_generated_product_service_add_local_inventories_sync.py",
766+
"regionTag": "retail_v2_generated_ProductService_AddLocalInventories_sync",
767+
"segments": [
768+
{
769+
"end": 48,
770+
"start": 27,
771+
"type": "FULL"
772+
},
773+
{
774+
"end": 48,
775+
"start": 27,
776+
"type": "SHORT"
777+
},
778+
{
779+
"end": 33,
780+
"start": 31,
781+
"type": "CLIENT_INITIALIZATION"
782+
},
783+
{
784+
"end": 38,
785+
"start": 34,
786+
"type": "REQUEST_INITIALIZATION"
787+
},
788+
{
789+
"end": 45,
790+
"start": 39,
791+
"type": "REQUEST_EXECUTION"
792+
},
793+
{
794+
"end": 49,
795+
"start": 46,
796+
"type": "RESPONSE_HANDLING"
797+
}
798+
]
799+
},
711800
{
712801
"clientMethod": {
713802
"async": true,
@@ -1238,6 +1327,95 @@
12381327
}
12391328
]
12401329
},
1330+
{
1331+
"clientMethod": {
1332+
"async": true,
1333+
"method": {
1334+
"service": {
1335+
"shortName": "ProductService"
1336+
},
1337+
"shortName": "RemoveLocalInventories"
1338+
}
1339+
},
1340+
"file": "retail_v2_generated_product_service_remove_local_inventories_async.py",
1341+
"regionTag": "retail_v2_generated_ProductService_RemoveLocalInventories_async",
1342+
"segments": [
1343+
{
1344+
"end": 49,
1345+
"start": 27,
1346+
"type": "FULL"
1347+
},
1348+
{
1349+
"end": 49,
1350+
"start": 27,
1351+
"type": "SHORT"
1352+
},
1353+
{
1354+
"end": 33,
1355+
"start": 31,
1356+
"type": "CLIENT_INITIALIZATION"
1357+
},
1358+
{
1359+
"end": 39,
1360+
"start": 34,
1361+
"type": "REQUEST_INITIALIZATION"
1362+
},
1363+
{
1364+
"end": 46,
1365+
"start": 40,
1366+
"type": "REQUEST_EXECUTION"
1367+
},
1368+
{
1369+
"end": 50,
1370+
"start": 47,
1371+
"type": "RESPONSE_HANDLING"
1372+
}
1373+
]
1374+
},
1375+
{
1376+
"clientMethod": {
1377+
"method": {
1378+
"service": {
1379+
"shortName": "ProductService"
1380+
},
1381+
"shortName": "RemoveLocalInventories"
1382+
}
1383+
},
1384+
"file": "retail_v2_generated_product_service_remove_local_inventories_sync.py",
1385+
"regionTag": "retail_v2_generated_ProductService_RemoveLocalInventories_sync",
1386+
"segments": [
1387+
{
1388+
"end": 49,
1389+
"start": 27,
1390+
"type": "FULL"
1391+
},
1392+
{
1393+
"end": 49,
1394+
"start": 27,
1395+
"type": "SHORT"
1396+
},
1397+
{
1398+
"end": 33,
1399+
"start": 31,
1400+
"type": "CLIENT_INITIALIZATION"
1401+
},
1402+
{
1403+
"end": 39,
1404+
"start": 34,
1405+
"type": "REQUEST_INITIALIZATION"
1406+
},
1407+
{
1408+
"end": 46,
1409+
"start": 40,
1410+
"type": "REQUEST_EXECUTION"
1411+
},
1412+
{
1413+
"end": 50,
1414+
"start": 47,
1415+
"type": "RESPONSE_HANDLING"
1416+
}
1417+
]
1418+
},
12411419
{
12421420
"clientMethod": {
12431421
"async": true,

0 commit comments

Comments
 (0)