#[non_exhaustive]pub struct AnswerQueryResponse {
pub answer: Option<Answer>,
pub session: Option<Session>,
pub answer_query_token: String,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
Response message for ConversationalSearchService.AnswerQuery method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.answer: Option<Answer>Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.
session: Option<Session>Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.
answer_query_token: StringA global unique ID used for logging.
Implementations§
Source§impl AnswerQueryResponse
impl AnswerQueryResponse
pub fn new() -> Self
Sourcepub fn set_answer<T>(self, v: T) -> Self
pub fn set_answer<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_answer<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_answer<T>(self, v: Option<T>) -> Self
Sourcepub fn set_session<T>(self, v: T) -> Self
pub fn set_session<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_session<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_session<T>(self, v: Option<T>) -> Self
Sourcepub fn set_answer_query_token<T: Into<String>>(self, v: T) -> Self
pub fn set_answer_query_token<T: Into<String>>(self, v: T) -> Self
Sets the value of answer_query_token.
§Example
ⓘ
let x = AnswerQueryResponse::new().set_answer_query_token("example");Trait Implementations§
Source§impl Clone for AnswerQueryResponse
impl Clone for AnswerQueryResponse
Source§fn clone(&self) -> AnswerQueryResponse
fn clone(&self) -> AnswerQueryResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnswerQueryResponse
impl Debug for AnswerQueryResponse
Source§impl Default for AnswerQueryResponse
impl Default for AnswerQueryResponse
Source§fn default() -> AnswerQueryResponse
fn default() -> AnswerQueryResponse
Returns the “default value” for a type. Read more
Source§impl Message for AnswerQueryResponse
impl Message for AnswerQueryResponse
Source§impl PartialEq for AnswerQueryResponse
impl PartialEq for AnswerQueryResponse
impl StructuralPartialEq for AnswerQueryResponse
Auto Trait Implementations§
impl Freeze for AnswerQueryResponse
impl RefUnwindSafe for AnswerQueryResponse
impl Send for AnswerQueryResponse
impl Sync for AnswerQueryResponse
impl Unpin for AnswerQueryResponse
impl UnwindSafe for AnswerQueryResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more