Struct gapi_grpc::google::cloud::retail::v2beta::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>,
}

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 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:

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 for the predict request.

See https://goo.gl/xmQnxf for more information on and examples of labels.

Trait Implementations

impl Clone for PredictRequest[src]

impl Debug for PredictRequest[src]

impl Default for PredictRequest[src]

impl Message for PredictRequest[src]

impl PartialEq<PredictRequest> for PredictRequest[src]

impl StructuralPartialEq for PredictRequest[src]

Auto Trait Implementations

impl RefUnwindSafe for PredictRequest

impl Send for PredictRequest

impl Sync for PredictRequest

impl Unpin for PredictRequest

impl UnwindSafe for PredictRequest

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]