-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate v2alpha/v2beta (#226)
* feat: generate v2alpha/v2beta * chore: fix docstring formatting
- Loading branch information
Showing
176 changed files
with
22,311 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
49 changes: 49 additions & 0 deletions
49
.../generated_samples/retail_v2alpha_generated_catalog_service_add_catalog_attribute_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
45 changes: 45 additions & 0 deletions
45
...generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
45 changes: 45 additions & 0 deletions
45
.../generated_samples/retail_v2alpha_generated_catalog_service_get_attributes_config_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
45 changes: 45 additions & 0 deletions
45
...generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
45 changes: 45 additions & 0 deletions
45
.../generated_samples/retail_v2alpha_generated_catalog_service_get_completion_config_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
44 changes: 44 additions & 0 deletions
44
...es/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
44 changes: 44 additions & 0 deletions
44
...les/generated_samples/retail_v2alpha_generated_catalog_service_get_default_branch_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
Oops, something went wrong.