API documentation for retail_v2.types
package.
Classes
AddFulfillmentPlacesMetadata
Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the [AddFulfillmentPlaces][] method.
AddFulfillmentPlacesRequest
Request message for [AddFulfillmentPlaces][] method. .. attribute:: product
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.
:type: str
AddFulfillmentPlacesResponse
Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the [AddFulfillmentPlaces][] method.
Audience
An intended audience of the Product for whom it's sold.
BigQuerySource
BigQuery source import data from. .. attribute:: partition_date
BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
Only supported when
ImportProductsRequest.reconciliation_mode
is set to FULL
.
:type: google.type.date_pb2.Date
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
ColorInfo
The color information of a Product.
CompleteQueryRequest
Auto-complete parameters. .. attribute:: catalog
Required. Catalog for which the completion is performed.
Full resource name of catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
:type: str
CompleteQueryResponse
Response of the auto-complete query. .. attribute:: completion_results
Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
:type: Sequence[google.cloud.retail_v2.types.CompleteQueryResponse.CompletionResult]
CompletionDataInputConfig
The input config source for completion data. .. attribute:: big_query_source
Required. BigQuery input source. Add the IAM permission "BigQuery Data Viewer" for cloud-retail-customer-data- access@system.gserviceaccount.com before using this feature otherwise an error is thrown.
CompletionDetail
Detailed completion information including completion attribution token and clicked completion info.
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.
The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned.
All inventory information for the named Product will be deleted.
:type: str
FulfillmentInfo
Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
GcsSource
Google Cloud Storage location for input content. format.
GetDefaultBranchRequest
Request message to show which branch is currently the default branch.
GetDefaultBranchResponse
Response message of CatalogService.GetDefaultBranch.
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
ImportCompletionDataRequest
Request message for ImportCompletionData methods. .. attribute:: parent
Required. The catalog which the suggestions dataset belongs to.
Format:
projects/1234/locations/global/catalogs/default_catalog
.
:type: str
ImportCompletionDataResponse
Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.
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.
Interval
A floating point interval. .. attribute:: minimum
Inclusive lower bound.
:type: float
ListCatalogsRequest
Request for CatalogService.ListCatalogs method.
ListCatalogsResponse
Response for CatalogService.ListCatalogs method.
ListProductsRequest
Request message for ProductService.ListProducts method.
ListProductsResponse
Response message for ProductService.ListProducts 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 Recommendations AI placement. Before you can
request predictions from your model, you must create at
least one placement for it. For more information, see
Managing
placements <https://cloud.google.com/retail/recommendations-ai/docs/manage-placements>
__.
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.
Required field(s):
- Product.id
Optional override field(s):
- Product.price_info
If any supported optional fields are provided, we will treat them as a full override when looking up product information from the catalog. Thus, it is important to ensure that the overriding fields are accurate and complete.
All other product fields are ignored and instead populated via catalog lookup after event ingestion.
: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.
ProductLevelConfig
Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.
Promotion
Promotion information. .. attribute:: promotion_id
ID of the promotion. For example, "free gift".
The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned.
Google Merchant Center property
promotion <https://support.google.com/merchants/answer/7050148>
__.
:type: str
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.
Rating
The rating of a Product. .. attribute:: rating_count
The total number of ratings. This value is independent of the value of rating_histogram.
This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
:type: int
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
RemoveFulfillmentPlacesMetadata
Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the [RemoveFulfillmentPlaces][] method.
RemoveFulfillmentPlacesRequest
Request message for [RemoveFulfillmentPlaces][] method. .. attribute:: product
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.
:type: str
RemoveFulfillmentPlacesResponse
Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the [RemoveFulfillmentPlaces][] method.
SearchRequest
Request message for SearchService.Search method.
SearchResponse
Response message for SearchService.Search method.
SetDefaultBranchRequest
Request message to set a specified branch as new default_branch. .. attribute:: catalog
Full resource name of the catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
:type: str
SetInventoryMetadata
Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the [SetInventory][] method.
SetInventoryRequest
Request message for [SetInventory][] method. .. attribute:: inventory
Required. The inventory information to update. The allowable fields to update are:
- Product.price_info
- Product.availability
- Product.available_quantity
Product.fulfillment_info The updated inventory fields must be specified in SetInventoryRequest.set_mask.
If [SetInventoryRequest.inventory.name][] is empty or invalid, an INVALID_ARGUMENT error is returned.
If the caller does not have permission to update the Product named in Product.name, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the Product to update does not have existing inventory information, the provided inventory information will be inserted.
If the Product to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for SetInventoryRequest.set_time.
The last update time is recorded for the following inventory fields:
- Product.price_info
- Product.availability
- Product.available_quantity
- Product.fulfillment_info
If a full overwrite of inventory information while ignoring timestamps is needed, [UpdateProduct][] should be invoked instead.
SetInventoryResponse
Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the [SetInventory][] method.
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 and allow_missing is not set, a NOT_FOUND error is returned.
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.
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