diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_async.py new file mode 100644 index 000000000000..9b5622c27918 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddCatalogAttribute +# 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_v2alpha_generated_CatalogService_AddCatalogAttribute_async] +from google.cloud import retail_v2alpha + + +async def sample_add_catalog_attribute(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2alpha.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2alpha.AddCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = await client.add_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_AddCatalogAttribute_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_sync.py new file mode 100644 index 000000000000..ec76bc9f4c15 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddCatalogAttribute +# 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_v2alpha_generated_CatalogService_AddCatalogAttribute_sync] +from google.cloud import retail_v2alpha + + +def sample_add_catalog_attribute(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2alpha.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2alpha.AddCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = client.add_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_AddCatalogAttribute_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_async.py new file mode 100644 index 000000000000..d2f66638cf0e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetAttributesConfig +# 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_v2alpha_generated_CatalogService_GetAttributesConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_get_attributes_config(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetAttributesConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_GetAttributesConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_sync.py new file mode 100644 index 000000000000..91c914b37dcf --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetAttributesConfig +# 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_v2alpha_generated_CatalogService_GetAttributesConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_get_attributes_config(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetAttributesConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_GetAttributesConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_async.py new file mode 100644 index 000000000000..9da8e840067a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetCompletionConfig +# 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_v2alpha_generated_CatalogService_GetCompletionConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_get_completion_config(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetCompletionConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_GetCompletionConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_sync.py new file mode 100644 index 000000000000..5da5cd9f6bb8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetCompletionConfig +# 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_v2alpha_generated_CatalogService_GetCompletionConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_get_completion_config(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetCompletionConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_GetCompletionConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_async.py new file mode 100644 index 000000000000..2134a8102629 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_GetDefaultBranch_async] +from google.cloud import retail_v2alpha + + +async def sample_get_default_branch(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetDefaultBranchRequest( + ) + + # Make the request + response = await client.get_default_branch(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_GetDefaultBranch_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_sync.py new file mode 100644 index 000000000000..d233b42429fe --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_GetDefaultBranch_sync] +from google.cloud import retail_v2alpha + + +def sample_get_default_branch(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetDefaultBranchRequest( + ) + + # Make the request + response = client.get_default_branch(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_GetDefaultBranch_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_list_catalogs_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_list_catalogs_async.py new file mode 100644 index 000000000000..7e7fbf336f1e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_list_catalogs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_ListCatalogs_async] +from google.cloud import retail_v2alpha + + +async def sample_list_catalogs(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.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_v2alpha_generated_CatalogService_ListCatalogs_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_list_catalogs_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_list_catalogs_sync.py new file mode 100644 index 000000000000..8165c25b1871 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_list_catalogs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_ListCatalogs_sync] +from google.cloud import retail_v2alpha + + +def sample_list_catalogs(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.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_v2alpha_generated_CatalogService_ListCatalogs_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_remove_catalog_attribute_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_remove_catalog_attribute_async.py new file mode 100644 index 000000000000..f79bd7688e07 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_remove_catalog_attribute_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveCatalogAttribute +# 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_v2alpha_generated_CatalogService_RemoveCatalogAttribute_async] +from google.cloud import retail_v2alpha + + +async def sample_remove_catalog_attribute(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveCatalogAttributeRequest( + attributes_config="attributes_config_value", + key="key_value", + ) + + # Make the request + response = await client.remove_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_RemoveCatalogAttribute_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_remove_catalog_attribute_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_remove_catalog_attribute_sync.py new file mode 100644 index 000000000000..35b6611c70e8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_remove_catalog_attribute_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveCatalogAttribute +# 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_v2alpha_generated_CatalogService_RemoveCatalogAttribute_sync] +from google.cloud import retail_v2alpha + + +def sample_remove_catalog_attribute(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveCatalogAttributeRequest( + attributes_config="attributes_config_value", + key="key_value", + ) + + # Make the request + response = client.remove_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_RemoveCatalogAttribute_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_replace_catalog_attribute_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_replace_catalog_attribute_async.py new file mode 100644 index 000000000000..c42a8bb19b9e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_replace_catalog_attribute_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ReplaceCatalogAttribute +# 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_v2alpha_generated_CatalogService_ReplaceCatalogAttribute_async] +from google.cloud import retail_v2alpha + + +async def sample_replace_catalog_attribute(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2alpha.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2alpha.ReplaceCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = await client.replace_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_ReplaceCatalogAttribute_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_replace_catalog_attribute_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_replace_catalog_attribute_sync.py new file mode 100644 index 000000000000..56e779abaf76 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_replace_catalog_attribute_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ReplaceCatalogAttribute +# 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_v2alpha_generated_CatalogService_ReplaceCatalogAttribute_sync] +from google.cloud import retail_v2alpha + + +def sample_replace_catalog_attribute(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2alpha.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2alpha.ReplaceCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = client.replace_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_ReplaceCatalogAttribute_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_set_default_branch_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_set_default_branch_async.py new file mode 100644 index 000000000000..9ddf2f8e8504 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_set_default_branch_async.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_SetDefaultBranch_async] +from google.cloud import retail_v2alpha + + +async def sample_set_default_branch(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.SetDefaultBranchRequest( + ) + + # Make the request + await client.set_default_branch(request=request) + + +# [END retail_v2alpha_generated_CatalogService_SetDefaultBranch_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_set_default_branch_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_set_default_branch_sync.py new file mode 100644 index 000000000000..6fa13ce6fb60 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_set_default_branch_sync.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_SetDefaultBranch_sync] +from google.cloud import retail_v2alpha + + +def sample_set_default_branch(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.SetDefaultBranchRequest( + ) + + # Make the request + client.set_default_branch(request=request) + + +# [END retail_v2alpha_generated_CatalogService_SetDefaultBranch_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_attributes_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_attributes_config_async.py new file mode 100644 index 000000000000..c4654be4730e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_attributes_config_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateAttributesConfig +# 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_v2alpha_generated_CatalogService_UpdateAttributesConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_update_attributes_config(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + attributes_config = retail_v2alpha.AttributesConfig() + attributes_config.name = "name_value" + + request = retail_v2alpha.UpdateAttributesConfigRequest( + attributes_config=attributes_config, + ) + + # Make the request + response = await client.update_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_UpdateAttributesConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_attributes_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_attributes_config_sync.py new file mode 100644 index 000000000000..1f4d3432104e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_attributes_config_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateAttributesConfig +# 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_v2alpha_generated_CatalogService_UpdateAttributesConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_update_attributes_config(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + attributes_config = retail_v2alpha.AttributesConfig() + attributes_config.name = "name_value" + + request = retail_v2alpha.UpdateAttributesConfigRequest( + attributes_config=attributes_config, + ) + + # Make the request + response = client.update_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_UpdateAttributesConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_catalog_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_catalog_async.py new file mode 100644 index 000000000000..6035f7182d2f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_catalog_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_UpdateCatalog_async] +from google.cloud import retail_v2alpha + + +async def sample_update_catalog(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog = retail_v2alpha.Catalog() + catalog.name = "name_value" + catalog.display_name = "display_name_value" + + request = retail_v2alpha.UpdateCatalogRequest( + catalog=catalog, + ) + + # Make the request + response = await client.update_catalog(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_UpdateCatalog_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_catalog_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_catalog_sync.py new file mode 100644 index 000000000000..35fff0d1b462 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_catalog_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2alpha_generated_CatalogService_UpdateCatalog_sync] +from google.cloud import retail_v2alpha + + +def sample_update_catalog(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + catalog = retail_v2alpha.Catalog() + catalog.name = "name_value" + catalog.display_name = "display_name_value" + + request = retail_v2alpha.UpdateCatalogRequest( + catalog=catalog, + ) + + # Make the request + response = client.update_catalog(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_UpdateCatalog_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_completion_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_completion_config_async.py new file mode 100644 index 000000000000..26cac134b230 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_completion_config_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateCompletionConfig +# 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_v2alpha_generated_CatalogService_UpdateCompletionConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_update_completion_config(): + # Create a client + client = retail_v2alpha.CatalogServiceAsyncClient() + + # Initialize request argument(s) + completion_config = retail_v2alpha.CompletionConfig() + completion_config.name = "name_value" + + request = retail_v2alpha.UpdateCompletionConfigRequest( + completion_config=completion_config, + ) + + # Make the request + response = await client.update_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_UpdateCompletionConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_completion_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_completion_config_sync.py new file mode 100644 index 000000000000..b9e11448a551 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_catalog_service_update_completion_config_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateCompletionConfig +# 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_v2alpha_generated_CatalogService_UpdateCompletionConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_update_completion_config(): + # Create a client + client = retail_v2alpha.CatalogServiceClient() + + # Initialize request argument(s) + completion_config = retail_v2alpha.CompletionConfig() + completion_config.name = "name_value" + + request = retail_v2alpha.UpdateCompletionConfigRequest( + completion_config=completion_config, + ) + + # Make the request + response = client.update_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CatalogService_UpdateCompletionConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_complete_query_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_complete_query_async.py new file mode 100644 index 000000000000..13dce99f2735 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_complete_query_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CompleteQuery +# 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_v2alpha_generated_CompletionService_CompleteQuery_async] +from google.cloud import retail_v2alpha + + +async def sample_complete_query(): + # Create a client + client = retail_v2alpha.CompletionServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.CompleteQueryRequest( + catalog="catalog_value", + query="query_value", + ) + + # Make the request + response = await client.complete_query(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CompletionService_CompleteQuery_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_complete_query_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_complete_query_sync.py new file mode 100644 index 000000000000..20687e33a289 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_complete_query_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CompleteQuery +# 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_v2alpha_generated_CompletionService_CompleteQuery_sync] +from google.cloud import retail_v2alpha + + +def sample_complete_query(): + # Create a client + client = retail_v2alpha.CompletionServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.CompleteQueryRequest( + catalog="catalog_value", + query="query_value", + ) + + # Make the request + response = client.complete_query(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CompletionService_CompleteQuery_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_import_completion_data_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_import_completion_data_async.py new file mode 100644 index 000000000000..d1a515f2bb5e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_import_completion_data_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportCompletionData +# 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_v2alpha_generated_CompletionService_ImportCompletionData_async] +from google.cloud import retail_v2alpha + + +async def sample_import_completion_data(): + # Create a client + client = retail_v2alpha.CompletionServiceAsyncClient() + + # Initialize request argument(s) + input_config = retail_v2alpha.CompletionDataInputConfig() + input_config.big_query_source.dataset_id = "dataset_id_value" + input_config.big_query_source.table_id = "table_id_value" + + request = retail_v2alpha.ImportCompletionDataRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_completion_data(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CompletionService_ImportCompletionData_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_import_completion_data_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_import_completion_data_sync.py new file mode 100644 index 000000000000..3c6ddc55a553 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_completion_service_import_completion_data_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportCompletionData +# 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_v2alpha_generated_CompletionService_ImportCompletionData_sync] +from google.cloud import retail_v2alpha + + +def sample_import_completion_data(): + # Create a client + client = retail_v2alpha.CompletionServiceClient() + + # Initialize request argument(s) + input_config = retail_v2alpha.CompletionDataInputConfig() + input_config.big_query_source.dataset_id = "dataset_id_value" + input_config.big_query_source.table_id = "table_id_value" + + request = retail_v2alpha.ImportCompletionDataRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_completion_data(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_CompletionService_ImportCompletionData_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_create_control_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_create_control_async.py new file mode 100644 index 000000000000..131de87e7d9c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_create_control_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateControl +# 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_v2alpha_generated_ControlService_CreateControl_async] +from google.cloud import retail_v2alpha + + +async def sample_create_control(): + # Create a client + client = retail_v2alpha.ControlServiceAsyncClient() + + # Initialize request argument(s) + control = retail_v2alpha.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + control.search_solution_use_case = "SEARCH_SOLUTION_USE_CASE_BROWSE" + + request = retail_v2alpha.CreateControlRequest( + parent="parent_value", + control=control, + control_id="control_id_value", + ) + + # Make the request + response = await client.create_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ControlService_CreateControl_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_create_control_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_create_control_sync.py new file mode 100644 index 000000000000..8fee66d849ff --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_create_control_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateControl +# 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_v2alpha_generated_ControlService_CreateControl_sync] +from google.cloud import retail_v2alpha + + +def sample_create_control(): + # Create a client + client = retail_v2alpha.ControlServiceClient() + + # Initialize request argument(s) + control = retail_v2alpha.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + control.search_solution_use_case = "SEARCH_SOLUTION_USE_CASE_BROWSE" + + request = retail_v2alpha.CreateControlRequest( + parent="parent_value", + control=control, + control_id="control_id_value", + ) + + # Make the request + response = client.create_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ControlService_CreateControl_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_delete_control_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_delete_control_async.py new file mode 100644 index 000000000000..ae438a78a2b5 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_delete_control_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteControl +# 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_v2alpha_generated_ControlService_DeleteControl_async] +from google.cloud import retail_v2alpha + + +async def sample_delete_control(): + # Create a client + client = retail_v2alpha.ControlServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.DeleteControlRequest( + name="name_value", + ) + + # Make the request + await client.delete_control(request=request) + + +# [END retail_v2alpha_generated_ControlService_DeleteControl_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_delete_control_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_delete_control_sync.py new file mode 100644 index 000000000000..b83ddcd5ce1e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_delete_control_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteControl +# 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_v2alpha_generated_ControlService_DeleteControl_sync] +from google.cloud import retail_v2alpha + + +def sample_delete_control(): + # Create a client + client = retail_v2alpha.ControlServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.DeleteControlRequest( + name="name_value", + ) + + # Make the request + client.delete_control(request=request) + + +# [END retail_v2alpha_generated_ControlService_DeleteControl_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_get_control_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_get_control_async.py new file mode 100644 index 000000000000..588c8955fc13 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_get_control_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetControl +# 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_v2alpha_generated_ControlService_GetControl_async] +from google.cloud import retail_v2alpha + + +async def sample_get_control(): + # Create a client + client = retail_v2alpha.ControlServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetControlRequest( + name="name_value", + ) + + # Make the request + response = await client.get_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ControlService_GetControl_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_get_control_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_get_control_sync.py new file mode 100644 index 000000000000..f04eb36b4b5a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_get_control_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetControl +# 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_v2alpha_generated_ControlService_GetControl_sync] +from google.cloud import retail_v2alpha + + +def sample_get_control(): + # Create a client + client = retail_v2alpha.ControlServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetControlRequest( + name="name_value", + ) + + # Make the request + response = client.get_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ControlService_GetControl_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_list_controls_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_list_controls_async.py new file mode 100644 index 000000000000..005329c1deda --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_list_controls_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListControls +# 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_v2alpha_generated_ControlService_ListControls_async] +from google.cloud import retail_v2alpha + + +async def sample_list_controls(): + # Create a client + client = retail_v2alpha.ControlServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.ListControlsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_controls(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2alpha_generated_ControlService_ListControls_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_list_controls_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_list_controls_sync.py new file mode 100644 index 000000000000..301c6036efda --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_list_controls_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListControls +# 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_v2alpha_generated_ControlService_ListControls_sync] +from google.cloud import retail_v2alpha + + +def sample_list_controls(): + # Create a client + client = retail_v2alpha.ControlServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.ListControlsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_controls(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2alpha_generated_ControlService_ListControls_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_update_control_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_update_control_async.py new file mode 100644 index 000000000000..dc4220660617 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_update_control_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateControl +# 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_v2alpha_generated_ControlService_UpdateControl_async] +from google.cloud import retail_v2alpha + + +async def sample_update_control(): + # Create a client + client = retail_v2alpha.ControlServiceAsyncClient() + + # Initialize request argument(s) + control = retail_v2alpha.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + control.search_solution_use_case = "SEARCH_SOLUTION_USE_CASE_BROWSE" + + request = retail_v2alpha.UpdateControlRequest( + control=control, + ) + + # Make the request + response = await client.update_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ControlService_UpdateControl_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_control_service_update_control_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_update_control_sync.py new file mode 100644 index 000000000000..cf7823fdc51a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_control_service_update_control_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateControl +# 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_v2alpha_generated_ControlService_UpdateControl_sync] +from google.cloud import retail_v2alpha + + +def sample_update_control(): + # Create a client + client = retail_v2alpha.ControlServiceClient() + + # Initialize request argument(s) + control = retail_v2alpha.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + control.search_solution_use_case = "SEARCH_SOLUTION_USE_CASE_BROWSE" + + request = retail_v2alpha.UpdateControlRequest( + control=control, + ) + + # Make the request + response = client.update_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ControlService_UpdateControl_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_prediction_service_predict_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_prediction_service_predict_async.py new file mode 100644 index 000000000000..7d3c45408e81 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_prediction_service_predict_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Predict +# 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_v2alpha_generated_PredictionService_Predict_async] +from google.cloud import retail_v2alpha + + +async def sample_predict(): + # Create a client + client = retail_v2alpha.PredictionServiceAsyncClient() + + # Initialize request argument(s) + user_event = retail_v2alpha.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2alpha.PredictRequest( + placement="placement_value", + user_event=user_event, + ) + + # Make the request + response = await client.predict(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_PredictionService_Predict_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_prediction_service_predict_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_prediction_service_predict_sync.py new file mode 100644 index 000000000000..c3dbd187b964 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_prediction_service_predict_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Predict +# 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_v2alpha_generated_PredictionService_Predict_sync] +from google.cloud import retail_v2alpha + + +def sample_predict(): + # Create a client + client = retail_v2alpha.PredictionServiceClient() + + # Initialize request argument(s) + user_event = retail_v2alpha.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2alpha.PredictRequest( + placement="placement_value", + user_event=user_event, + ) + + # Make the request + response = client.predict(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_PredictionService_Predict_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_fulfillment_places_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_fulfillment_places_async.py new file mode 100644 index 000000000000..4ef159873149 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_fulfillment_places_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddFulfillmentPlaces +# 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_v2alpha_generated_ProductService_AddFulfillmentPlaces_async] +from google.cloud import retail_v2alpha + + +async def sample_add_fulfillment_places(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.AddFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.add_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_fulfillment_places_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_fulfillment_places_sync.py new file mode 100644 index 000000000000..03f0cd6d1f63 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_fulfillment_places_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddFulfillmentPlaces +# 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_v2alpha_generated_ProductService_AddFulfillmentPlaces_sync] +from google.cloud import retail_v2alpha + + +def sample_add_fulfillment_places(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.AddFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.add_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_local_inventories_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_local_inventories_async.py new file mode 100644 index 000000000000..c3b7dfdfc191 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_local_inventories_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddLocalInventories +# 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_v2alpha_generated_ProductService_AddLocalInventories_async] +from google.cloud import retail_v2alpha + + +async def sample_add_local_inventories(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.AddLocalInventoriesRequest( + product="product_value", + ) + + # Make the request + operation = client.add_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_AddLocalInventories_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_local_inventories_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_local_inventories_sync.py new file mode 100644 index 000000000000..b91b57f3547e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_add_local_inventories_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddLocalInventories +# 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_v2alpha_generated_ProductService_AddLocalInventories_sync] +from google.cloud import retail_v2alpha + + +def sample_add_local_inventories(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.AddLocalInventoriesRequest( + product="product_value", + ) + + # Make the request + operation = client.add_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_AddLocalInventories_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_create_product_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_create_product_async.py new file mode 100644 index 000000000000..8ca456637ff8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_create_product_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateProduct +# 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_v2alpha_generated_ProductService_CreateProduct_async] +from google.cloud import retail_v2alpha + + +async def sample_create_product(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + product = retail_v2alpha.Product() + product.title = "title_value" + + request = retail_v2alpha.CreateProductRequest( + parent="parent_value", + product=product, + product_id="product_id_value", + ) + + # Make the request + response = await client.create_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_CreateProduct_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_create_product_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_create_product_sync.py new file mode 100644 index 000000000000..b2946508076e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_create_product_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateProduct +# 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_v2alpha_generated_ProductService_CreateProduct_sync] +from google.cloud import retail_v2alpha + + +def sample_create_product(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + product = retail_v2alpha.Product() + product.title = "title_value" + + request = retail_v2alpha.CreateProductRequest( + parent="parent_value", + product=product, + product_id="product_id_value", + ) + + # Make the request + response = client.create_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_CreateProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_delete_product_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_delete_product_async.py new file mode 100644 index 000000000000..1ae742221d8a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_delete_product_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteProduct +# 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_v2alpha_generated_ProductService_DeleteProduct_async] +from google.cloud import retail_v2alpha + + +async def sample_delete_product(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.DeleteProductRequest( + name="name_value", + ) + + # Make the request + await client.delete_product(request=request) + + +# [END retail_v2alpha_generated_ProductService_DeleteProduct_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_delete_product_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_delete_product_sync.py new file mode 100644 index 000000000000..faebc2e42cc8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_delete_product_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteProduct +# 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_v2alpha_generated_ProductService_DeleteProduct_sync] +from google.cloud import retail_v2alpha + + +def sample_delete_product(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.DeleteProductRequest( + name="name_value", + ) + + # Make the request + client.delete_product(request=request) + + +# [END retail_v2alpha_generated_ProductService_DeleteProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_get_product_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_get_product_async.py new file mode 100644 index 000000000000..70903b9e9461 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_get_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetProduct +# 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_v2alpha_generated_ProductService_GetProduct_async] +from google.cloud import retail_v2alpha + + +async def sample_get_product(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetProductRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_GetProduct_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_get_product_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_get_product_sync.py new file mode 100644 index 000000000000..25fccda2308c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_get_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetProduct +# 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_v2alpha_generated_ProductService_GetProduct_sync] +from google.cloud import retail_v2alpha + + +def sample_get_product(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetProductRequest( + name="name_value", + ) + + # Make the request + response = client.get_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_GetProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_import_products_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_import_products_async.py new file mode 100644 index 000000000000..5cfaf03188c9 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_import_products_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportProducts +# 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_v2alpha_generated_ProductService_ImportProducts_async] +from google.cloud import retail_v2alpha + + +async def sample_import_products(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + input_config = retail_v2alpha.ProductInputConfig() + input_config.product_inline_source.products.title = "title_value" + + request = retail_v2alpha.ImportProductsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_products(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_ImportProducts_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_import_products_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_import_products_sync.py new file mode 100644 index 000000000000..ca54ea573f15 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_import_products_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportProducts +# 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_v2alpha_generated_ProductService_ImportProducts_sync] +from google.cloud import retail_v2alpha + + +def sample_import_products(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + input_config = retail_v2alpha.ProductInputConfig() + input_config.product_inline_source.products.title = "title_value" + + request = retail_v2alpha.ImportProductsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_products(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_ImportProducts_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_list_products_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_list_products_async.py new file mode 100644 index 000000000000..8dcf7a716751 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_list_products_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListProducts +# 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_v2alpha_generated_ProductService_ListProducts_async] +from google.cloud import retail_v2alpha + + +async def sample_list_products(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2alpha_generated_ProductService_ListProducts_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_list_products_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_list_products_sync.py new file mode 100644 index 000000000000..aa96e9c20a2e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_list_products_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListProducts +# 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_v2alpha_generated_ProductService_ListProducts_sync] +from google.cloud import retail_v2alpha + + +def sample_list_products(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2alpha_generated_ProductService_ListProducts_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_purge_products_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_purge_products_async.py new file mode 100644 index 000000000000..8adf6af465ca --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_purge_products_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 PurgeProducts +# 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_v2alpha_generated_ProductService_PurgeProducts_async] +from google.cloud import retail_v2alpha + + +async def sample_purge_products(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.PurgeProductsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_products(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_PurgeProducts_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_purge_products_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_purge_products_sync.py new file mode 100644 index 000000000000..72c32c88c41c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_purge_products_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 PurgeProducts +# 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_v2alpha_generated_ProductService_PurgeProducts_sync] +from google.cloud import retail_v2alpha + + +def sample_purge_products(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.PurgeProductsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_products(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_PurgeProducts_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_fulfillment_places_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_fulfillment_places_async.py new file mode 100644 index 000000000000..da379da0b3e3 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_fulfillment_places_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveFulfillmentPlaces +# 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_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_async] +from google.cloud import retail_v2alpha + + +async def sample_remove_fulfillment_places(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_fulfillment_places_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_fulfillment_places_sync.py new file mode 100644 index 000000000000..55bf6522c5f7 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_fulfillment_places_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveFulfillmentPlaces +# 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_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_sync] +from google.cloud import retail_v2alpha + + +def sample_remove_fulfillment_places(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_local_inventories_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_local_inventories_async.py new file mode 100644 index 000000000000..bc0b9406545f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_local_inventories_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveLocalInventories +# 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_v2alpha_generated_ProductService_RemoveLocalInventories_async] +from google.cloud import retail_v2alpha + + +async def sample_remove_local_inventories(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveLocalInventoriesRequest( + product="product_value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_RemoveLocalInventories_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_local_inventories_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_local_inventories_sync.py new file mode 100644 index 000000000000..40e0b2bbfa43 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_remove_local_inventories_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveLocalInventories +# 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_v2alpha_generated_ProductService_RemoveLocalInventories_sync] +from google.cloud import retail_v2alpha + + +def sample_remove_local_inventories(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveLocalInventoriesRequest( + product="product_value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_RemoveLocalInventories_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_set_inventory_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_set_inventory_async.py new file mode 100644 index 000000000000..64dc769cdcd1 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_set_inventory_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 SetInventory +# 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_v2alpha_generated_ProductService_SetInventory_async] +from google.cloud import retail_v2alpha + + +async def sample_set_inventory(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + inventory = retail_v2alpha.Product() + inventory.title = "title_value" + + request = retail_v2alpha.SetInventoryRequest( + inventory=inventory, + ) + + # Make the request + operation = client.set_inventory(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_SetInventory_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_set_inventory_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_set_inventory_sync.py new file mode 100644 index 000000000000..9dbf88b60956 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_set_inventory_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 SetInventory +# 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_v2alpha_generated_ProductService_SetInventory_sync] +from google.cloud import retail_v2alpha + + +def sample_set_inventory(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + inventory = retail_v2alpha.Product() + inventory.title = "title_value" + + request = retail_v2alpha.SetInventoryRequest( + inventory=inventory, + ) + + # Make the request + operation = client.set_inventory(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_SetInventory_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_update_product_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_update_product_async.py new file mode 100644 index 000000000000..35df5c2bddc7 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_update_product_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateProduct +# 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_v2alpha_generated_ProductService_UpdateProduct_async] +from google.cloud import retail_v2alpha + + +async def sample_update_product(): + # Create a client + client = retail_v2alpha.ProductServiceAsyncClient() + + # Initialize request argument(s) + product = retail_v2alpha.Product() + product.title = "title_value" + + request = retail_v2alpha.UpdateProductRequest( + product=product, + ) + + # Make the request + response = await client.update_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_UpdateProduct_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_product_service_update_product_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_update_product_sync.py new file mode 100644 index 000000000000..6248e977afd5 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_product_service_update_product_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateProduct +# 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_v2alpha_generated_ProductService_UpdateProduct_sync] +from google.cloud import retail_v2alpha + + +def sample_update_product(): + # Create a client + client = retail_v2alpha.ProductServiceClient() + + # Initialize request argument(s) + product = retail_v2alpha.Product() + product.title = "title_value" + + request = retail_v2alpha.UpdateProductRequest( + product=product, + ) + + # Make the request + response = client.update_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ProductService_UpdateProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_search_service_search_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_search_service_search_async.py new file mode 100644 index 000000000000..75520b76d4f2 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_search_service_search_async.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Search +# 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_v2alpha_generated_SearchService_Search_async] +from google.cloud import retail_v2alpha + + +async def sample_search(): + # Create a client + client = retail_v2alpha.SearchServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.SearchRequest( + placement="placement_value", + visitor_id="visitor_id_value", + ) + + # Make the request + page_result = client.search(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2alpha_generated_SearchService_Search_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_search_service_search_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_search_service_search_sync.py new file mode 100644 index 000000000000..2b2853a3ba2a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_search_service_search_sync.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Search +# 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_v2alpha_generated_SearchService_Search_sync] +from google.cloud import retail_v2alpha + + +def sample_search(): + # Create a client + client = retail_v2alpha.SearchServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.SearchRequest( + placement="placement_value", + visitor_id="visitor_id_value", + ) + + # Make the request + page_result = client.search(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2alpha_generated_SearchService_Search_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_add_control_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_add_control_async.py new file mode 100644 index 000000000000..0694590ceba4 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_add_control_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddControl +# 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_v2alpha_generated_ServingConfigService_AddControl_async] +from google.cloud import retail_v2alpha + + +async def sample_add_control(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.AddControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = await client.add_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_AddControl_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_add_control_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_add_control_sync.py new file mode 100644 index 000000000000..10d50ff71c8b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_add_control_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddControl +# 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_v2alpha_generated_ServingConfigService_AddControl_sync] +from google.cloud import retail_v2alpha + + +def sample_add_control(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.AddControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = client.add_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_AddControl_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_create_serving_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_create_serving_config_async.py new file mode 100644 index 000000000000..33b080fc7477 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_create_serving_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateServingConfig +# 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_v2alpha_generated_ServingConfigService_CreateServingConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_create_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + serving_config = retail_v2alpha.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2alpha.CreateServingConfigRequest( + parent="parent_value", + serving_config=serving_config, + serving_config_id="serving_config_id_value", + ) + + # Make the request + response = await client.create_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_CreateServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_create_serving_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_create_serving_config_sync.py new file mode 100644 index 000000000000..e7b0e80e81df --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_create_serving_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateServingConfig +# 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_v2alpha_generated_ServingConfigService_CreateServingConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_create_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + serving_config = retail_v2alpha.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2alpha.CreateServingConfigRequest( + parent="parent_value", + serving_config=serving_config, + serving_config_id="serving_config_id_value", + ) + + # Make the request + response = client.create_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_CreateServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_delete_serving_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_delete_serving_config_async.py new file mode 100644 index 000000000000..f8259bdf3917 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_delete_serving_config_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteServingConfig +# 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_v2alpha_generated_ServingConfigService_DeleteServingConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_delete_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.DeleteServingConfigRequest( + name="name_value", + ) + + # Make the request + await client.delete_serving_config(request=request) + + +# [END retail_v2alpha_generated_ServingConfigService_DeleteServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_delete_serving_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_delete_serving_config_sync.py new file mode 100644 index 000000000000..621916ef9d87 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_delete_serving_config_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteServingConfig +# 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_v2alpha_generated_ServingConfigService_DeleteServingConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_delete_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.DeleteServingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_serving_config(request=request) + + +# [END retail_v2alpha_generated_ServingConfigService_DeleteServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_get_serving_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_get_serving_config_async.py new file mode 100644 index 000000000000..fdfd4d8082d4 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_get_serving_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetServingConfig +# 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_v2alpha_generated_ServingConfigService_GetServingConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_get_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetServingConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_GetServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_get_serving_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_get_serving_config_sync.py new file mode 100644 index 000000000000..a140801600de --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_get_serving_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetServingConfig +# 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_v2alpha_generated_ServingConfigService_GetServingConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_get_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.GetServingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_GetServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_list_serving_configs_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_list_serving_configs_async.py new file mode 100644 index 000000000000..c8244f951faf --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_list_serving_configs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListServingConfigs +# 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_v2alpha_generated_ServingConfigService_ListServingConfigs_async] +from google.cloud import retail_v2alpha + + +async def sample_list_serving_configs(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.ListServingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_serving_configs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_ListServingConfigs_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_list_serving_configs_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_list_serving_configs_sync.py new file mode 100644 index 000000000000..86e02687c8f8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_list_serving_configs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListServingConfigs +# 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_v2alpha_generated_ServingConfigService_ListServingConfigs_sync] +from google.cloud import retail_v2alpha + + +def sample_list_serving_configs(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.ListServingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_serving_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_ListServingConfigs_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_remove_control_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_remove_control_async.py new file mode 100644 index 000000000000..66e0790209c9 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_remove_control_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveControl +# 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_v2alpha_generated_ServingConfigService_RemoveControl_async] +from google.cloud import retail_v2alpha + + +async def sample_remove_control(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = await client.remove_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_RemoveControl_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_remove_control_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_remove_control_sync.py new file mode 100644 index 000000000000..8b39362b4e7b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_remove_control_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveControl +# 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_v2alpha_generated_ServingConfigService_RemoveControl_sync] +from google.cloud import retail_v2alpha + + +def sample_remove_control(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.RemoveControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = client.remove_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_RemoveControl_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_update_serving_config_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_update_serving_config_async.py new file mode 100644 index 000000000000..64e82dba2c0f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_update_serving_config_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateServingConfig +# 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_v2alpha_generated_ServingConfigService_UpdateServingConfig_async] +from google.cloud import retail_v2alpha + + +async def sample_update_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + serving_config = retail_v2alpha.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2alpha.UpdateServingConfigRequest( + serving_config=serving_config, + ) + + # Make the request + response = await client.update_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_UpdateServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_update_serving_config_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_update_serving_config_sync.py new file mode 100644 index 000000000000..46d2d65c69b0 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_serving_config_service_update_serving_config_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateServingConfig +# 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_v2alpha_generated_ServingConfigService_UpdateServingConfig_sync] +from google.cloud import retail_v2alpha + + +def sample_update_serving_config(): + # Create a client + client = retail_v2alpha.ServingConfigServiceClient() + + # Initialize request argument(s) + serving_config = retail_v2alpha.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2alpha.UpdateServingConfigRequest( + serving_config=serving_config, + ) + + # Make the request + response = client.update_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_ServingConfigService_UpdateServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_collect_user_event_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_collect_user_event_async.py new file mode 100644 index 000000000000..f8aa3f781606 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_collect_user_event_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CollectUserEvent +# 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_v2alpha_generated_UserEventService_CollectUserEvent_async] +from google.cloud import retail_v2alpha + + +async def sample_collect_user_event(): + # Create a client + client = retail_v2alpha.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.CollectUserEventRequest( + parent="parent_value", + user_event="user_event_value", + ) + + # Make the request + response = await client.collect_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_CollectUserEvent_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_collect_user_event_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_collect_user_event_sync.py new file mode 100644 index 000000000000..026972b1cd7e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_collect_user_event_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CollectUserEvent +# 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_v2alpha_generated_UserEventService_CollectUserEvent_sync] +from google.cloud import retail_v2alpha + + +def sample_collect_user_event(): + # Create a client + client = retail_v2alpha.UserEventServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.CollectUserEventRequest( + parent="parent_value", + user_event="user_event_value", + ) + + # Make the request + response = client.collect_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_CollectUserEvent_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_import_user_events_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_import_user_events_async.py new file mode 100644 index 000000000000..540ce1304cba --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_import_user_events_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportUserEvents +# 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_v2alpha_generated_UserEventService_ImportUserEvents_async] +from google.cloud import retail_v2alpha + + +async def sample_import_user_events(): + # Create a client + client = retail_v2alpha.UserEventServiceAsyncClient() + + # Initialize request argument(s) + input_config = retail_v2alpha.UserEventInputConfig() + input_config.user_event_inline_source.user_events.event_type = "event_type_value" + input_config.user_event_inline_source.user_events.visitor_id = "visitor_id_value" + + request = retail_v2alpha.ImportUserEventsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_user_events(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_ImportUserEvents_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_import_user_events_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_import_user_events_sync.py new file mode 100644 index 000000000000..fe9310db2ed7 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_import_user_events_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportUserEvents +# 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_v2alpha_generated_UserEventService_ImportUserEvents_sync] +from google.cloud import retail_v2alpha + + +def sample_import_user_events(): + # Create a client + client = retail_v2alpha.UserEventServiceClient() + + # Initialize request argument(s) + input_config = retail_v2alpha.UserEventInputConfig() + input_config.user_event_inline_source.user_events.event_type = "event_type_value" + input_config.user_event_inline_source.user_events.visitor_id = "visitor_id_value" + + request = retail_v2alpha.ImportUserEventsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_ImportUserEvents_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_purge_user_events_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_purge_user_events_async.py new file mode 100644 index 000000000000..17d5c66d7343 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_purge_user_events_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 PurgeUserEvents +# 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_v2alpha_generated_UserEventService_PurgeUserEvents_async] +from google.cloud import retail_v2alpha + + +async def sample_purge_user_events(): + # Create a client + client = retail_v2alpha.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.PurgeUserEventsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_user_events(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_PurgeUserEvents_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_purge_user_events_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_purge_user_events_sync.py new file mode 100644 index 000000000000..d8b2ae83869b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_purge_user_events_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 PurgeUserEvents +# 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_v2alpha_generated_UserEventService_PurgeUserEvents_sync] +from google.cloud import retail_v2alpha + + +def sample_purge_user_events(): + # Create a client + client = retail_v2alpha.UserEventServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.PurgeUserEventsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_PurgeUserEvents_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_rejoin_user_events_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_rejoin_user_events_async.py new file mode 100644 index 000000000000..d38bb5f468e6 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_rejoin_user_events_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RejoinUserEvents +# 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_v2alpha_generated_UserEventService_RejoinUserEvents_async] +from google.cloud import retail_v2alpha + + +async def sample_rejoin_user_events(): + # Create a client + client = retail_v2alpha.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2alpha.RejoinUserEventsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.rejoin_user_events(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_RejoinUserEvents_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_rejoin_user_events_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_rejoin_user_events_sync.py new file mode 100644 index 000000000000..f88f6437720d --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_rejoin_user_events_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RejoinUserEvents +# 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_v2alpha_generated_UserEventService_RejoinUserEvents_sync] +from google.cloud import retail_v2alpha + + +def sample_rejoin_user_events(): + # Create a client + client = retail_v2alpha.UserEventServiceClient() + + # Initialize request argument(s) + request = retail_v2alpha.RejoinUserEventsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.rejoin_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_RejoinUserEvents_sync] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_write_user_event_async.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_write_user_event_async.py new file mode 100644 index 000000000000..2dda0e651057 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_write_user_event_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 WriteUserEvent +# 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_v2alpha_generated_UserEventService_WriteUserEvent_async] +from google.cloud import retail_v2alpha + + +async def sample_write_user_event(): + # Create a client + client = retail_v2alpha.UserEventServiceAsyncClient() + + # Initialize request argument(s) + user_event = retail_v2alpha.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2alpha.WriteUserEventRequest( + parent="parent_value", + user_event=user_event, + ) + + # Make the request + response = await client.write_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_WriteUserEvent_async] diff --git a/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_write_user_event_sync.py b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_write_user_event_sync.py new file mode 100644 index 000000000000..a121bdbd29f1 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2alpha_generated_user_event_service_write_user_event_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 WriteUserEvent +# 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_v2alpha_generated_UserEventService_WriteUserEvent_sync] +from google.cloud import retail_v2alpha + + +def sample_write_user_event(): + # Create a client + client = retail_v2alpha.UserEventServiceClient() + + # Initialize request argument(s) + user_event = retail_v2alpha.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2alpha.WriteUserEventRequest( + parent="parent_value", + user_event=user_event, + ) + + # Make the request + response = client.write_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2alpha_generated_UserEventService_WriteUserEvent_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_add_catalog_attribute_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_add_catalog_attribute_async.py new file mode 100644 index 000000000000..098473669a79 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_add_catalog_attribute_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddCatalogAttribute +# 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_v2beta_generated_CatalogService_AddCatalogAttribute_async] +from google.cloud import retail_v2beta + + +async def sample_add_catalog_attribute(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2beta.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2beta.AddCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = await client.add_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_AddCatalogAttribute_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_add_catalog_attribute_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_add_catalog_attribute_sync.py new file mode 100644 index 000000000000..4f05ae266b01 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_add_catalog_attribute_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddCatalogAttribute +# 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_v2beta_generated_CatalogService_AddCatalogAttribute_sync] +from google.cloud import retail_v2beta + + +def sample_add_catalog_attribute(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2beta.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2beta.AddCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = client.add_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_AddCatalogAttribute_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_attributes_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_attributes_config_async.py new file mode 100644 index 000000000000..637bfe3a2302 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_attributes_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetAttributesConfig +# 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_v2beta_generated_CatalogService_GetAttributesConfig_async] +from google.cloud import retail_v2beta + + +async def sample_get_attributes_config(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.GetAttributesConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_GetAttributesConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_attributes_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_attributes_config_sync.py new file mode 100644 index 000000000000..c347bee253fe --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_attributes_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetAttributesConfig +# 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_v2beta_generated_CatalogService_GetAttributesConfig_sync] +from google.cloud import retail_v2beta + + +def sample_get_attributes_config(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.GetAttributesConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_GetAttributesConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_completion_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_completion_config_async.py new file mode 100644 index 000000000000..2133e940193c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_completion_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetCompletionConfig +# 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_v2beta_generated_CatalogService_GetCompletionConfig_async] +from google.cloud import retail_v2beta + + +async def sample_get_completion_config(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.GetCompletionConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_GetCompletionConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_completion_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_completion_config_sync.py new file mode 100644 index 000000000000..bb9bf00dad8f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_completion_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetCompletionConfig +# 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_v2beta_generated_CatalogService_GetCompletionConfig_sync] +from google.cloud import retail_v2beta + + +def sample_get_completion_config(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.GetCompletionConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_GetCompletionConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_default_branch_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_default_branch_async.py new file mode 100644 index 000000000000..e598ec09f32a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_default_branch_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_GetDefaultBranch_async] +from google.cloud import retail_v2beta + + +async def sample_get_default_branch(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.GetDefaultBranchRequest( + ) + + # Make the request + response = await client.get_default_branch(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_GetDefaultBranch_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_default_branch_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_default_branch_sync.py new file mode 100644 index 000000000000..6adcb072a8eb --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_get_default_branch_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_GetDefaultBranch_sync] +from google.cloud import retail_v2beta + + +def sample_get_default_branch(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.GetDefaultBranchRequest( + ) + + # Make the request + response = client.get_default_branch(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_GetDefaultBranch_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_list_catalogs_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_list_catalogs_async.py new file mode 100644 index 000000000000..b4e3df0e7eb5 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_list_catalogs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_ListCatalogs_async] +from google.cloud import retail_v2beta + + +async def sample_list_catalogs(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.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_v2beta_generated_CatalogService_ListCatalogs_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_list_catalogs_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_list_catalogs_sync.py new file mode 100644 index 000000000000..d938f3ae1d7a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_list_catalogs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_ListCatalogs_sync] +from google.cloud import retail_v2beta + + +def sample_list_catalogs(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.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_v2beta_generated_CatalogService_ListCatalogs_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_remove_catalog_attribute_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_remove_catalog_attribute_async.py new file mode 100644 index 000000000000..032fb3c6952d --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_remove_catalog_attribute_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveCatalogAttribute +# 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_v2beta_generated_CatalogService_RemoveCatalogAttribute_async] +from google.cloud import retail_v2beta + + +async def sample_remove_catalog_attribute(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveCatalogAttributeRequest( + attributes_config="attributes_config_value", + key="key_value", + ) + + # Make the request + response = await client.remove_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_RemoveCatalogAttribute_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_remove_catalog_attribute_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_remove_catalog_attribute_sync.py new file mode 100644 index 000000000000..f1ecc22b150c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_remove_catalog_attribute_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveCatalogAttribute +# 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_v2beta_generated_CatalogService_RemoveCatalogAttribute_sync] +from google.cloud import retail_v2beta + + +def sample_remove_catalog_attribute(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveCatalogAttributeRequest( + attributes_config="attributes_config_value", + key="key_value", + ) + + # Make the request + response = client.remove_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_RemoveCatalogAttribute_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_replace_catalog_attribute_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_replace_catalog_attribute_async.py new file mode 100644 index 000000000000..8a87262f50f0 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_replace_catalog_attribute_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ReplaceCatalogAttribute +# 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_v2beta_generated_CatalogService_ReplaceCatalogAttribute_async] +from google.cloud import retail_v2beta + + +async def sample_replace_catalog_attribute(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2beta.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2beta.ReplaceCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = await client.replace_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_ReplaceCatalogAttribute_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_replace_catalog_attribute_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_replace_catalog_attribute_sync.py new file mode 100644 index 000000000000..24b38d05c79c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_replace_catalog_attribute_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ReplaceCatalogAttribute +# 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_v2beta_generated_CatalogService_ReplaceCatalogAttribute_sync] +from google.cloud import retail_v2beta + + +def sample_replace_catalog_attribute(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + catalog_attribute = retail_v2beta.CatalogAttribute() + catalog_attribute.key = "key_value" + + request = retail_v2beta.ReplaceCatalogAttributeRequest( + attributes_config="attributes_config_value", + catalog_attribute=catalog_attribute, + ) + + # Make the request + response = client.replace_catalog_attribute(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_ReplaceCatalogAttribute_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_set_default_branch_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_set_default_branch_async.py new file mode 100644 index 000000000000..6eec0779274a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_set_default_branch_async.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_SetDefaultBranch_async] +from google.cloud import retail_v2beta + + +async def sample_set_default_branch(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.SetDefaultBranchRequest( + ) + + # Make the request + await client.set_default_branch(request=request) + + +# [END retail_v2beta_generated_CatalogService_SetDefaultBranch_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_set_default_branch_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_set_default_branch_sync.py new file mode 100644 index 000000000000..a3deb8fd39ba --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_set_default_branch_sync.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_SetDefaultBranch_sync] +from google.cloud import retail_v2beta + + +def sample_set_default_branch(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.SetDefaultBranchRequest( + ) + + # Make the request + client.set_default_branch(request=request) + + +# [END retail_v2beta_generated_CatalogService_SetDefaultBranch_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_attributes_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_attributes_config_async.py new file mode 100644 index 000000000000..b4a235ec9363 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_attributes_config_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateAttributesConfig +# 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_v2beta_generated_CatalogService_UpdateAttributesConfig_async] +from google.cloud import retail_v2beta + + +async def sample_update_attributes_config(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + attributes_config = retail_v2beta.AttributesConfig() + attributes_config.name = "name_value" + + request = retail_v2beta.UpdateAttributesConfigRequest( + attributes_config=attributes_config, + ) + + # Make the request + response = await client.update_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_UpdateAttributesConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_attributes_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_attributes_config_sync.py new file mode 100644 index 000000000000..8f82ee5dbab0 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_attributes_config_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateAttributesConfig +# 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_v2beta_generated_CatalogService_UpdateAttributesConfig_sync] +from google.cloud import retail_v2beta + + +def sample_update_attributes_config(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + attributes_config = retail_v2beta.AttributesConfig() + attributes_config.name = "name_value" + + request = retail_v2beta.UpdateAttributesConfigRequest( + attributes_config=attributes_config, + ) + + # Make the request + response = client.update_attributes_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_UpdateAttributesConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_catalog_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_catalog_async.py new file mode 100644 index 000000000000..772504ff2045 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_catalog_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_UpdateCatalog_async] +from google.cloud import retail_v2beta + + +async def sample_update_catalog(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + catalog = retail_v2beta.Catalog() + catalog.name = "name_value" + catalog.display_name = "display_name_value" + + request = retail_v2beta.UpdateCatalogRequest( + catalog=catalog, + ) + + # Make the request + response = await client.update_catalog(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_UpdateCatalog_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_catalog_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_catalog_sync.py new file mode 100644 index 000000000000..ed59d35665e1 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_catalog_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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_v2beta_generated_CatalogService_UpdateCatalog_sync] +from google.cloud import retail_v2beta + + +def sample_update_catalog(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + catalog = retail_v2beta.Catalog() + catalog.name = "name_value" + catalog.display_name = "display_name_value" + + request = retail_v2beta.UpdateCatalogRequest( + catalog=catalog, + ) + + # Make the request + response = client.update_catalog(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_UpdateCatalog_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_completion_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_completion_config_async.py new file mode 100644 index 000000000000..377166a77709 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_completion_config_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateCompletionConfig +# 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_v2beta_generated_CatalogService_UpdateCompletionConfig_async] +from google.cloud import retail_v2beta + + +async def sample_update_completion_config(): + # Create a client + client = retail_v2beta.CatalogServiceAsyncClient() + + # Initialize request argument(s) + completion_config = retail_v2beta.CompletionConfig() + completion_config.name = "name_value" + + request = retail_v2beta.UpdateCompletionConfigRequest( + completion_config=completion_config, + ) + + # Make the request + response = await client.update_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_UpdateCompletionConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_completion_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_completion_config_sync.py new file mode 100644 index 000000000000..f641f121c754 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_catalog_service_update_completion_config_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateCompletionConfig +# 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_v2beta_generated_CatalogService_UpdateCompletionConfig_sync] +from google.cloud import retail_v2beta + + +def sample_update_completion_config(): + # Create a client + client = retail_v2beta.CatalogServiceClient() + + # Initialize request argument(s) + completion_config = retail_v2beta.CompletionConfig() + completion_config.name = "name_value" + + request = retail_v2beta.UpdateCompletionConfigRequest( + completion_config=completion_config, + ) + + # Make the request + response = client.update_completion_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CatalogService_UpdateCompletionConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_completion_service_complete_query_async.py b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_complete_query_async.py new file mode 100644 index 000000000000..96fdc6a6dd27 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_complete_query_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CompleteQuery +# 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_v2beta_generated_CompletionService_CompleteQuery_async] +from google.cloud import retail_v2beta + + +async def sample_complete_query(): + # Create a client + client = retail_v2beta.CompletionServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.CompleteQueryRequest( + catalog="catalog_value", + query="query_value", + ) + + # Make the request + response = await client.complete_query(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CompletionService_CompleteQuery_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_completion_service_complete_query_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_complete_query_sync.py new file mode 100644 index 000000000000..afb0ba7d1c66 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_complete_query_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CompleteQuery +# 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_v2beta_generated_CompletionService_CompleteQuery_sync] +from google.cloud import retail_v2beta + + +def sample_complete_query(): + # Create a client + client = retail_v2beta.CompletionServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.CompleteQueryRequest( + catalog="catalog_value", + query="query_value", + ) + + # Make the request + response = client.complete_query(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CompletionService_CompleteQuery_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_completion_service_import_completion_data_async.py b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_import_completion_data_async.py new file mode 100644 index 000000000000..912753e9f56b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_import_completion_data_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportCompletionData +# 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_v2beta_generated_CompletionService_ImportCompletionData_async] +from google.cloud import retail_v2beta + + +async def sample_import_completion_data(): + # Create a client + client = retail_v2beta.CompletionServiceAsyncClient() + + # Initialize request argument(s) + input_config = retail_v2beta.CompletionDataInputConfig() + input_config.big_query_source.dataset_id = "dataset_id_value" + input_config.big_query_source.table_id = "table_id_value" + + request = retail_v2beta.ImportCompletionDataRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_completion_data(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CompletionService_ImportCompletionData_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_completion_service_import_completion_data_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_import_completion_data_sync.py new file mode 100644 index 000000000000..2cbd277dd839 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_completion_service_import_completion_data_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportCompletionData +# 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_v2beta_generated_CompletionService_ImportCompletionData_sync] +from google.cloud import retail_v2beta + + +def sample_import_completion_data(): + # Create a client + client = retail_v2beta.CompletionServiceClient() + + # Initialize request argument(s) + input_config = retail_v2beta.CompletionDataInputConfig() + input_config.big_query_source.dataset_id = "dataset_id_value" + input_config.big_query_source.table_id = "table_id_value" + + request = retail_v2beta.ImportCompletionDataRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_completion_data(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_CompletionService_ImportCompletionData_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_create_control_async.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_create_control_async.py new file mode 100644 index 000000000000..51e0cb4f8a4e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_create_control_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateControl +# 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_v2beta_generated_ControlService_CreateControl_async] +from google.cloud import retail_v2beta + + +async def sample_create_control(): + # Create a client + client = retail_v2beta.ControlServiceAsyncClient() + + # Initialize request argument(s) + control = retail_v2beta.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.CreateControlRequest( + parent="parent_value", + control=control, + control_id="control_id_value", + ) + + # Make the request + response = await client.create_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ControlService_CreateControl_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_create_control_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_create_control_sync.py new file mode 100644 index 000000000000..8d16b152e64d --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_create_control_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateControl +# 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_v2beta_generated_ControlService_CreateControl_sync] +from google.cloud import retail_v2beta + + +def sample_create_control(): + # Create a client + client = retail_v2beta.ControlServiceClient() + + # Initialize request argument(s) + control = retail_v2beta.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.CreateControlRequest( + parent="parent_value", + control=control, + control_id="control_id_value", + ) + + # Make the request + response = client.create_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ControlService_CreateControl_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_delete_control_async.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_delete_control_async.py new file mode 100644 index 000000000000..cb18f6bac5d6 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_delete_control_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteControl +# 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_v2beta_generated_ControlService_DeleteControl_async] +from google.cloud import retail_v2beta + + +async def sample_delete_control(): + # Create a client + client = retail_v2beta.ControlServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.DeleteControlRequest( + name="name_value", + ) + + # Make the request + await client.delete_control(request=request) + + +# [END retail_v2beta_generated_ControlService_DeleteControl_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_delete_control_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_delete_control_sync.py new file mode 100644 index 000000000000..8a0d4f564d81 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_delete_control_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteControl +# 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_v2beta_generated_ControlService_DeleteControl_sync] +from google.cloud import retail_v2beta + + +def sample_delete_control(): + # Create a client + client = retail_v2beta.ControlServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.DeleteControlRequest( + name="name_value", + ) + + # Make the request + client.delete_control(request=request) + + +# [END retail_v2beta_generated_ControlService_DeleteControl_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_get_control_async.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_get_control_async.py new file mode 100644 index 000000000000..f9eeb9fd1cfc --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_get_control_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetControl +# 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_v2beta_generated_ControlService_GetControl_async] +from google.cloud import retail_v2beta + + +async def sample_get_control(): + # Create a client + client = retail_v2beta.ControlServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.GetControlRequest( + name="name_value", + ) + + # Make the request + response = await client.get_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ControlService_GetControl_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_get_control_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_get_control_sync.py new file mode 100644 index 000000000000..ee0de08a8915 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_get_control_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetControl +# 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_v2beta_generated_ControlService_GetControl_sync] +from google.cloud import retail_v2beta + + +def sample_get_control(): + # Create a client + client = retail_v2beta.ControlServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.GetControlRequest( + name="name_value", + ) + + # Make the request + response = client.get_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ControlService_GetControl_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_list_controls_async.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_list_controls_async.py new file mode 100644 index 000000000000..9a64570644e8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_list_controls_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListControls +# 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_v2beta_generated_ControlService_ListControls_async] +from google.cloud import retail_v2beta + + +async def sample_list_controls(): + # Create a client + client = retail_v2beta.ControlServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.ListControlsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_controls(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2beta_generated_ControlService_ListControls_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_list_controls_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_list_controls_sync.py new file mode 100644 index 000000000000..97c8ba620363 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_list_controls_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListControls +# 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_v2beta_generated_ControlService_ListControls_sync] +from google.cloud import retail_v2beta + + +def sample_list_controls(): + # Create a client + client = retail_v2beta.ControlServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.ListControlsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_controls(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2beta_generated_ControlService_ListControls_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_update_control_async.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_update_control_async.py new file mode 100644 index 000000000000..9a42018c796d --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_update_control_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateControl +# 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_v2beta_generated_ControlService_UpdateControl_async] +from google.cloud import retail_v2beta + + +async def sample_update_control(): + # Create a client + client = retail_v2beta.ControlServiceAsyncClient() + + # Initialize request argument(s) + control = retail_v2beta.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.UpdateControlRequest( + control=control, + ) + + # Make the request + response = await client.update_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ControlService_UpdateControl_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_control_service_update_control_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_control_service_update_control_sync.py new file mode 100644 index 000000000000..2a30620288c8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_control_service_update_control_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateControl +# 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_v2beta_generated_ControlService_UpdateControl_sync] +from google.cloud import retail_v2beta + + +def sample_update_control(): + # Create a client + client = retail_v2beta.ControlServiceClient() + + # Initialize request argument(s) + control = retail_v2beta.Control() + control.facet_spec.facet_key.key = "key_value" + control.display_name = "display_name_value" + control.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.UpdateControlRequest( + control=control, + ) + + # Make the request + response = client.update_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ControlService_UpdateControl_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_prediction_service_predict_async.py b/generated_samples/generated_samples/retail_v2beta_generated_prediction_service_predict_async.py new file mode 100644 index 000000000000..fd37548fad1f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_prediction_service_predict_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Predict +# 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_v2beta_generated_PredictionService_Predict_async] +from google.cloud import retail_v2beta + + +async def sample_predict(): + # Create a client + client = retail_v2beta.PredictionServiceAsyncClient() + + # Initialize request argument(s) + user_event = retail_v2beta.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2beta.PredictRequest( + placement="placement_value", + user_event=user_event, + ) + + # Make the request + response = await client.predict(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_PredictionService_Predict_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_prediction_service_predict_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_prediction_service_predict_sync.py new file mode 100644 index 000000000000..6975056e399c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_prediction_service_predict_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Predict +# 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_v2beta_generated_PredictionService_Predict_sync] +from google.cloud import retail_v2beta + + +def sample_predict(): + # Create a client + client = retail_v2beta.PredictionServiceClient() + + # Initialize request argument(s) + user_event = retail_v2beta.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2beta.PredictRequest( + placement="placement_value", + user_event=user_event, + ) + + # Make the request + response = client.predict(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_PredictionService_Predict_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_fulfillment_places_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_fulfillment_places_async.py new file mode 100644 index 000000000000..92a7a7e19175 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_fulfillment_places_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddFulfillmentPlaces +# 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_v2beta_generated_ProductService_AddFulfillmentPlaces_async] +from google.cloud import retail_v2beta + + +async def sample_add_fulfillment_places(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.AddFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.add_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_AddFulfillmentPlaces_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_fulfillment_places_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_fulfillment_places_sync.py new file mode 100644 index 000000000000..d828edde664b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_fulfillment_places_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddFulfillmentPlaces +# 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_v2beta_generated_ProductService_AddFulfillmentPlaces_sync] +from google.cloud import retail_v2beta + + +def sample_add_fulfillment_places(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.AddFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.add_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_AddFulfillmentPlaces_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_local_inventories_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_local_inventories_async.py new file mode 100644 index 000000000000..ebcf5c80853f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_local_inventories_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddLocalInventories +# 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_v2beta_generated_ProductService_AddLocalInventories_async] +from google.cloud import retail_v2beta + + +async def sample_add_local_inventories(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.AddLocalInventoriesRequest( + product="product_value", + ) + + # Make the request + operation = client.add_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_AddLocalInventories_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_local_inventories_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_local_inventories_sync.py new file mode 100644 index 000000000000..9d3d9ab0facf --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_add_local_inventories_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddLocalInventories +# 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_v2beta_generated_ProductService_AddLocalInventories_sync] +from google.cloud import retail_v2beta + + +def sample_add_local_inventories(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.AddLocalInventoriesRequest( + product="product_value", + ) + + # Make the request + operation = client.add_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_AddLocalInventories_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_create_product_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_create_product_async.py new file mode 100644 index 000000000000..2bba20c0f28c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_create_product_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateProduct +# 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_v2beta_generated_ProductService_CreateProduct_async] +from google.cloud import retail_v2beta + + +async def sample_create_product(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + product = retail_v2beta.Product() + product.title = "title_value" + + request = retail_v2beta.CreateProductRequest( + parent="parent_value", + product=product, + product_id="product_id_value", + ) + + # Make the request + response = await client.create_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_CreateProduct_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_create_product_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_create_product_sync.py new file mode 100644 index 000000000000..32bd03e27e47 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_create_product_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateProduct +# 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_v2beta_generated_ProductService_CreateProduct_sync] +from google.cloud import retail_v2beta + + +def sample_create_product(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + product = retail_v2beta.Product() + product.title = "title_value" + + request = retail_v2beta.CreateProductRequest( + parent="parent_value", + product=product, + product_id="product_id_value", + ) + + # Make the request + response = client.create_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_CreateProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_delete_product_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_delete_product_async.py new file mode 100644 index 000000000000..8f9591fa474c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_delete_product_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteProduct +# 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_v2beta_generated_ProductService_DeleteProduct_async] +from google.cloud import retail_v2beta + + +async def sample_delete_product(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.DeleteProductRequest( + name="name_value", + ) + + # Make the request + await client.delete_product(request=request) + + +# [END retail_v2beta_generated_ProductService_DeleteProduct_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_delete_product_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_delete_product_sync.py new file mode 100644 index 000000000000..56630734d284 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_delete_product_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteProduct +# 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_v2beta_generated_ProductService_DeleteProduct_sync] +from google.cloud import retail_v2beta + + +def sample_delete_product(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.DeleteProductRequest( + name="name_value", + ) + + # Make the request + client.delete_product(request=request) + + +# [END retail_v2beta_generated_ProductService_DeleteProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_get_product_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_get_product_async.py new file mode 100644 index 000000000000..f8dcfc013b50 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_get_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetProduct +# 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_v2beta_generated_ProductService_GetProduct_async] +from google.cloud import retail_v2beta + + +async def sample_get_product(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.GetProductRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_GetProduct_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_get_product_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_get_product_sync.py new file mode 100644 index 000000000000..ab5cd918895a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_get_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetProduct +# 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_v2beta_generated_ProductService_GetProduct_sync] +from google.cloud import retail_v2beta + + +def sample_get_product(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.GetProductRequest( + name="name_value", + ) + + # Make the request + response = client.get_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_GetProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_import_products_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_import_products_async.py new file mode 100644 index 000000000000..aa4256ccf56e --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_import_products_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportProducts +# 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_v2beta_generated_ProductService_ImportProducts_async] +from google.cloud import retail_v2beta + + +async def sample_import_products(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + input_config = retail_v2beta.ProductInputConfig() + input_config.product_inline_source.products.title = "title_value" + + request = retail_v2beta.ImportProductsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_products(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_ImportProducts_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_import_products_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_import_products_sync.py new file mode 100644 index 000000000000..b4bc831484a5 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_import_products_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportProducts +# 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_v2beta_generated_ProductService_ImportProducts_sync] +from google.cloud import retail_v2beta + + +def sample_import_products(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + input_config = retail_v2beta.ProductInputConfig() + input_config.product_inline_source.products.title = "title_value" + + request = retail_v2beta.ImportProductsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_products(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_ImportProducts_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_list_products_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_list_products_async.py new file mode 100644 index 000000000000..e259ecd66e7f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_list_products_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListProducts +# 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_v2beta_generated_ProductService_ListProducts_async] +from google.cloud import retail_v2beta + + +async def sample_list_products(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2beta_generated_ProductService_ListProducts_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_list_products_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_list_products_sync.py new file mode 100644 index 000000000000..5cb40315275b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_list_products_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListProducts +# 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_v2beta_generated_ProductService_ListProducts_sync] +from google.cloud import retail_v2beta + + +def sample_list_products(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2beta_generated_ProductService_ListProducts_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_fulfillment_places_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_fulfillment_places_async.py new file mode 100644 index 000000000000..1b18eb503f7f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_fulfillment_places_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveFulfillmentPlaces +# 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_v2beta_generated_ProductService_RemoveFulfillmentPlaces_async] +from google.cloud import retail_v2beta + + +async def sample_remove_fulfillment_places(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_fulfillment_places_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_fulfillment_places_sync.py new file mode 100644 index 000000000000..f430e360c109 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_fulfillment_places_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveFulfillmentPlaces +# 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_v2beta_generated_ProductService_RemoveFulfillmentPlaces_sync] +from google.cloud import retail_v2beta + + +def sample_remove_fulfillment_places(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveFulfillmentPlacesRequest( + product="product_value", + type_="type__value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_fulfillment_places(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_local_inventories_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_local_inventories_async.py new file mode 100644 index 000000000000..55fba81991c4 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_local_inventories_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveLocalInventories +# 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_v2beta_generated_ProductService_RemoveLocalInventories_async] +from google.cloud import retail_v2beta + + +async def sample_remove_local_inventories(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveLocalInventoriesRequest( + product="product_value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_RemoveLocalInventories_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_local_inventories_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_local_inventories_sync.py new file mode 100644 index 000000000000..31d1e58e6ee8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_remove_local_inventories_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveLocalInventories +# 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_v2beta_generated_ProductService_RemoveLocalInventories_sync] +from google.cloud import retail_v2beta + + +def sample_remove_local_inventories(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveLocalInventoriesRequest( + product="product_value", + place_ids=['place_ids_value_1', 'place_ids_value_2'], + ) + + # Make the request + operation = client.remove_local_inventories(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_RemoveLocalInventories_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_set_inventory_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_set_inventory_async.py new file mode 100644 index 000000000000..9b4670259453 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_set_inventory_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 SetInventory +# 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_v2beta_generated_ProductService_SetInventory_async] +from google.cloud import retail_v2beta + + +async def sample_set_inventory(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + inventory = retail_v2beta.Product() + inventory.title = "title_value" + + request = retail_v2beta.SetInventoryRequest( + inventory=inventory, + ) + + # Make the request + operation = client.set_inventory(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_SetInventory_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_set_inventory_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_set_inventory_sync.py new file mode 100644 index 000000000000..d1061827a8fe --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_set_inventory_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 SetInventory +# 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_v2beta_generated_ProductService_SetInventory_sync] +from google.cloud import retail_v2beta + + +def sample_set_inventory(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + inventory = retail_v2beta.Product() + inventory.title = "title_value" + + request = retail_v2beta.SetInventoryRequest( + inventory=inventory, + ) + + # Make the request + operation = client.set_inventory(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_SetInventory_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_update_product_async.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_update_product_async.py new file mode 100644 index 000000000000..8d9590cd988f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_update_product_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateProduct +# 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_v2beta_generated_ProductService_UpdateProduct_async] +from google.cloud import retail_v2beta + + +async def sample_update_product(): + # Create a client + client = retail_v2beta.ProductServiceAsyncClient() + + # Initialize request argument(s) + product = retail_v2beta.Product() + product.title = "title_value" + + request = retail_v2beta.UpdateProductRequest( + product=product, + ) + + # Make the request + response = await client.update_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_UpdateProduct_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_product_service_update_product_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_product_service_update_product_sync.py new file mode 100644 index 000000000000..fc614e589d8a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_product_service_update_product_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateProduct +# 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_v2beta_generated_ProductService_UpdateProduct_sync] +from google.cloud import retail_v2beta + + +def sample_update_product(): + # Create a client + client = retail_v2beta.ProductServiceClient() + + # Initialize request argument(s) + product = retail_v2beta.Product() + product.title = "title_value" + + request = retail_v2beta.UpdateProductRequest( + product=product, + ) + + # Make the request + response = client.update_product(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ProductService_UpdateProduct_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_search_service_search_async.py b/generated_samples/generated_samples/retail_v2beta_generated_search_service_search_async.py new file mode 100644 index 000000000000..967c910212a0 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_search_service_search_async.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Search +# 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_v2beta_generated_SearchService_Search_async] +from google.cloud import retail_v2beta + + +async def sample_search(): + # Create a client + client = retail_v2beta.SearchServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.SearchRequest( + placement="placement_value", + visitor_id="visitor_id_value", + ) + + # Make the request + page_result = client.search(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2beta_generated_SearchService_Search_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_search_service_search_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_search_service_search_sync.py new file mode 100644 index 000000000000..1e6a5045d23c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_search_service_search_sync.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 Search +# 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_v2beta_generated_SearchService_Search_sync] +from google.cloud import retail_v2beta + + +def sample_search(): + # Create a client + client = retail_v2beta.SearchServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.SearchRequest( + placement="placement_value", + visitor_id="visitor_id_value", + ) + + # Make the request + page_result = client.search(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2beta_generated_SearchService_Search_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_add_control_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_add_control_async.py new file mode 100644 index 000000000000..d65543863d7a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_add_control_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddControl +# 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_v2beta_generated_ServingConfigService_AddControl_async] +from google.cloud import retail_v2beta + + +async def sample_add_control(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.AddControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = await client.add_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_AddControl_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_add_control_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_add_control_sync.py new file mode 100644 index 000000000000..e61e4e2acd07 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_add_control_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 AddControl +# 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_v2beta_generated_ServingConfigService_AddControl_sync] +from google.cloud import retail_v2beta + + +def sample_add_control(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.AddControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = client.add_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_AddControl_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_create_serving_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_create_serving_config_async.py new file mode 100644 index 000000000000..b09fadf22a30 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_create_serving_config_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateServingConfig +# 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_v2beta_generated_ServingConfigService_CreateServingConfig_async] +from google.cloud import retail_v2beta + + +async def sample_create_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + serving_config = retail_v2beta.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.CreateServingConfigRequest( + parent="parent_value", + serving_config=serving_config, + serving_config_id="serving_config_id_value", + ) + + # Make the request + response = await client.create_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_CreateServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_create_serving_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_create_serving_config_sync.py new file mode 100644 index 000000000000..5d4c0993ca91 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_create_serving_config_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CreateServingConfig +# 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_v2beta_generated_ServingConfigService_CreateServingConfig_sync] +from google.cloud import retail_v2beta + + +def sample_create_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + serving_config = retail_v2beta.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.CreateServingConfigRequest( + parent="parent_value", + serving_config=serving_config, + serving_config_id="serving_config_id_value", + ) + + # Make the request + response = client.create_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_CreateServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_delete_serving_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_delete_serving_config_async.py new file mode 100644 index 000000000000..c0b03659043b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_delete_serving_config_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteServingConfig +# 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_v2beta_generated_ServingConfigService_DeleteServingConfig_async] +from google.cloud import retail_v2beta + + +async def sample_delete_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.DeleteServingConfigRequest( + name="name_value", + ) + + # Make the request + await client.delete_serving_config(request=request) + + +# [END retail_v2beta_generated_ServingConfigService_DeleteServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_delete_serving_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_delete_serving_config_sync.py new file mode 100644 index 000000000000..1db19c0ac948 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_delete_serving_config_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 DeleteServingConfig +# 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_v2beta_generated_ServingConfigService_DeleteServingConfig_sync] +from google.cloud import retail_v2beta + + +def sample_delete_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.DeleteServingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_serving_config(request=request) + + +# [END retail_v2beta_generated_ServingConfigService_DeleteServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_get_serving_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_get_serving_config_async.py new file mode 100644 index 000000000000..64f6aeeff157 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_get_serving_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetServingConfig +# 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_v2beta_generated_ServingConfigService_GetServingConfig_async] +from google.cloud import retail_v2beta + + +async def sample_get_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.GetServingConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_GetServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_get_serving_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_get_serving_config_sync.py new file mode 100644 index 000000000000..1cfab934d17f --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_get_serving_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 GetServingConfig +# 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_v2beta_generated_ServingConfigService_GetServingConfig_sync] +from google.cloud import retail_v2beta + + +def sample_get_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.GetServingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_GetServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_list_serving_configs_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_list_serving_configs_async.py new file mode 100644 index 000000000000..7ad0a3aadadb --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_list_serving_configs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListServingConfigs +# 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_v2beta_generated_ServingConfigService_ListServingConfigs_async] +from google.cloud import retail_v2beta + + +async def sample_list_serving_configs(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.ListServingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_serving_configs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END retail_v2beta_generated_ServingConfigService_ListServingConfigs_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_list_serving_configs_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_list_serving_configs_sync.py new file mode 100644 index 000000000000..6a3e7e2a370b --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_list_serving_configs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ListServingConfigs +# 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_v2beta_generated_ServingConfigService_ListServingConfigs_sync] +from google.cloud import retail_v2beta + + +def sample_list_serving_configs(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.ListServingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_serving_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END retail_v2beta_generated_ServingConfigService_ListServingConfigs_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_remove_control_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_remove_control_async.py new file mode 100644 index 000000000000..c9994a00b5f5 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_remove_control_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveControl +# 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_v2beta_generated_ServingConfigService_RemoveControl_async] +from google.cloud import retail_v2beta + + +async def sample_remove_control(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = await client.remove_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_RemoveControl_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_remove_control_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_remove_control_sync.py new file mode 100644 index 000000000000..db6dfa932e3c --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_remove_control_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RemoveControl +# 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_v2beta_generated_ServingConfigService_RemoveControl_sync] +from google.cloud import retail_v2beta + + +def sample_remove_control(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.RemoveControlRequest( + serving_config="serving_config_value", + control_id="control_id_value", + ) + + # Make the request + response = client.remove_control(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_RemoveControl_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_update_serving_config_async.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_update_serving_config_async.py new file mode 100644 index 000000000000..2a6bd3a02601 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_update_serving_config_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateServingConfig +# 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_v2beta_generated_ServingConfigService_UpdateServingConfig_async] +from google.cloud import retail_v2beta + + +async def sample_update_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceAsyncClient() + + # Initialize request argument(s) + serving_config = retail_v2beta.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.UpdateServingConfigRequest( + serving_config=serving_config, + ) + + # Make the request + response = await client.update_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_UpdateServingConfig_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_update_serving_config_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_update_serving_config_sync.py new file mode 100644 index 000000000000..f6441e46a594 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_serving_config_service_update_serving_config_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 UpdateServingConfig +# 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_v2beta_generated_ServingConfigService_UpdateServingConfig_sync] +from google.cloud import retail_v2beta + + +def sample_update_serving_config(): + # Create a client + client = retail_v2beta.ServingConfigServiceClient() + + # Initialize request argument(s) + serving_config = retail_v2beta.ServingConfig() + serving_config.display_name = "display_name_value" + serving_config.solution_types = "SOLUTION_TYPE_SEARCH" + + request = retail_v2beta.UpdateServingConfigRequest( + serving_config=serving_config, + ) + + # Make the request + response = client.update_serving_config(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_ServingConfigService_UpdateServingConfig_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_collect_user_event_async.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_collect_user_event_async.py new file mode 100644 index 000000000000..ce80fabf4702 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_collect_user_event_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CollectUserEvent +# 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_v2beta_generated_UserEventService_CollectUserEvent_async] +from google.cloud import retail_v2beta + + +async def sample_collect_user_event(): + # Create a client + client = retail_v2beta.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.CollectUserEventRequest( + parent="parent_value", + user_event="user_event_value", + ) + + # Make the request + response = await client.collect_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_CollectUserEvent_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_collect_user_event_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_collect_user_event_sync.py new file mode 100644 index 000000000000..ff7df1922fd8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_collect_user_event_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 CollectUserEvent +# 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_v2beta_generated_UserEventService_CollectUserEvent_sync] +from google.cloud import retail_v2beta + + +def sample_collect_user_event(): + # Create a client + client = retail_v2beta.UserEventServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.CollectUserEventRequest( + parent="parent_value", + user_event="user_event_value", + ) + + # Make the request + response = client.collect_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_CollectUserEvent_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_import_user_events_async.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_import_user_events_async.py new file mode 100644 index 000000000000..259c3424c028 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_import_user_events_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportUserEvents +# 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_v2beta_generated_UserEventService_ImportUserEvents_async] +from google.cloud import retail_v2beta + + +async def sample_import_user_events(): + # Create a client + client = retail_v2beta.UserEventServiceAsyncClient() + + # Initialize request argument(s) + input_config = retail_v2beta.UserEventInputConfig() + input_config.user_event_inline_source.user_events.event_type = "event_type_value" + input_config.user_event_inline_source.user_events.visitor_id = "visitor_id_value" + + request = retail_v2beta.ImportUserEventsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_user_events(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_ImportUserEvents_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_import_user_events_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_import_user_events_sync.py new file mode 100644 index 000000000000..89e0ec0257d9 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_import_user_events_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 ImportUserEvents +# 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_v2beta_generated_UserEventService_ImportUserEvents_sync] +from google.cloud import retail_v2beta + + +def sample_import_user_events(): + # Create a client + client = retail_v2beta.UserEventServiceClient() + + # Initialize request argument(s) + input_config = retail_v2beta.UserEventInputConfig() + input_config.user_event_inline_source.user_events.event_type = "event_type_value" + input_config.user_event_inline_source.user_events.visitor_id = "visitor_id_value" + + request = retail_v2beta.ImportUserEventsRequest( + parent="parent_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_ImportUserEvents_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_purge_user_events_async.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_purge_user_events_async.py new file mode 100644 index 000000000000..6f97cab1bda7 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_purge_user_events_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 PurgeUserEvents +# 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_v2beta_generated_UserEventService_PurgeUserEvents_async] +from google.cloud import retail_v2beta + + +async def sample_purge_user_events(): + # Create a client + client = retail_v2beta.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.PurgeUserEventsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_user_events(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_PurgeUserEvents_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_purge_user_events_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_purge_user_events_sync.py new file mode 100644 index 000000000000..212d2693a6e0 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_purge_user_events_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 PurgeUserEvents +# 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_v2beta_generated_UserEventService_PurgeUserEvents_sync] +from google.cloud import retail_v2beta + + +def sample_purge_user_events(): + # Create a client + client = retail_v2beta.UserEventServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.PurgeUserEventsRequest( + parent="parent_value", + filter="filter_value", + ) + + # Make the request + operation = client.purge_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_PurgeUserEvents_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_rejoin_user_events_async.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_rejoin_user_events_async.py new file mode 100644 index 000000000000..8a95e668dbab --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_rejoin_user_events_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RejoinUserEvents +# 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_v2beta_generated_UserEventService_RejoinUserEvents_async] +from google.cloud import retail_v2beta + + +async def sample_rejoin_user_events(): + # Create a client + client = retail_v2beta.UserEventServiceAsyncClient() + + # Initialize request argument(s) + request = retail_v2beta.RejoinUserEventsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.rejoin_user_events(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_RejoinUserEvents_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_rejoin_user_events_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_rejoin_user_events_sync.py new file mode 100644 index 000000000000..ebd635b8182a --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_rejoin_user_events_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 RejoinUserEvents +# 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_v2beta_generated_UserEventService_RejoinUserEvents_sync] +from google.cloud import retail_v2beta + + +def sample_rejoin_user_events(): + # Create a client + client = retail_v2beta.UserEventServiceClient() + + # Initialize request argument(s) + request = retail_v2beta.RejoinUserEventsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.rejoin_user_events(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_RejoinUserEvents_sync] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_write_user_event_async.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_write_user_event_async.py new file mode 100644 index 000000000000..71317cac6ab8 --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_write_user_event_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 WriteUserEvent +# 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_v2beta_generated_UserEventService_WriteUserEvent_async] +from google.cloud import retail_v2beta + + +async def sample_write_user_event(): + # Create a client + client = retail_v2beta.UserEventServiceAsyncClient() + + # Initialize request argument(s) + user_event = retail_v2beta.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2beta.WriteUserEventRequest( + parent="parent_value", + user_event=user_event, + ) + + # Make the request + response = await client.write_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_WriteUserEvent_async] diff --git a/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_write_user_event_sync.py b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_write_user_event_sync.py new file mode 100644 index 000000000000..e93e4df474eb --- /dev/null +++ b/generated_samples/generated_samples/retail_v2beta_generated_user_event_service_write_user_event_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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 WriteUserEvent +# 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_v2beta_generated_UserEventService_WriteUserEvent_sync] +from google.cloud import retail_v2beta + + +def sample_write_user_event(): + # Create a client + client = retail_v2beta.UserEventServiceClient() + + # Initialize request argument(s) + user_event = retail_v2beta.UserEvent() + user_event.event_type = "event_type_value" + user_event.visitor_id = "visitor_id_value" + + request = retail_v2beta.WriteUserEventRequest( + parent="parent_value", + user_event=user_event, + ) + + # Make the request + response = client.write_user_event(request=request) + + # Handle the response + print(response) + +# [END retail_v2beta_generated_UserEventService_WriteUserEvent_sync] diff --git a/generated_samples/generated_samples/snippet_metadata_retail_v2alpha.json b/generated_samples/generated_samples/snippet_metadata_retail_v2alpha.json new file mode 100644 index 000000000000..ea2cf419b108 --- /dev/null +++ b/generated_samples/generated_samples/snippet_metadata_retail_v2alpha.json @@ -0,0 +1,7066 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.retail.v2alpha", + "version": "v2alpha" + } + ], + "language": "PYTHON", + "name": "google-cloud-retail" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.add_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "AddCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "add_catalog_attribute" + }, + "description": "Sample for AddCatalogAttribute", + "file": "retail_v2alpha_generated_catalog_service_add_catalog_attribute_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_AddCatalogAttribute_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_add_catalog_attribute_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.add_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "AddCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "add_catalog_attribute" + }, + "description": "Sample for AddCatalogAttribute", + "file": "retail_v2alpha_generated_catalog_service_add_catalog_attribute_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_AddCatalogAttribute_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_add_catalog_attribute_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.get_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.GetAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetAttributesConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "get_attributes_config" + }, + "description": "Sample for GetAttributesConfig", + "file": "retail_v2alpha_generated_catalog_service_get_attributes_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_GetAttributesConfig_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_get_attributes_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.get_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.GetAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetAttributesConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "get_attributes_config" + }, + "description": "Sample for GetAttributesConfig", + "file": "retail_v2alpha_generated_catalog_service_get_attributes_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_GetAttributesConfig_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_get_attributes_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.get_completion_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.GetCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetCompletionConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.CompletionConfig", + "shortName": "get_completion_config" + }, + "description": "Sample for GetCompletionConfig", + "file": "retail_v2alpha_generated_catalog_service_get_completion_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_GetCompletionConfig_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_get_completion_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.get_completion_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.GetCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetCompletionConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.CompletionConfig", + "shortName": "get_completion_config" + }, + "description": "Sample for GetCompletionConfig", + "file": "retail_v2alpha_generated_catalog_service_get_completion_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_GetCompletionConfig_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_get_completion_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.get_default_branch", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.GetDefaultBranchResponse", + "shortName": "get_default_branch" + }, + "description": "Sample for GetDefaultBranch", + "file": "retail_v2alpha_generated_catalog_service_get_default_branch_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_GetDefaultBranch_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_get_default_branch_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.get_default_branch", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.GetDefaultBranchResponse", + "shortName": "get_default_branch" + }, + "description": "Sample for GetDefaultBranch", + "file": "retail_v2alpha_generated_catalog_service_get_default_branch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_GetDefaultBranch_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_get_default_branch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.list_catalogs", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.ListCatalogs", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ListCatalogs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListCatalogsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.catalog_service.pagers.ListCatalogsAsyncPager", + "shortName": "list_catalogs" + }, + "description": "Sample for ListCatalogs", + "file": "retail_v2alpha_generated_catalog_service_list_catalogs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_ListCatalogs_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_list_catalogs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.list_catalogs", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.ListCatalogs", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ListCatalogs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListCatalogsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.catalog_service.pagers.ListCatalogsPager", + "shortName": "list_catalogs" + }, + "description": "Sample for ListCatalogs", + "file": "retail_v2alpha_generated_catalog_service_list_catalogs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_ListCatalogs_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_list_catalogs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.remove_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.RemoveCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "RemoveCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "remove_catalog_attribute" + }, + "description": "Sample for RemoveCatalogAttribute", + "file": "retail_v2alpha_generated_catalog_service_remove_catalog_attribute_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_RemoveCatalogAttribute_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_remove_catalog_attribute_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.remove_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.RemoveCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "RemoveCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "remove_catalog_attribute" + }, + "description": "Sample for RemoveCatalogAttribute", + "file": "retail_v2alpha_generated_catalog_service_remove_catalog_attribute_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_RemoveCatalogAttribute_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_remove_catalog_attribute_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.replace_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.ReplaceCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ReplaceCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ReplaceCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "replace_catalog_attribute" + }, + "description": "Sample for ReplaceCatalogAttribute", + "file": "retail_v2alpha_generated_catalog_service_replace_catalog_attribute_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_ReplaceCatalogAttribute_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_replace_catalog_attribute_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.replace_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.ReplaceCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ReplaceCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ReplaceCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "replace_catalog_attribute" + }, + "description": "Sample for ReplaceCatalogAttribute", + "file": "retail_v2alpha_generated_catalog_service_replace_catalog_attribute_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_ReplaceCatalogAttribute_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_replace_catalog_attribute_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.set_default_branch", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.SetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "SetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.SetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "set_default_branch" + }, + "description": "Sample for SetDefaultBranch", + "file": "retail_v2alpha_generated_catalog_service_set_default_branch_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_SetDefaultBranch_async", + "segments": [ + { + "end": 41, + "start": 27, + "type": "FULL" + }, + { + "end": 41, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_set_default_branch_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.set_default_branch", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.SetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "SetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.SetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "set_default_branch" + }, + "description": "Sample for SetDefaultBranch", + "file": "retail_v2alpha_generated_catalog_service_set_default_branch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_SetDefaultBranch_sync", + "segments": [ + { + "end": 41, + "start": 27, + "type": "FULL" + }, + { + "end": 41, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_set_default_branch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.update_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateAttributesConfigRequest" + }, + { + "name": "attributes_config", + "type": "google.cloud.retail_v2alpha.types.AttributesConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "update_attributes_config" + }, + "description": "Sample for UpdateAttributesConfig", + "file": "retail_v2alpha_generated_catalog_service_update_attributes_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_UpdateAttributesConfig_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_update_attributes_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.update_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateAttributesConfigRequest" + }, + { + "name": "attributes_config", + "type": "google.cloud.retail_v2alpha.types.AttributesConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.AttributesConfig", + "shortName": "update_attributes_config" + }, + "description": "Sample for UpdateAttributesConfig", + "file": "retail_v2alpha_generated_catalog_service_update_attributes_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_UpdateAttributesConfig_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_update_attributes_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.update_catalog", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.UpdateCatalog", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCatalog" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateCatalogRequest" + }, + { + "name": "catalog", + "type": "google.cloud.retail_v2alpha.types.Catalog" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Catalog", + "shortName": "update_catalog" + }, + "description": "Sample for UpdateCatalog", + "file": "retail_v2alpha_generated_catalog_service_update_catalog_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_UpdateCatalog_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_update_catalog_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.update_catalog", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.UpdateCatalog", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCatalog" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateCatalogRequest" + }, + { + "name": "catalog", + "type": "google.cloud.retail_v2alpha.types.Catalog" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Catalog", + "shortName": "update_catalog" + }, + "description": "Sample for UpdateCatalog", + "file": "retail_v2alpha_generated_catalog_service_update_catalog_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_UpdateCatalog_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_update_catalog_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceAsyncClient.update_completion_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.UpdateCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateCompletionConfigRequest" + }, + { + "name": "completion_config", + "type": "google.cloud.retail_v2alpha.types.CompletionConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.CompletionConfig", + "shortName": "update_completion_config" + }, + "description": "Sample for UpdateCompletionConfig", + "file": "retail_v2alpha_generated_catalog_service_update_completion_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_UpdateCompletionConfig_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_update_completion_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CatalogServiceClient.update_completion_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.CatalogService.UpdateCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateCompletionConfigRequest" + }, + { + "name": "completion_config", + "type": "google.cloud.retail_v2alpha.types.CompletionConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.CompletionConfig", + "shortName": "update_completion_config" + }, + "description": "Sample for UpdateCompletionConfig", + "file": "retail_v2alpha_generated_catalog_service_update_completion_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CatalogService_UpdateCompletionConfig_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_catalog_service_update_completion_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CompletionServiceAsyncClient", + "shortName": "CompletionServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CompletionServiceAsyncClient.complete_query", + "method": { + "fullName": "google.cloud.retail.v2alpha.CompletionService.CompleteQuery", + "service": { + "fullName": "google.cloud.retail.v2alpha.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "CompleteQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CompleteQueryRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.CompleteQueryResponse", + "shortName": "complete_query" + }, + "description": "Sample for CompleteQuery", + "file": "retail_v2alpha_generated_completion_service_complete_query_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CompletionService_CompleteQuery_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_completion_service_complete_query_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CompletionServiceClient", + "shortName": "CompletionServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CompletionServiceClient.complete_query", + "method": { + "fullName": "google.cloud.retail.v2alpha.CompletionService.CompleteQuery", + "service": { + "fullName": "google.cloud.retail.v2alpha.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "CompleteQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CompleteQueryRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.CompleteQueryResponse", + "shortName": "complete_query" + }, + "description": "Sample for CompleteQuery", + "file": "retail_v2alpha_generated_completion_service_complete_query_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CompletionService_CompleteQuery_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_completion_service_complete_query_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.CompletionServiceAsyncClient", + "shortName": "CompletionServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.CompletionServiceAsyncClient.import_completion_data", + "method": { + "fullName": "google.cloud.retail.v2alpha.CompletionService.ImportCompletionData", + "service": { + "fullName": "google.cloud.retail.v2alpha.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "ImportCompletionData" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ImportCompletionDataRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_completion_data" + }, + "description": "Sample for ImportCompletionData", + "file": "retail_v2alpha_generated_completion_service_import_completion_data_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CompletionService_ImportCompletionData_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_completion_service_import_completion_data_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.CompletionServiceClient", + "shortName": "CompletionServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.CompletionServiceClient.import_completion_data", + "method": { + "fullName": "google.cloud.retail.v2alpha.CompletionService.ImportCompletionData", + "service": { + "fullName": "google.cloud.retail.v2alpha.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "ImportCompletionData" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ImportCompletionDataRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_completion_data" + }, + "description": "Sample for ImportCompletionData", + "file": "retail_v2alpha_generated_completion_service_import_completion_data_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_CompletionService_ImportCompletionData_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_completion_service_import_completion_data_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient.create_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.CreateControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "CreateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CreateControlRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "control", + "type": "google.cloud.retail_v2alpha.types.Control" + }, + { + "name": "control_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Control", + "shortName": "create_control" + }, + "description": "Sample for CreateControl", + "file": "retail_v2alpha_generated_control_service_create_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_CreateControl_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_create_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient.create_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.CreateControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "CreateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CreateControlRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "control", + "type": "google.cloud.retail_v2alpha.types.Control" + }, + { + "name": "control_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Control", + "shortName": "create_control" + }, + "description": "Sample for CreateControl", + "file": "retail_v2alpha_generated_control_service_create_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_CreateControl_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_create_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient.delete_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.DeleteControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "DeleteControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.DeleteControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_control" + }, + "description": "Sample for DeleteControl", + "file": "retail_v2alpha_generated_control_service_delete_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_DeleteControl_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_delete_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient.delete_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.DeleteControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "DeleteControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.DeleteControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_control" + }, + "description": "Sample for DeleteControl", + "file": "retail_v2alpha_generated_control_service_delete_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_DeleteControl_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_delete_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient.get_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.GetControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "GetControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Control", + "shortName": "get_control" + }, + "description": "Sample for GetControl", + "file": "retail_v2alpha_generated_control_service_get_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_GetControl_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_get_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient.get_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.GetControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "GetControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Control", + "shortName": "get_control" + }, + "description": "Sample for GetControl", + "file": "retail_v2alpha_generated_control_service_get_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_GetControl_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_get_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient.list_controls", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.ListControls", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "ListControls" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListControlsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.control_service.pagers.ListControlsAsyncPager", + "shortName": "list_controls" + }, + "description": "Sample for ListControls", + "file": "retail_v2alpha_generated_control_service_list_controls_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_ListControls_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_list_controls_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient.list_controls", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.ListControls", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "ListControls" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListControlsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.control_service.pagers.ListControlsPager", + "shortName": "list_controls" + }, + "description": "Sample for ListControls", + "file": "retail_v2alpha_generated_control_service_list_controls_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_ListControls_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_list_controls_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceAsyncClient.update_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.UpdateControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "UpdateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateControlRequest" + }, + { + "name": "control", + "type": "google.cloud.retail_v2alpha.types.Control" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Control", + "shortName": "update_control" + }, + "description": "Sample for UpdateControl", + "file": "retail_v2alpha_generated_control_service_update_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_UpdateControl_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_update_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ControlServiceClient.update_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ControlService.UpdateControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ControlService", + "shortName": "ControlService" + }, + "shortName": "UpdateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateControlRequest" + }, + { + "name": "control", + "type": "google.cloud.retail_v2alpha.types.Control" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Control", + "shortName": "update_control" + }, + "description": "Sample for UpdateControl", + "file": "retail_v2alpha_generated_control_service_update_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ControlService_UpdateControl_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_control_service_update_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.PredictionServiceAsyncClient", + "shortName": "PredictionServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.PredictionServiceAsyncClient.predict", + "method": { + "fullName": "google.cloud.retail.v2alpha.PredictionService.Predict", + "service": { + "fullName": "google.cloud.retail.v2alpha.PredictionService", + "shortName": "PredictionService" + }, + "shortName": "Predict" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.PredictRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.PredictResponse", + "shortName": "predict" + }, + "description": "Sample for Predict", + "file": "retail_v2alpha_generated_prediction_service_predict_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_PredictionService_Predict_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_prediction_service_predict_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.PredictionServiceClient", + "shortName": "PredictionServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.PredictionServiceClient.predict", + "method": { + "fullName": "google.cloud.retail.v2alpha.PredictionService.Predict", + "service": { + "fullName": "google.cloud.retail.v2alpha.PredictionService", + "shortName": "PredictionService" + }, + "shortName": "Predict" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.PredictRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.PredictResponse", + "shortName": "predict" + }, + "description": "Sample for Predict", + "file": "retail_v2alpha_generated_prediction_service_predict_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_PredictionService_Predict_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_prediction_service_predict_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.add_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "add_fulfillment_places" + }, + "description": "Sample for AddFulfillmentPlaces", + "file": "retail_v2alpha_generated_product_service_add_fulfillment_places_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_add_fulfillment_places_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.add_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "add_fulfillment_places" + }, + "description": "Sample for AddFulfillmentPlaces", + "file": "retail_v2alpha_generated_product_service_add_fulfillment_places_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_AddFulfillmentPlaces_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_add_fulfillment_places_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.add_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.AddLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "add_local_inventories" + }, + "description": "Sample for AddLocalInventories", + "file": "retail_v2alpha_generated_product_service_add_local_inventories_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_AddLocalInventories_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_add_local_inventories_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.add_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.AddLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "add_local_inventories" + }, + "description": "Sample for AddLocalInventories", + "file": "retail_v2alpha_generated_product_service_add_local_inventories_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_AddLocalInventories_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_add_local_inventories_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.create_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.CreateProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "CreateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CreateProductRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "product", + "type": "google.cloud.retail_v2alpha.types.Product" + }, + { + "name": "product_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Product", + "shortName": "create_product" + }, + "description": "Sample for CreateProduct", + "file": "retail_v2alpha_generated_product_service_create_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_CreateProduct_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_create_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.create_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.CreateProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "CreateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CreateProductRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "product", + "type": "google.cloud.retail_v2alpha.types.Product" + }, + { + "name": "product_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Product", + "shortName": "create_product" + }, + "description": "Sample for CreateProduct", + "file": "retail_v2alpha_generated_product_service_create_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_CreateProduct_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_create_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.delete_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.DeleteProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "DeleteProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.DeleteProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_product" + }, + "description": "Sample for DeleteProduct", + "file": "retail_v2alpha_generated_product_service_delete_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_DeleteProduct_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_delete_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.delete_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.DeleteProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "DeleteProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.DeleteProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_product" + }, + "description": "Sample for DeleteProduct", + "file": "retail_v2alpha_generated_product_service_delete_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_DeleteProduct_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_delete_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.get_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.GetProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "GetProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Product", + "shortName": "get_product" + }, + "description": "Sample for GetProduct", + "file": "retail_v2alpha_generated_product_service_get_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_GetProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_get_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.get_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.GetProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "GetProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Product", + "shortName": "get_product" + }, + "description": "Sample for GetProduct", + "file": "retail_v2alpha_generated_product_service_get_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_GetProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_get_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.import_products", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.ImportProducts", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "ImportProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ImportProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_products" + }, + "description": "Sample for ImportProducts", + "file": "retail_v2alpha_generated_product_service_import_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_ImportProducts_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_import_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.import_products", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.ImportProducts", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "ImportProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ImportProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_products" + }, + "description": "Sample for ImportProducts", + "file": "retail_v2alpha_generated_product_service_import_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_ImportProducts_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_import_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.list_products", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.ListProducts", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "ListProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListProductsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.product_service.pagers.ListProductsAsyncPager", + "shortName": "list_products" + }, + "description": "Sample for ListProducts", + "file": "retail_v2alpha_generated_product_service_list_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_ListProducts_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_list_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.list_products", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.ListProducts", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "ListProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListProductsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.product_service.pagers.ListProductsPager", + "shortName": "list_products" + }, + "description": "Sample for ListProducts", + "file": "retail_v2alpha_generated_product_service_list_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_ListProducts_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_list_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.purge_products", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.PurgeProducts", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "PurgeProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.PurgeProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "purge_products" + }, + "description": "Sample for PurgeProducts", + "file": "retail_v2alpha_generated_product_service_purge_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_PurgeProducts_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_purge_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.purge_products", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.PurgeProducts", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "PurgeProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.PurgeProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "purge_products" + }, + "description": "Sample for PurgeProducts", + "file": "retail_v2alpha_generated_product_service_purge_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_PurgeProducts_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_purge_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.remove_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "remove_fulfillment_places" + }, + "description": "Sample for RemoveFulfillmentPlaces", + "file": "retail_v2alpha_generated_product_service_remove_fulfillment_places_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_remove_fulfillment_places_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.remove_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "remove_fulfillment_places" + }, + "description": "Sample for RemoveFulfillmentPlaces", + "file": "retail_v2alpha_generated_product_service_remove_fulfillment_places_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_RemoveFulfillmentPlaces_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_remove_fulfillment_places_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.remove_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "remove_local_inventories" + }, + "description": "Sample for RemoveLocalInventories", + "file": "retail_v2alpha_generated_product_service_remove_local_inventories_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_RemoveLocalInventories_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_remove_local_inventories_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.remove_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.RemoveLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "remove_local_inventories" + }, + "description": "Sample for RemoveLocalInventories", + "file": "retail_v2alpha_generated_product_service_remove_local_inventories_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_RemoveLocalInventories_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_remove_local_inventories_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.set_inventory", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.SetInventory", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "SetInventory" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.SetInventoryRequest" + }, + { + "name": "inventory", + "type": "google.cloud.retail_v2alpha.types.Product" + }, + { + "name": "set_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_inventory" + }, + "description": "Sample for SetInventory", + "file": "retail_v2alpha_generated_product_service_set_inventory_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_SetInventory_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_set_inventory_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.set_inventory", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.SetInventory", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "SetInventory" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.SetInventoryRequest" + }, + { + "name": "inventory", + "type": "google.cloud.retail_v2alpha.types.Product" + }, + { + "name": "set_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_inventory" + }, + "description": "Sample for SetInventory", + "file": "retail_v2alpha_generated_product_service_set_inventory_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_SetInventory_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_set_inventory_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceAsyncClient.update_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.UpdateProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "UpdateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateProductRequest" + }, + { + "name": "product", + "type": "google.cloud.retail_v2alpha.types.Product" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Product", + "shortName": "update_product" + }, + "description": "Sample for UpdateProduct", + "file": "retail_v2alpha_generated_product_service_update_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_UpdateProduct_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_update_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ProductServiceClient.update_product", + "method": { + "fullName": "google.cloud.retail.v2alpha.ProductService.UpdateProduct", + "service": { + "fullName": "google.cloud.retail.v2alpha.ProductService", + "shortName": "ProductService" + }, + "shortName": "UpdateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateProductRequest" + }, + { + "name": "product", + "type": "google.cloud.retail_v2alpha.types.Product" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.Product", + "shortName": "update_product" + }, + "description": "Sample for UpdateProduct", + "file": "retail_v2alpha_generated_product_service_update_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ProductService_UpdateProduct_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_product_service_update_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.SearchServiceAsyncClient", + "shortName": "SearchServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.SearchServiceAsyncClient.search", + "method": { + "fullName": "google.cloud.retail.v2alpha.SearchService.Search", + "service": { + "fullName": "google.cloud.retail.v2alpha.SearchService", + "shortName": "SearchService" + }, + "shortName": "Search" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.SearchRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.search_service.pagers.SearchAsyncPager", + "shortName": "search" + }, + "description": "Sample for Search", + "file": "retail_v2alpha_generated_search_service_search_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_SearchService_Search_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_search_service_search_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.SearchServiceClient", + "shortName": "SearchServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.SearchServiceClient.search", + "method": { + "fullName": "google.cloud.retail.v2alpha.SearchService.Search", + "service": { + "fullName": "google.cloud.retail.v2alpha.SearchService", + "shortName": "SearchService" + }, + "shortName": "Search" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.SearchRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.search_service.pagers.SearchPager", + "shortName": "search" + }, + "description": "Sample for Search", + "file": "retail_v2alpha_generated_search_service_search_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_SearchService_Search_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_search_service_search_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.add_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.AddControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "AddControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "add_control" + }, + "description": "Sample for AddControl", + "file": "retail_v2alpha_generated_serving_config_service_add_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_AddControl_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_add_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.add_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.AddControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "AddControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.AddControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "add_control" + }, + "description": "Sample for AddControl", + "file": "retail_v2alpha_generated_serving_config_service_add_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_AddControl_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_add_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.create_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.CreateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "CreateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CreateServingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2alpha.types.ServingConfig" + }, + { + "name": "serving_config_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "create_serving_config" + }, + "description": "Sample for CreateServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_create_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_CreateServingConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_create_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.create_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.CreateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "CreateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CreateServingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2alpha.types.ServingConfig" + }, + { + "name": "serving_config_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "create_serving_config" + }, + "description": "Sample for CreateServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_create_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_CreateServingConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_create_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.delete_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.DeleteServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "DeleteServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.DeleteServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_serving_config" + }, + "description": "Sample for DeleteServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_delete_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_DeleteServingConfig_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_delete_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.delete_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.DeleteServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "DeleteServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.DeleteServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_serving_config" + }, + "description": "Sample for DeleteServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_delete_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_DeleteServingConfig_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_delete_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.get_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.GetServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "GetServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "get_serving_config" + }, + "description": "Sample for GetServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_get_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_GetServingConfig_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_get_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.get_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.GetServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "GetServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.GetServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "get_serving_config" + }, + "description": "Sample for GetServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_get_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_GetServingConfig_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_get_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.list_serving_configs", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.ListServingConfigs", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "ListServingConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListServingConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.serving_config_service.pagers.ListServingConfigsAsyncPager", + "shortName": "list_serving_configs" + }, + "description": "Sample for ListServingConfigs", + "file": "retail_v2alpha_generated_serving_config_service_list_serving_configs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_ListServingConfigs_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_list_serving_configs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.list_serving_configs", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.ListServingConfigs", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "ListServingConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ListServingConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.services.serving_config_service.pagers.ListServingConfigsPager", + "shortName": "list_serving_configs" + }, + "description": "Sample for ListServingConfigs", + "file": "retail_v2alpha_generated_serving_config_service_list_serving_configs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_ListServingConfigs_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_list_serving_configs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.remove_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.RemoveControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "RemoveControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "remove_control" + }, + "description": "Sample for RemoveControl", + "file": "retail_v2alpha_generated_serving_config_service_remove_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_RemoveControl_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_remove_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.remove_control", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.RemoveControl", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "RemoveControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RemoveControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "remove_control" + }, + "description": "Sample for RemoveControl", + "file": "retail_v2alpha_generated_serving_config_service_remove_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_RemoveControl_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_remove_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceAsyncClient.update_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.UpdateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "UpdateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateServingConfigRequest" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2alpha.types.ServingConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "update_serving_config" + }, + "description": "Sample for UpdateServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_update_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_UpdateServingConfig_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_update_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.ServingConfigServiceClient.update_serving_config", + "method": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService.UpdateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2alpha.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "UpdateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.UpdateServingConfigRequest" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2alpha.types.ServingConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.ServingConfig", + "shortName": "update_serving_config" + }, + "description": "Sample for UpdateServingConfig", + "file": "retail_v2alpha_generated_serving_config_service_update_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_ServingConfigService_UpdateServingConfig_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_serving_config_service_update_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient.collect_user_event", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.CollectUserEvent", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "CollectUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CollectUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api.httpbody_pb2.HttpBody", + "shortName": "collect_user_event" + }, + "description": "Sample for CollectUserEvent", + "file": "retail_v2alpha_generated_user_event_service_collect_user_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_CollectUserEvent_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_collect_user_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient.collect_user_event", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.CollectUserEvent", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "CollectUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.CollectUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api.httpbody_pb2.HttpBody", + "shortName": "collect_user_event" + }, + "description": "Sample for CollectUserEvent", + "file": "retail_v2alpha_generated_user_event_service_collect_user_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_CollectUserEvent_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_collect_user_event_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient.import_user_events", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.ImportUserEvents", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ImportUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ImportUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_user_events" + }, + "description": "Sample for ImportUserEvents", + "file": "retail_v2alpha_generated_user_event_service_import_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_ImportUserEvents_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_import_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient.import_user_events", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.ImportUserEvents", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ImportUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.ImportUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_user_events" + }, + "description": "Sample for ImportUserEvents", + "file": "retail_v2alpha_generated_user_event_service_import_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_ImportUserEvents_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_import_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient.purge_user_events", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.PurgeUserEvents", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "PurgeUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.PurgeUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "purge_user_events" + }, + "description": "Sample for PurgeUserEvents", + "file": "retail_v2alpha_generated_user_event_service_purge_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_PurgeUserEvents_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_purge_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient.purge_user_events", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.PurgeUserEvents", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "PurgeUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.PurgeUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "purge_user_events" + }, + "description": "Sample for PurgeUserEvents", + "file": "retail_v2alpha_generated_user_event_service_purge_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_PurgeUserEvents_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_purge_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient.rejoin_user_events", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.RejoinUserEvents", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "RejoinUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RejoinUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "rejoin_user_events" + }, + "description": "Sample for RejoinUserEvents", + "file": "retail_v2alpha_generated_user_event_service_rejoin_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_RejoinUserEvents_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_rejoin_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient.rejoin_user_events", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.RejoinUserEvents", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "RejoinUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.RejoinUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "rejoin_user_events" + }, + "description": "Sample for RejoinUserEvents", + "file": "retail_v2alpha_generated_user_event_service_rejoin_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_RejoinUserEvents_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_rejoin_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceAsyncClient.write_user_event", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.WriteUserEvent", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "WriteUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.WriteUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.UserEvent", + "shortName": "write_user_event" + }, + "description": "Sample for WriteUserEvent", + "file": "retail_v2alpha_generated_user_event_service_write_user_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_WriteUserEvent_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_write_user_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2alpha.UserEventServiceClient.write_user_event", + "method": { + "fullName": "google.cloud.retail.v2alpha.UserEventService.WriteUserEvent", + "service": { + "fullName": "google.cloud.retail.v2alpha.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "WriteUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2alpha.types.WriteUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2alpha.types.UserEvent", + "shortName": "write_user_event" + }, + "description": "Sample for WriteUserEvent", + "file": "retail_v2alpha_generated_user_event_service_write_user_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2alpha_generated_UserEventService_WriteUserEvent_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2alpha_generated_user_event_service_write_user_event_sync.py" + } + ] +} diff --git a/generated_samples/generated_samples/snippet_metadata_retail_v2beta.json b/generated_samples/generated_samples/snippet_metadata_retail_v2beta.json new file mode 100644 index 000000000000..591f20ca1ff9 --- /dev/null +++ b/generated_samples/generated_samples/snippet_metadata_retail_v2beta.json @@ -0,0 +1,6913 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.retail.v2beta", + "version": "v2beta" + } + ], + "language": "PYTHON", + "name": "google-cloud-retail" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.add_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "AddCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "add_catalog_attribute" + }, + "description": "Sample for AddCatalogAttribute", + "file": "retail_v2beta_generated_catalog_service_add_catalog_attribute_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_AddCatalogAttribute_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_add_catalog_attribute_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.add_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "AddCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "add_catalog_attribute" + }, + "description": "Sample for AddCatalogAttribute", + "file": "retail_v2beta_generated_catalog_service_add_catalog_attribute_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_AddCatalogAttribute_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_add_catalog_attribute_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.get_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.GetAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetAttributesConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "get_attributes_config" + }, + "description": "Sample for GetAttributesConfig", + "file": "retail_v2beta_generated_catalog_service_get_attributes_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_GetAttributesConfig_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_get_attributes_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.get_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.GetAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetAttributesConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "get_attributes_config" + }, + "description": "Sample for GetAttributesConfig", + "file": "retail_v2beta_generated_catalog_service_get_attributes_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_GetAttributesConfig_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_get_attributes_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.get_completion_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.GetCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetCompletionConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.CompletionConfig", + "shortName": "get_completion_config" + }, + "description": "Sample for GetCompletionConfig", + "file": "retail_v2beta_generated_catalog_service_get_completion_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_GetCompletionConfig_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_get_completion_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.get_completion_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.GetCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetCompletionConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.CompletionConfig", + "shortName": "get_completion_config" + }, + "description": "Sample for GetCompletionConfig", + "file": "retail_v2beta_generated_catalog_service_get_completion_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_GetCompletionConfig_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_get_completion_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.get_default_branch", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.GetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.GetDefaultBranchResponse", + "shortName": "get_default_branch" + }, + "description": "Sample for GetDefaultBranch", + "file": "retail_v2beta_generated_catalog_service_get_default_branch_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_GetDefaultBranch_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_get_default_branch_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.get_default_branch", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.GetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "GetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.GetDefaultBranchResponse", + "shortName": "get_default_branch" + }, + "description": "Sample for GetDefaultBranch", + "file": "retail_v2beta_generated_catalog_service_get_default_branch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_GetDefaultBranch_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_get_default_branch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.list_catalogs", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.ListCatalogs", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ListCatalogs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListCatalogsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.catalog_service.pagers.ListCatalogsAsyncPager", + "shortName": "list_catalogs" + }, + "description": "Sample for ListCatalogs", + "file": "retail_v2beta_generated_catalog_service_list_catalogs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_ListCatalogs_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_list_catalogs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.list_catalogs", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.ListCatalogs", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ListCatalogs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListCatalogsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.catalog_service.pagers.ListCatalogsPager", + "shortName": "list_catalogs" + }, + "description": "Sample for ListCatalogs", + "file": "retail_v2beta_generated_catalog_service_list_catalogs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_ListCatalogs_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_list_catalogs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.remove_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.RemoveCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "RemoveCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "remove_catalog_attribute" + }, + "description": "Sample for RemoveCatalogAttribute", + "file": "retail_v2beta_generated_catalog_service_remove_catalog_attribute_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_RemoveCatalogAttribute_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_remove_catalog_attribute_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.remove_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.RemoveCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "RemoveCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "remove_catalog_attribute" + }, + "description": "Sample for RemoveCatalogAttribute", + "file": "retail_v2beta_generated_catalog_service_remove_catalog_attribute_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_RemoveCatalogAttribute_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_remove_catalog_attribute_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.replace_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.ReplaceCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ReplaceCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ReplaceCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "replace_catalog_attribute" + }, + "description": "Sample for ReplaceCatalogAttribute", + "file": "retail_v2beta_generated_catalog_service_replace_catalog_attribute_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_ReplaceCatalogAttribute_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_replace_catalog_attribute_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.replace_catalog_attribute", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.ReplaceCatalogAttribute", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "ReplaceCatalogAttribute" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ReplaceCatalogAttributeRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "replace_catalog_attribute" + }, + "description": "Sample for ReplaceCatalogAttribute", + "file": "retail_v2beta_generated_catalog_service_replace_catalog_attribute_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_ReplaceCatalogAttribute_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_replace_catalog_attribute_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.set_default_branch", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.SetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "SetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.SetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "set_default_branch" + }, + "description": "Sample for SetDefaultBranch", + "file": "retail_v2beta_generated_catalog_service_set_default_branch_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_SetDefaultBranch_async", + "segments": [ + { + "end": 41, + "start": 27, + "type": "FULL" + }, + { + "end": 41, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_set_default_branch_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.set_default_branch", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.SetDefaultBranch", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "SetDefaultBranch" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.SetDefaultBranchRequest" + }, + { + "name": "catalog", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "set_default_branch" + }, + "description": "Sample for SetDefaultBranch", + "file": "retail_v2beta_generated_catalog_service_set_default_branch_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_SetDefaultBranch_sync", + "segments": [ + { + "end": 41, + "start": 27, + "type": "FULL" + }, + { + "end": 41, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_set_default_branch_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.update_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateAttributesConfigRequest" + }, + { + "name": "attributes_config", + "type": "google.cloud.retail_v2beta.types.AttributesConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "update_attributes_config" + }, + "description": "Sample for UpdateAttributesConfig", + "file": "retail_v2beta_generated_catalog_service_update_attributes_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_UpdateAttributesConfig_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_update_attributes_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.update_attributes_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateAttributesConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateAttributesConfigRequest" + }, + { + "name": "attributes_config", + "type": "google.cloud.retail_v2beta.types.AttributesConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.AttributesConfig", + "shortName": "update_attributes_config" + }, + "description": "Sample for UpdateAttributesConfig", + "file": "retail_v2beta_generated_catalog_service_update_attributes_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_UpdateAttributesConfig_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_update_attributes_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.update_catalog", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.UpdateCatalog", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCatalog" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateCatalogRequest" + }, + { + "name": "catalog", + "type": "google.cloud.retail_v2beta.types.Catalog" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Catalog", + "shortName": "update_catalog" + }, + "description": "Sample for UpdateCatalog", + "file": "retail_v2beta_generated_catalog_service_update_catalog_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_UpdateCatalog_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_update_catalog_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.update_catalog", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.UpdateCatalog", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCatalog" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateCatalogRequest" + }, + { + "name": "catalog", + "type": "google.cloud.retail_v2beta.types.Catalog" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Catalog", + "shortName": "update_catalog" + }, + "description": "Sample for UpdateCatalog", + "file": "retail_v2beta_generated_catalog_service_update_catalog_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_UpdateCatalog_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_update_catalog_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient", + "shortName": "CatalogServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceAsyncClient.update_completion_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.UpdateCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateCompletionConfigRequest" + }, + { + "name": "completion_config", + "type": "google.cloud.retail_v2beta.types.CompletionConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.CompletionConfig", + "shortName": "update_completion_config" + }, + "description": "Sample for UpdateCompletionConfig", + "file": "retail_v2beta_generated_catalog_service_update_completion_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_UpdateCompletionConfig_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_update_completion_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient", + "shortName": "CatalogServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CatalogServiceClient.update_completion_config", + "method": { + "fullName": "google.cloud.retail.v2beta.CatalogService.UpdateCompletionConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.CatalogService", + "shortName": "CatalogService" + }, + "shortName": "UpdateCompletionConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateCompletionConfigRequest" + }, + { + "name": "completion_config", + "type": "google.cloud.retail_v2beta.types.CompletionConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.CompletionConfig", + "shortName": "update_completion_config" + }, + "description": "Sample for UpdateCompletionConfig", + "file": "retail_v2beta_generated_catalog_service_update_completion_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CatalogService_UpdateCompletionConfig_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_catalog_service_update_completion_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CompletionServiceAsyncClient", + "shortName": "CompletionServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CompletionServiceAsyncClient.complete_query", + "method": { + "fullName": "google.cloud.retail.v2beta.CompletionService.CompleteQuery", + "service": { + "fullName": "google.cloud.retail.v2beta.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "CompleteQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CompleteQueryRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.CompleteQueryResponse", + "shortName": "complete_query" + }, + "description": "Sample for CompleteQuery", + "file": "retail_v2beta_generated_completion_service_complete_query_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CompletionService_CompleteQuery_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_completion_service_complete_query_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CompletionServiceClient", + "shortName": "CompletionServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CompletionServiceClient.complete_query", + "method": { + "fullName": "google.cloud.retail.v2beta.CompletionService.CompleteQuery", + "service": { + "fullName": "google.cloud.retail.v2beta.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "CompleteQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CompleteQueryRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.CompleteQueryResponse", + "shortName": "complete_query" + }, + "description": "Sample for CompleteQuery", + "file": "retail_v2beta_generated_completion_service_complete_query_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CompletionService_CompleteQuery_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_completion_service_complete_query_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.CompletionServiceAsyncClient", + "shortName": "CompletionServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.CompletionServiceAsyncClient.import_completion_data", + "method": { + "fullName": "google.cloud.retail.v2beta.CompletionService.ImportCompletionData", + "service": { + "fullName": "google.cloud.retail.v2beta.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "ImportCompletionData" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ImportCompletionDataRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_completion_data" + }, + "description": "Sample for ImportCompletionData", + "file": "retail_v2beta_generated_completion_service_import_completion_data_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CompletionService_ImportCompletionData_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_completion_service_import_completion_data_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.CompletionServiceClient", + "shortName": "CompletionServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.CompletionServiceClient.import_completion_data", + "method": { + "fullName": "google.cloud.retail.v2beta.CompletionService.ImportCompletionData", + "service": { + "fullName": "google.cloud.retail.v2beta.CompletionService", + "shortName": "CompletionService" + }, + "shortName": "ImportCompletionData" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ImportCompletionDataRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_completion_data" + }, + "description": "Sample for ImportCompletionData", + "file": "retail_v2beta_generated_completion_service_import_completion_data_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_CompletionService_ImportCompletionData_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_completion_service_import_completion_data_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient.create_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.CreateControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "CreateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CreateControlRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "control", + "type": "google.cloud.retail_v2beta.types.Control" + }, + { + "name": "control_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Control", + "shortName": "create_control" + }, + "description": "Sample for CreateControl", + "file": "retail_v2beta_generated_control_service_create_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_CreateControl_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_create_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceClient.create_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.CreateControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "CreateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CreateControlRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "control", + "type": "google.cloud.retail_v2beta.types.Control" + }, + { + "name": "control_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Control", + "shortName": "create_control" + }, + "description": "Sample for CreateControl", + "file": "retail_v2beta_generated_control_service_create_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_CreateControl_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_create_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient.delete_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.DeleteControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "DeleteControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.DeleteControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_control" + }, + "description": "Sample for DeleteControl", + "file": "retail_v2beta_generated_control_service_delete_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_DeleteControl_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_delete_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceClient.delete_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.DeleteControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "DeleteControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.DeleteControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_control" + }, + "description": "Sample for DeleteControl", + "file": "retail_v2beta_generated_control_service_delete_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_DeleteControl_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_delete_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient.get_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.GetControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "GetControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Control", + "shortName": "get_control" + }, + "description": "Sample for GetControl", + "file": "retail_v2beta_generated_control_service_get_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_GetControl_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_get_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceClient.get_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.GetControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "GetControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetControlRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Control", + "shortName": "get_control" + }, + "description": "Sample for GetControl", + "file": "retail_v2beta_generated_control_service_get_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_GetControl_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_get_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient.list_controls", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.ListControls", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "ListControls" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListControlsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.control_service.pagers.ListControlsAsyncPager", + "shortName": "list_controls" + }, + "description": "Sample for ListControls", + "file": "retail_v2beta_generated_control_service_list_controls_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_ListControls_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_list_controls_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceClient.list_controls", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.ListControls", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "ListControls" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListControlsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.control_service.pagers.ListControlsPager", + "shortName": "list_controls" + }, + "description": "Sample for ListControls", + "file": "retail_v2beta_generated_control_service_list_controls_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_ListControls_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_list_controls_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient", + "shortName": "ControlServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceAsyncClient.update_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.UpdateControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "UpdateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateControlRequest" + }, + { + "name": "control", + "type": "google.cloud.retail_v2beta.types.Control" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Control", + "shortName": "update_control" + }, + "description": "Sample for UpdateControl", + "file": "retail_v2beta_generated_control_service_update_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_UpdateControl_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_update_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ControlServiceClient", + "shortName": "ControlServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ControlServiceClient.update_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ControlService.UpdateControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ControlService", + "shortName": "ControlService" + }, + "shortName": "UpdateControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateControlRequest" + }, + { + "name": "control", + "type": "google.cloud.retail_v2beta.types.Control" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Control", + "shortName": "update_control" + }, + "description": "Sample for UpdateControl", + "file": "retail_v2beta_generated_control_service_update_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ControlService_UpdateControl_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_control_service_update_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.PredictionServiceAsyncClient", + "shortName": "PredictionServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.PredictionServiceAsyncClient.predict", + "method": { + "fullName": "google.cloud.retail.v2beta.PredictionService.Predict", + "service": { + "fullName": "google.cloud.retail.v2beta.PredictionService", + "shortName": "PredictionService" + }, + "shortName": "Predict" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.PredictRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.PredictResponse", + "shortName": "predict" + }, + "description": "Sample for Predict", + "file": "retail_v2beta_generated_prediction_service_predict_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_PredictionService_Predict_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_prediction_service_predict_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.PredictionServiceClient", + "shortName": "PredictionServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.PredictionServiceClient.predict", + "method": { + "fullName": "google.cloud.retail.v2beta.PredictionService.Predict", + "service": { + "fullName": "google.cloud.retail.v2beta.PredictionService", + "shortName": "PredictionService" + }, + "shortName": "Predict" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.PredictRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.PredictResponse", + "shortName": "predict" + }, + "description": "Sample for Predict", + "file": "retail_v2beta_generated_prediction_service_predict_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_PredictionService_Predict_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_prediction_service_predict_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.add_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "add_fulfillment_places" + }, + "description": "Sample for AddFulfillmentPlaces", + "file": "retail_v2beta_generated_product_service_add_fulfillment_places_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_AddFulfillmentPlaces_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_add_fulfillment_places_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.add_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "add_fulfillment_places" + }, + "description": "Sample for AddFulfillmentPlaces", + "file": "retail_v2beta_generated_product_service_add_fulfillment_places_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_AddFulfillmentPlaces_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_add_fulfillment_places_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.add_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.AddLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "add_local_inventories" + }, + "description": "Sample for AddLocalInventories", + "file": "retail_v2beta_generated_product_service_add_local_inventories_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_AddLocalInventories_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_add_local_inventories_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.add_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.AddLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "AddLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "add_local_inventories" + }, + "description": "Sample for AddLocalInventories", + "file": "retail_v2beta_generated_product_service_add_local_inventories_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_AddLocalInventories_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_add_local_inventories_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.create_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.CreateProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "CreateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CreateProductRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "product", + "type": "google.cloud.retail_v2beta.types.Product" + }, + { + "name": "product_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Product", + "shortName": "create_product" + }, + "description": "Sample for CreateProduct", + "file": "retail_v2beta_generated_product_service_create_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_CreateProduct_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_create_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.create_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.CreateProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "CreateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CreateProductRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "product", + "type": "google.cloud.retail_v2beta.types.Product" + }, + { + "name": "product_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Product", + "shortName": "create_product" + }, + "description": "Sample for CreateProduct", + "file": "retail_v2beta_generated_product_service_create_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_CreateProduct_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_create_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.delete_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.DeleteProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "DeleteProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.DeleteProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_product" + }, + "description": "Sample for DeleteProduct", + "file": "retail_v2beta_generated_product_service_delete_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_DeleteProduct_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_delete_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.delete_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.DeleteProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "DeleteProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.DeleteProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_product" + }, + "description": "Sample for DeleteProduct", + "file": "retail_v2beta_generated_product_service_delete_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_DeleteProduct_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_delete_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.get_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.GetProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "GetProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Product", + "shortName": "get_product" + }, + "description": "Sample for GetProduct", + "file": "retail_v2beta_generated_product_service_get_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_GetProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_get_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.get_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.GetProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "GetProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetProductRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Product", + "shortName": "get_product" + }, + "description": "Sample for GetProduct", + "file": "retail_v2beta_generated_product_service_get_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_GetProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_get_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.import_products", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.ImportProducts", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "ImportProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ImportProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_products" + }, + "description": "Sample for ImportProducts", + "file": "retail_v2beta_generated_product_service_import_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_ImportProducts_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_import_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.import_products", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.ImportProducts", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "ImportProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ImportProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_products" + }, + "description": "Sample for ImportProducts", + "file": "retail_v2beta_generated_product_service_import_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_ImportProducts_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_import_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.list_products", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.ListProducts", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "ListProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListProductsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.product_service.pagers.ListProductsAsyncPager", + "shortName": "list_products" + }, + "description": "Sample for ListProducts", + "file": "retail_v2beta_generated_product_service_list_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_ListProducts_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_list_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.list_products", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.ListProducts", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "ListProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListProductsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.product_service.pagers.ListProductsPager", + "shortName": "list_products" + }, + "description": "Sample for ListProducts", + "file": "retail_v2beta_generated_product_service_list_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_ListProducts_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_list_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.remove_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "remove_fulfillment_places" + }, + "description": "Sample for RemoveFulfillmentPlaces", + "file": "retail_v2beta_generated_product_service_remove_fulfillment_places_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_remove_fulfillment_places_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.remove_fulfillment_places", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveFulfillmentPlaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveFulfillmentPlacesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "remove_fulfillment_places" + }, + "description": "Sample for RemoveFulfillmentPlaces", + "file": "retail_v2beta_generated_product_service_remove_fulfillment_places_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_RemoveFulfillmentPlaces_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_remove_fulfillment_places_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.remove_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.RemoveLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "remove_local_inventories" + }, + "description": "Sample for RemoveLocalInventories", + "file": "retail_v2beta_generated_product_service_remove_local_inventories_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_RemoveLocalInventories_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_remove_local_inventories_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.remove_local_inventories", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.RemoveLocalInventories", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "RemoveLocalInventories" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveLocalInventoriesRequest" + }, + { + "name": "product", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "remove_local_inventories" + }, + "description": "Sample for RemoveLocalInventories", + "file": "retail_v2beta_generated_product_service_remove_local_inventories_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_RemoveLocalInventories_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_remove_local_inventories_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.set_inventory", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.SetInventory", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "SetInventory" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.SetInventoryRequest" + }, + { + "name": "inventory", + "type": "google.cloud.retail_v2beta.types.Product" + }, + { + "name": "set_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "set_inventory" + }, + "description": "Sample for SetInventory", + "file": "retail_v2beta_generated_product_service_set_inventory_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_SetInventory_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_set_inventory_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.set_inventory", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.SetInventory", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "SetInventory" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.SetInventoryRequest" + }, + { + "name": "inventory", + "type": "google.cloud.retail_v2beta.types.Product" + }, + { + "name": "set_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "set_inventory" + }, + "description": "Sample for SetInventory", + "file": "retail_v2beta_generated_product_service_set_inventory_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_SetInventory_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_set_inventory_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient", + "shortName": "ProductServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceAsyncClient.update_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.UpdateProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "UpdateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateProductRequest" + }, + { + "name": "product", + "type": "google.cloud.retail_v2beta.types.Product" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Product", + "shortName": "update_product" + }, + "description": "Sample for UpdateProduct", + "file": "retail_v2beta_generated_product_service_update_product_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_UpdateProduct_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_update_product_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ProductServiceClient", + "shortName": "ProductServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ProductServiceClient.update_product", + "method": { + "fullName": "google.cloud.retail.v2beta.ProductService.UpdateProduct", + "service": { + "fullName": "google.cloud.retail.v2beta.ProductService", + "shortName": "ProductService" + }, + "shortName": "UpdateProduct" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateProductRequest" + }, + { + "name": "product", + "type": "google.cloud.retail_v2beta.types.Product" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.Product", + "shortName": "update_product" + }, + "description": "Sample for UpdateProduct", + "file": "retail_v2beta_generated_product_service_update_product_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ProductService_UpdateProduct_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_product_service_update_product_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.SearchServiceAsyncClient", + "shortName": "SearchServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.SearchServiceAsyncClient.search", + "method": { + "fullName": "google.cloud.retail.v2beta.SearchService.Search", + "service": { + "fullName": "google.cloud.retail.v2beta.SearchService", + "shortName": "SearchService" + }, + "shortName": "Search" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.SearchRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.search_service.pagers.SearchAsyncPager", + "shortName": "search" + }, + "description": "Sample for Search", + "file": "retail_v2beta_generated_search_service_search_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_SearchService_Search_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_search_service_search_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.SearchServiceClient", + "shortName": "SearchServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.SearchServiceClient.search", + "method": { + "fullName": "google.cloud.retail.v2beta.SearchService.Search", + "service": { + "fullName": "google.cloud.retail.v2beta.SearchService", + "shortName": "SearchService" + }, + "shortName": "Search" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.SearchRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.search_service.pagers.SearchPager", + "shortName": "search" + }, + "description": "Sample for Search", + "file": "retail_v2beta_generated_search_service_search_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_SearchService_Search_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_search_service_search_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.add_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.AddControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "AddControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "add_control" + }, + "description": "Sample for AddControl", + "file": "retail_v2beta_generated_serving_config_service_add_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_AddControl_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_add_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.add_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.AddControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "AddControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.AddControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "add_control" + }, + "description": "Sample for AddControl", + "file": "retail_v2beta_generated_serving_config_service_add_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_AddControl_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_add_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.create_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.CreateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "CreateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CreateServingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2beta.types.ServingConfig" + }, + { + "name": "serving_config_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "create_serving_config" + }, + "description": "Sample for CreateServingConfig", + "file": "retail_v2beta_generated_serving_config_service_create_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_CreateServingConfig_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_create_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.create_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.CreateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "CreateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CreateServingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2beta.types.ServingConfig" + }, + { + "name": "serving_config_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "create_serving_config" + }, + "description": "Sample for CreateServingConfig", + "file": "retail_v2beta_generated_serving_config_service_create_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_CreateServingConfig_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_create_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.delete_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.DeleteServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "DeleteServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.DeleteServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_serving_config" + }, + "description": "Sample for DeleteServingConfig", + "file": "retail_v2beta_generated_serving_config_service_delete_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_DeleteServingConfig_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_delete_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.delete_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.DeleteServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "DeleteServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.DeleteServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_serving_config" + }, + "description": "Sample for DeleteServingConfig", + "file": "retail_v2beta_generated_serving_config_service_delete_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_DeleteServingConfig_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_delete_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.get_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.GetServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "GetServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "get_serving_config" + }, + "description": "Sample for GetServingConfig", + "file": "retail_v2beta_generated_serving_config_service_get_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_GetServingConfig_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_get_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.get_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.GetServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "GetServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.GetServingConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "get_serving_config" + }, + "description": "Sample for GetServingConfig", + "file": "retail_v2beta_generated_serving_config_service_get_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_GetServingConfig_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_get_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.list_serving_configs", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.ListServingConfigs", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "ListServingConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListServingConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.serving_config_service.pagers.ListServingConfigsAsyncPager", + "shortName": "list_serving_configs" + }, + "description": "Sample for ListServingConfigs", + "file": "retail_v2beta_generated_serving_config_service_list_serving_configs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_ListServingConfigs_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_list_serving_configs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.list_serving_configs", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.ListServingConfigs", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "ListServingConfigs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ListServingConfigsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.services.serving_config_service.pagers.ListServingConfigsPager", + "shortName": "list_serving_configs" + }, + "description": "Sample for ListServingConfigs", + "file": "retail_v2beta_generated_serving_config_service_list_serving_configs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_ListServingConfigs_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_list_serving_configs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.remove_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.RemoveControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "RemoveControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "remove_control" + }, + "description": "Sample for RemoveControl", + "file": "retail_v2beta_generated_serving_config_service_remove_control_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_RemoveControl_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_remove_control_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.remove_control", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.RemoveControl", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "RemoveControl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RemoveControlRequest" + }, + { + "name": "serving_config", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "remove_control" + }, + "description": "Sample for RemoveControl", + "file": "retail_v2beta_generated_serving_config_service_remove_control_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_RemoveControl_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_remove_control_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient", + "shortName": "ServingConfigServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceAsyncClient.update_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.UpdateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "UpdateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateServingConfigRequest" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2beta.types.ServingConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "update_serving_config" + }, + "description": "Sample for UpdateServingConfig", + "file": "retail_v2beta_generated_serving_config_service_update_serving_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_UpdateServingConfig_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_update_serving_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient", + "shortName": "ServingConfigServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.ServingConfigServiceClient.update_serving_config", + "method": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService.UpdateServingConfig", + "service": { + "fullName": "google.cloud.retail.v2beta.ServingConfigService", + "shortName": "ServingConfigService" + }, + "shortName": "UpdateServingConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.UpdateServingConfigRequest" + }, + { + "name": "serving_config", + "type": "google.cloud.retail_v2beta.types.ServingConfig" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.ServingConfig", + "shortName": "update_serving_config" + }, + "description": "Sample for UpdateServingConfig", + "file": "retail_v2beta_generated_serving_config_service_update_serving_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_ServingConfigService_UpdateServingConfig_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_serving_config_service_update_serving_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient.collect_user_event", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.CollectUserEvent", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "CollectUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CollectUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api.httpbody_pb2.HttpBody", + "shortName": "collect_user_event" + }, + "description": "Sample for CollectUserEvent", + "file": "retail_v2beta_generated_user_event_service_collect_user_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_CollectUserEvent_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_collect_user_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient.collect_user_event", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.CollectUserEvent", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "CollectUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.CollectUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api.httpbody_pb2.HttpBody", + "shortName": "collect_user_event" + }, + "description": "Sample for CollectUserEvent", + "file": "retail_v2beta_generated_user_event_service_collect_user_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_CollectUserEvent_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_collect_user_event_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient.import_user_events", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.ImportUserEvents", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ImportUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ImportUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "import_user_events" + }, + "description": "Sample for ImportUserEvents", + "file": "retail_v2beta_generated_user_event_service_import_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_ImportUserEvents_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_import_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient.import_user_events", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.ImportUserEvents", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "ImportUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.ImportUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "import_user_events" + }, + "description": "Sample for ImportUserEvents", + "file": "retail_v2beta_generated_user_event_service_import_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_ImportUserEvents_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_import_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient.purge_user_events", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.PurgeUserEvents", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "PurgeUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.PurgeUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "purge_user_events" + }, + "description": "Sample for PurgeUserEvents", + "file": "retail_v2beta_generated_user_event_service_purge_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_PurgeUserEvents_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_purge_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient.purge_user_events", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.PurgeUserEvents", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "PurgeUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.PurgeUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "purge_user_events" + }, + "description": "Sample for PurgeUserEvents", + "file": "retail_v2beta_generated_user_event_service_purge_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_PurgeUserEvents_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_purge_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient.rejoin_user_events", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.RejoinUserEvents", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "RejoinUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RejoinUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "rejoin_user_events" + }, + "description": "Sample for RejoinUserEvents", + "file": "retail_v2beta_generated_user_event_service_rejoin_user_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_RejoinUserEvents_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_rejoin_user_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient.rejoin_user_events", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.RejoinUserEvents", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "RejoinUserEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.RejoinUserEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "rejoin_user_events" + }, + "description": "Sample for RejoinUserEvents", + "file": "retail_v2beta_generated_user_event_service_rejoin_user_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_RejoinUserEvents_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_rejoin_user_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient", + "shortName": "UserEventServiceAsyncClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceAsyncClient.write_user_event", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.WriteUserEvent", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "WriteUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.WriteUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.UserEvent", + "shortName": "write_user_event" + }, + "description": "Sample for WriteUserEvent", + "file": "retail_v2beta_generated_user_event_service_write_user_event_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_WriteUserEvent_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_write_user_event_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient", + "shortName": "UserEventServiceClient" + }, + "fullName": "google.cloud.retail_v2beta.UserEventServiceClient.write_user_event", + "method": { + "fullName": "google.cloud.retail.v2beta.UserEventService.WriteUserEvent", + "service": { + "fullName": "google.cloud.retail.v2beta.UserEventService", + "shortName": "UserEventService" + }, + "shortName": "WriteUserEvent" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.retail_v2beta.types.WriteUserEventRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.retail_v2beta.types.UserEvent", + "shortName": "write_user_event" + }, + "description": "Sample for WriteUserEvent", + "file": "retail_v2beta_generated_user_event_service_write_user_event_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "retail_v2beta_generated_UserEventService_WriteUserEvent_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "retail_v2beta_generated_user_event_service_write_user_event_sync.py" + } + ] +}