Struct googapis::google::cloud::retail::v2alpha::PredictRequest[][src]

pub struct PredictRequest {
    pub placement: String,
    pub user_event: Option<UserEvent>,
    pub page_size: i32,
    pub page_token: String,
    pub filter: String,
    pub validate_only: bool,
    pub params: HashMap<String, Value>,
    pub labels: HashMap<String, String>,
}
Expand description

Request message for Predict method.

Fields

placement: String

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.

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

user_event: Option<UserEvent>

Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won’t be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging.

page_size: i32

Maximum number of results to return per page. Set this property to the number of prediction results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.

page_token: String

The previous PredictResponse.next_page_token.

filter: String

Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the filterOutOfStockItems flag.

Examples:

If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set strictFiltering to false in PredictRequest.params.

validate_only: bool

Use validate only mode for this prediction query. If set to true, a dummy model will be used that returns arbitrary products. Note that the validate only mode should only be used for testing the API, or if the model is not ready.

params: HashMap<String, Value>

Additional domain specific parameters for the predictions.

Allowed values:

labels: HashMap<String, String>

The labels applied to a resource must meet the following requirements:

See Google Cloud Document for more details.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more