Skip to content

Commit

Permalink
feat: generate v2alpha/v2beta (#226)
Browse files Browse the repository at this point in the history
* feat: generate v2alpha/v2beta

* chore: fix docstring formatting
  • Loading branch information
parthea authored and dandhlee committed Dec 2, 2022
1 parent 33dd507 commit bbd4695
Show file tree
Hide file tree
Showing 176 changed files with 22,311 additions and 0 deletions.
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]
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]
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]
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]
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]
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]
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]
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]
Loading

0 comments on commit bbd4695

Please sign in to comment.