Package types (0.2.0)

API documentation for retail_v2.types package.

Classes

BigQuerySource

BigQuery source import data from. .. attribute:: project_id

The project id (can be project # or id) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project id from the parent request.

:type: str

Catalog

The catalog configuration. .. attribute:: name

Required. Immutable. The fully qualified resource name of the catalog.

:type: str

CollectUserEventRequest

Request message for CollectUserEvent method. .. attribute:: parent

Required. The parent catalog name, such as projects/1234/locations/global/catalogs/default_catalog.

:type: str

CreateProductRequest

Request message for [CreateProduct][] method. .. attribute:: parent

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

:type: str

CustomAttribute

A custom attribute that is not explicitly modeled in Product].

DeleteProductRequest

Request message for [DeleteProduct][] method. .. attribute:: name

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the Product to delete does not exist, a NOT_FOUND error is returned.

:type: str

GcsSource

Google Cloud Storage location for input content. format.

GetProductRequest

Request message for [GetProduct][] method. .. attribute:: name

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested Product does not exist, a NOT_FOUND error is returned.

:type: str

Image

Product thumbnail/detail image. .. attribute:: uri

Required. URI of the image.

This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Google Merchant Center property image_link <https://support.google.com/merchants/answer/6324350>. Schema.org property Product.image <https://schema.org/image>.

:type: str

ImportErrorsConfig

Configuration of destination for Import related errors. .. attribute:: gcs_prefix

Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded google.rpc.Status message.

:type: str

ImportMetadata

Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.

ImportProductsRequest

Request message for Import methods. .. attribute:: parent

Required. projects/1234/locations/global/catalogs/default_catalog/branches/default_branch

If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

:type: str

ImportProductsResponse

Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.

ImportUserEventsRequest

Request message for the ImportUserEvents request. .. attribute:: parent

Required. projects/1234/locations/global/catalogs/default_catalog

:type: str

ImportUserEventsResponse

Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.

ListCatalogsRequest

Request for CatalogService.ListCatalogs method.

ListCatalogsResponse

Response for CatalogService.ListCatalogs method.

PredictRequest

Request message for Predict method. .. attribute:: placement

Required. Full resource name of the format: {name=projects//locations/global/catalogs/default_catalog/placements/} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction.

We currently support three placements with the following IDs by default:

  • shopping_cart: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after add-to-cart events, on product detail pages, or on the shopping cart page.

  • home_page: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified userId or visitorId. For example - Recommendations for you.

  • product_detail: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified userId or visitorId and its relevance to a specified CatalogItem. Typically used on product detail pages. For example - More products like this.

  • recently_viewed_default: Returns up to 75 products recently viewed by the specified userId or visitorId, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example

    • Recently viewed.

    The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements

    :type: str

PredictResponse

Response message for predict method. .. attribute:: results

A list of recommended products. The order represents the ranking (from the most relevant product to the least).

:type: Sequence[google.cloud.retail_v2.types.PredictResponse.PredictionResult]

PriceInfo

The price information of a Product.

Product

Product captures all metadata information of items to be recommended or searched.

ProductDetail

Detailed product information associated with a user event. .. attribute:: product

Required. Product information.

Only Product.id field is used when ingesting an event, all other product fields are ignored as we will look them up from the catalog.

:type: google.cloud.retail_v2.types.Product

ProductInlineSource

The inline source for the input config for ImportProducts method.

ProductInputConfig

The input config source for products. .. attribute:: product_inline_source

The Inline source for the input content for products.

:type: google.cloud.retail_v2.types.ProductInlineSource

ProductLevelConfig

Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.

PurchaseTransaction

A transaction represents the entire purchase transaction. .. attribute:: id

The transaction ID with a length limit of 128 characters.

:type: str

PurgeMetadata

Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.

PurgeUserEventsRequest

Request message for PurgeUserEvents method. .. attribute:: parent

Required. The resource name of the catalog under which the events are created. The format is "projects/${projectId}/locations/global/catalogs/${catalogId}".

:type: str

PurgeUserEventsResponse

Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.

RejoinUserEventsMetadata

Metadata for RejoinUserEvents method.

RejoinUserEventsRequest

Request message for RejoinUserEvents method. .. attribute:: parent

Required. The parent catalog resource name, such as projects/1234/locations/global/catalogs/default_catalog.

:type: str

RejoinUserEventsResponse

Response message for RejoinUserEvents method. .. attribute:: rejoined_user_events_count

Number of user events that were joined with latest product catalog.

:type: int

UpdateCatalogRequest

Request for CatalogService.UpdateCatalog method.

UpdateProductRequest

Request message for [UpdateProduct][] method. .. attribute:: product

Required. The product to update/create.

If the caller does not have permission to update the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the Product to update does not exist, a NOT_FOUND error is returned.

:type: google.cloud.retail_v2.types.Product

UserEvent

UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.

UserEventImportSummary

A summary of import result. The UserEventImportSummary summarizes the import status for user events.

UserEventInlineSource

The inline source for the input config for ImportUserEvents method.

UserEventInputConfig

The input config source for user events. .. attribute:: user_event_inline_source

Required. The Inline source for the input content for UserEvents.

:type: google.cloud.retail_v2.types.UserEventInlineSource

UserInfo

Information of an end user. .. attribute:: user_id

Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name.

The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

:type: str

WriteUserEventRequest

Request message for WriteUserEvent method. .. attribute:: parent

Required. The parent catalog resource name, such as projects/1234/locations/global/catalogs/default_catalog.

:type: str