pub struct AnswerQuery(/* private fields */);conversational-search-service only.Expand description
The request builder for ConversationalSearchService::answer_query calls.
§Example
use builder::conversational_search_service::AnswerQuery;
let builder = prepare_request_builder();
let response = builder.send().await?;
fn prepare_request_builder() -> AnswerQuery {
// ... details omitted ...
}Implementations§
Source§impl AnswerQuery
impl AnswerQuery
Sourcepub fn with_request<V: Into<AnswerQueryRequest>>(self, v: V) -> Self
pub fn with_request<V: Into<AnswerQueryRequest>>(self, v: V) -> Self
Sets the full request, replacing any prior values.
Sourcepub fn with_options<V: Into<RequestOptions>>(self, v: V) -> Self
pub fn with_options<V: Into<RequestOptions>>(self, v: V) -> Self
Sets all the options, replacing any prior values.
Sourcepub async fn send(self) -> Result<AnswerQueryResponse>
pub async fn send(self) -> Result<AnswerQueryResponse>
Sends the request.
Sourcepub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
pub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
Sets the value of serving_config.
This is a required field for requests.
Sourcepub fn set_query<T>(self, v: T) -> Self
pub fn set_query<T>(self, v: T) -> Self
Sets the value of query.
This is a required field for requests.
Sourcepub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
Sets or clears the value of query.
This is a required field for requests.
Sourcepub fn set_session<T: Into<String>>(self, v: T) -> Self
pub fn set_session<T: Into<String>>(self, v: T) -> Self
Sets the value of session.
Sourcepub fn set_safety_spec<T>(self, v: T) -> Selfwhere
T: Into<SafetySpec>,
pub fn set_safety_spec<T>(self, v: T) -> Selfwhere
T: Into<SafetySpec>,
Sets the value of safety_spec.
Sourcepub fn set_or_clear_safety_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySpec>,
pub fn set_or_clear_safety_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySpec>,
Sets or clears the value of safety_spec.
Sets the value of related_questions_spec.
Sets or clears the value of related_questions_spec.
Sourcepub fn set_grounding_spec<T>(self, v: T) -> Selfwhere
T: Into<GroundingSpec>,
pub fn set_grounding_spec<T>(self, v: T) -> Selfwhere
T: Into<GroundingSpec>,
Sets the value of grounding_spec.
Sourcepub fn set_or_clear_grounding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingSpec>,
pub fn set_or_clear_grounding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingSpec>,
Sets or clears the value of grounding_spec.
Sourcepub fn set_answer_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<AnswerGenerationSpec>,
pub fn set_answer_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<AnswerGenerationSpec>,
Sets the value of answer_generation_spec.
Sourcepub fn set_or_clear_answer_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<AnswerGenerationSpec>,
pub fn set_or_clear_answer_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<AnswerGenerationSpec>,
Sets or clears the value of answer_generation_spec.
Sourcepub fn set_search_spec<T>(self, v: T) -> Selfwhere
T: Into<SearchSpec>,
pub fn set_search_spec<T>(self, v: T) -> Selfwhere
T: Into<SearchSpec>,
Sets the value of search_spec.
Sourcepub fn set_or_clear_search_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SearchSpec>,
pub fn set_or_clear_search_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SearchSpec>,
Sets or clears the value of search_spec.
Sourcepub fn set_query_understanding_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
pub fn set_query_understanding_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
Sets the value of query_understanding_spec.
Sourcepub fn set_or_clear_query_understanding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
pub fn set_or_clear_query_understanding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryUnderstandingSpec>,
Sets or clears the value of query_understanding_spec.
Sourcepub fn set_asynchronous_mode<T: Into<bool>>(self, v: T) -> Self
👎Deprecated
pub fn set_asynchronous_mode<T: Into<bool>>(self, v: T) -> Self
Sets the value of asynchronous_mode.
Sourcepub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self
pub fn set_user_pseudo_id<T: Into<String>>(self, v: T) -> Self
Sets the value of user_pseudo_id.
Sourcepub fn set_user_labels<T, K, V>(self, v: T) -> Self
pub fn set_user_labels<T, K, V>(self, v: T) -> Self
Sets the value of user_labels.
Sourcepub fn set_end_user_spec<T>(self, v: T) -> Selfwhere
T: Into<EndUserSpec>,
pub fn set_end_user_spec<T>(self, v: T) -> Selfwhere
T: Into<EndUserSpec>,
Sets the value of end_user_spec.
Sourcepub fn set_or_clear_end_user_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndUserSpec>,
pub fn set_or_clear_end_user_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndUserSpec>,
Sets or clears the value of end_user_spec.
Trait Implementations§
Source§impl Clone for AnswerQuery
impl Clone for AnswerQuery
Source§fn clone(&self) -> AnswerQuery
fn clone(&self) -> AnswerQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AnswerQuery
impl !RefUnwindSafe for AnswerQuery
impl Send for AnswerQuery
impl Sync for AnswerQuery
impl Unpin for AnswerQuery
impl !UnwindSafe for AnswerQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> RequestOptionsBuilder for Twhere
T: RequestBuilder,
impl<T> RequestOptionsBuilder for Twhere
T: RequestBuilder,
Source§fn with_idempotency(self, v: bool) -> T
fn with_idempotency(self, v: bool) -> T
v is true, treat the RPC underlying this method as idempotent.