Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.2 (#151)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent 1714d71 commit eab72c6
Show file tree
Hide file tree
Showing 57 changed files with 5,120 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,27 @@ async def list_catalogs(
r"""Lists all the [Catalog][google.cloud.retail.v2.Catalog]s
associated with the project.
.. code-block::
from google.cloud import retail_v2
def sample_list_catalogs():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
request = retail_v2.ListCatalogsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_catalogs(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.retail_v2.types.ListCatalogsRequest, dict]):
The request object. Request for
Expand Down Expand Up @@ -308,6 +329,29 @@ async def update_catalog(
) -> gcr_catalog.Catalog:
r"""Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
.. code-block::
from google.cloud import retail_v2
def sample_update_catalog():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
catalog = retail_v2.Catalog()
catalog.name = "name_value"
catalog.display_name = "display_name_value"
request = retail_v2.UpdateCatalogRequest(
catalog=catalog,
)
# Make the request
response = client.update_catalog(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.UpdateCatalogRequest, dict]):
The request object. Request for
Expand Down Expand Up @@ -439,6 +483,22 @@ async def set_default_branch(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_set_default_branch():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
request = retail_v2.SetDefaultBranchRequest(
)
# Make the request
client.set_default_branch(request=request)
Args:
request (Union[google.cloud.retail_v2.types.SetDefaultBranchRequest, dict]):
The request object. Request message to set a specified
Expand Down Expand Up @@ -510,6 +570,25 @@ async def get_default_branch(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_get_default_branch():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
request = retail_v2.GetDefaultBranchRequest(
)
# Make the request
response = client.get_default_branch(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.GetDefaultBranchRequest, dict]):
The request object. Request message to show which branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,28 @@ def list_catalogs(
r"""Lists all the [Catalog][google.cloud.retail.v2.Catalog]s
associated with the project.
.. code-block::
from google.cloud import retail_v2
def sample_list_catalogs():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
request = retail_v2.ListCatalogsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_catalogs(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.retail_v2.types.ListCatalogsRequest, dict]):
The request object. Request for
Expand Down Expand Up @@ -519,6 +541,30 @@ def update_catalog(
) -> gcr_catalog.Catalog:
r"""Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
.. code-block::
from google.cloud import retail_v2
def sample_update_catalog():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
catalog = retail_v2.Catalog()
catalog.name = "name_value"
catalog.display_name = "display_name_value"
request = retail_v2.UpdateCatalogRequest(
catalog=catalog,
)
# Make the request
response = client.update_catalog(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.UpdateCatalogRequest, dict]):
The request object. Request for
Expand Down Expand Up @@ -650,6 +696,23 @@ def set_default_branch(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_set_default_branch():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
request = retail_v2.SetDefaultBranchRequest(
)
# Make the request
client.set_default_branch(request=request)
Args:
request (Union[google.cloud.retail_v2.types.SetDefaultBranchRequest, dict]):
The request object. Request message to set a specified
Expand Down Expand Up @@ -721,6 +784,26 @@ def get_default_branch(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_get_default_branch():
# Create a client
client = retail_v2.CatalogServiceClient()
# Initialize request argument(s)
request = retail_v2.GetDefaultBranchRequest(
)
# Make the request
response = client.get_default_branch(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.GetDefaultBranchRequest, dict]):
The request object. Request message to show which branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,27 @@ async def complete_query(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_complete_query():
# Create a client
client = retail_v2.CompletionServiceClient()
# Initialize request argument(s)
request = retail_v2.CompleteQueryRequest(
catalog="catalog_value",
query="query_value",
)
# Make the request
response = client.complete_query(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.CompleteQueryRequest, dict]):
The request object. Auto-complete parameters.
Expand Down Expand Up @@ -279,6 +300,35 @@ async def import_completion_data(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_import_completion_data():
# Create a client
client = retail_v2.CompletionServiceClient()
# Initialize request argument(s)
input_config = retail_v2.CompletionDataInputConfig()
input_config.big_query_source.dataset_id = "dataset_id_value"
input_config.big_query_source.table_id = "table_id_value"
request = retail_v2.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)
Args:
request (Union[google.cloud.retail_v2.types.ImportCompletionDataRequest, dict]):
The request object. Request message for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,28 @@ def complete_query(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_complete_query():
# Create a client
client = retail_v2.CompletionServiceClient()
# Initialize request argument(s)
request = retail_v2.CompleteQueryRequest(
catalog="catalog_value",
query="query_value",
)
# Make the request
response = client.complete_query(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.CompleteQueryRequest, dict]):
The request object. Auto-complete parameters.
Expand Down Expand Up @@ -479,6 +501,36 @@ def import_completion_data(
`here <https://cloud.google.com/contact>`__ to contact cloud
sales if you are interested in using Retail Search.
.. code-block::
from google.cloud import retail_v2
def sample_import_completion_data():
# Create a client
client = retail_v2.CompletionServiceClient()
# Initialize request argument(s)
input_config = retail_v2.CompletionDataInputConfig()
input_config.big_query_source.dataset_id = "dataset_id_value"
input_config.big_query_source.table_id = "table_id_value"
request = retail_v2.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)
Args:
request (Union[google.cloud.retail_v2.types.ImportCompletionDataRequest, dict]):
The request object. Request message for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,30 @@ async def predict(
) -> prediction_service.PredictResponse:
r"""Makes a recommendation prediction.
.. code-block::
from google.cloud import retail_v2
def sample_predict():
# Create a client
client = retail_v2.PredictionServiceClient()
# Initialize request argument(s)
user_event = retail_v2.UserEvent()
user_event.event_type = "event_type_value"
user_event.visitor_id = "visitor_id_value"
request = retail_v2.PredictRequest(
placement="placement_value",
user_event=user_event,
)
# Make the request
response = client.predict(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.retail_v2.types.PredictRequest, dict]):
The request object. Request message for Predict method.
Expand Down
Loading

0 comments on commit eab72c6

Please sign in to comment.