#[non_exhaustive]pub struct ConversationalSearchResponse {
pub user_query_types: Vec<String>,
pub conversational_text_response: String,
pub followup_question: Option<FollowupQuestion>,
pub conversation_id: String,
pub refined_search: Vec<RefinedSearch>,
pub conversational_filtering_result: Option<ConversationalFilteringResult>,
pub state: State,
/* private fields */
}Expand description
Response message for [ConversationalSearchService.ConversationalSearch][google.cloud.retail.v2.ConversationalSearchService.ConversationalSearch] method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user_query_types: Vec<String>The types Retail classifies the search query as.
Supported values are:
- “ORDER_SUPPORT”
- “SIMPLE_PRODUCT_SEARCH”
- “INTENT_REFINEMENT”
- “PRODUCT_DETAILS”
- “PRODUCT_COMPARISON”
- “DEALS_AND_COUPONS”
- “STORE_RELEVANT”
- “BLOCKLISTED”
- “BEST_PRODUCT”
- “RETAIL_SUPPORT”
- “DISABLED”
conversational_text_response: StringThe conversational answer-based text response generated by the Server.
followup_question: Option<FollowupQuestion>The conversational followup question generated for Intent refinement.
conversation_id: StringConversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request’s ConversationalSearchRequest.conversation_id to restore conversation state in server.
refined_search: Vec<RefinedSearch>The proposed refined search queries. They can be used to fetch the relevant search results. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.
conversational_filtering_result: Option<ConversationalFilteringResult>This field specifies all related information that is needed on client side for UI rendering of conversational filtering search.
state: StateOutput only. The state of the response generation.
Implementations§
Source§impl ConversationalSearchResponse
impl ConversationalSearchResponse
Sourcepub fn set_user_query_types<T, V>(self, v: T) -> Self
pub fn set_user_query_types<T, V>(self, v: T) -> Self
Sets the value of user_query_types.
§Example
let x = ConversationalSearchResponse::new().set_user_query_types(["a", "b", "c"]);Sourcepub fn set_conversational_text_response<T: Into<String>>(self, v: T) -> Self
pub fn set_conversational_text_response<T: Into<String>>(self, v: T) -> Self
Sets the value of conversational_text_response.
§Example
let x = ConversationalSearchResponse::new().set_conversational_text_response("example");Sourcepub fn set_followup_question<T>(self, v: T) -> Selfwhere
T: Into<FollowupQuestion>,
pub fn set_followup_question<T>(self, v: T) -> Selfwhere
T: Into<FollowupQuestion>,
Sets the value of followup_question.
§Example
use google_cloud_retail_v2::model::conversational_search_response::FollowupQuestion;
let x = ConversationalSearchResponse::new().set_followup_question(FollowupQuestion::default()/* use setters */);Sourcepub fn set_or_clear_followup_question<T>(self, v: Option<T>) -> Selfwhere
T: Into<FollowupQuestion>,
pub fn set_or_clear_followup_question<T>(self, v: Option<T>) -> Selfwhere
T: Into<FollowupQuestion>,
Sets or clears the value of followup_question.
§Example
use google_cloud_retail_v2::model::conversational_search_response::FollowupQuestion;
let x = ConversationalSearchResponse::new().set_or_clear_followup_question(Some(FollowupQuestion::default()/* use setters */));
let x = ConversationalSearchResponse::new().set_or_clear_followup_question(None::<FollowupQuestion>);Sourcepub fn set_conversation_id<T: Into<String>>(self, v: T) -> Self
pub fn set_conversation_id<T: Into<String>>(self, v: T) -> Self
Sets the value of conversation_id.
§Example
let x = ConversationalSearchResponse::new().set_conversation_id("example");Sourcepub fn set_refined_search<T, V>(self, v: T) -> Self
pub fn set_refined_search<T, V>(self, v: T) -> Self
Sets the value of refined_search.
§Example
use google_cloud_retail_v2::model::conversational_search_response::RefinedSearch;
let x = ConversationalSearchResponse::new()
.set_refined_search([
RefinedSearch::default()/* use setters */,
RefinedSearch::default()/* use (different) setters */,
]);Sourcepub fn set_conversational_filtering_result<T>(self, v: T) -> Selfwhere
T: Into<ConversationalFilteringResult>,
pub fn set_conversational_filtering_result<T>(self, v: T) -> Selfwhere
T: Into<ConversationalFilteringResult>,
Sets the value of conversational_filtering_result.
§Example
use google_cloud_retail_v2::model::conversational_search_response::ConversationalFilteringResult;
let x = ConversationalSearchResponse::new().set_conversational_filtering_result(ConversationalFilteringResult::default()/* use setters */);Sourcepub fn set_or_clear_conversational_filtering_result<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<ConversationalFilteringResult>,
pub fn set_or_clear_conversational_filtering_result<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<ConversationalFilteringResult>,
Sets or clears the value of conversational_filtering_result.
§Example
use google_cloud_retail_v2::model::conversational_search_response::ConversationalFilteringResult;
let x = ConversationalSearchResponse::new().set_or_clear_conversational_filtering_result(Some(ConversationalFilteringResult::default()/* use setters */));
let x = ConversationalSearchResponse::new().set_or_clear_conversational_filtering_result(None::<ConversationalFilteringResult>);Trait Implementations§
Source§impl Clone for ConversationalSearchResponse
impl Clone for ConversationalSearchResponse
Source§fn clone(&self) -> ConversationalSearchResponse
fn clone(&self) -> ConversationalSearchResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConversationalSearchResponse
impl Debug for ConversationalSearchResponse
Source§impl Default for ConversationalSearchResponse
impl Default for ConversationalSearchResponse
Source§fn default() -> ConversationalSearchResponse
fn default() -> ConversationalSearchResponse
Source§impl PartialEq for ConversationalSearchResponse
impl PartialEq for ConversationalSearchResponse
Source§fn eq(&self, other: &ConversationalSearchResponse) -> bool
fn eq(&self, other: &ConversationalSearchResponse) -> bool
self and other values to be equal, and is used by ==.