#[non_exhaustive]pub struct QueryUnderstandingSpec {
pub query_classification_spec: Option<QueryClassificationSpec>,
pub query_rephraser_spec: Option<QueryRephraserSpec>,
pub disable_spell_correction: bool,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
Query understanding specification.
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.query_classification_spec: Option<QueryClassificationSpec>Query classification specification.
query_rephraser_spec: Option<QueryRephraserSpec>Query rephraser specification.
disable_spell_correction: boolOptional. Whether to disable spell correction.
The default value is false.
Implementations§
Source§impl QueryUnderstandingSpec
impl QueryUnderstandingSpec
pub fn new() -> Self
Sourcepub fn set_query_classification_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryClassificationSpec>,
pub fn set_query_classification_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryClassificationSpec>,
Sets the value of query_classification_spec.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::query_understanding_spec::QueryClassificationSpec;
let x = QueryUnderstandingSpec::new().set_query_classification_spec(QueryClassificationSpec::default()/* use setters */);Sourcepub fn set_or_clear_query_classification_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryClassificationSpec>,
pub fn set_or_clear_query_classification_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryClassificationSpec>,
Sets or clears the value of query_classification_spec.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::query_understanding_spec::QueryClassificationSpec;
let x = QueryUnderstandingSpec::new().set_or_clear_query_classification_spec(Some(QueryClassificationSpec::default()/* use setters */));
let x = QueryUnderstandingSpec::new().set_or_clear_query_classification_spec(None::<QueryClassificationSpec>);Sourcepub fn set_query_rephraser_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryRephraserSpec>,
pub fn set_query_rephraser_spec<T>(self, v: T) -> Selfwhere
T: Into<QueryRephraserSpec>,
Sets the value of query_rephraser_spec.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::query_understanding_spec::QueryRephraserSpec;
let x = QueryUnderstandingSpec::new().set_query_rephraser_spec(QueryRephraserSpec::default()/* use setters */);Sourcepub fn set_or_clear_query_rephraser_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryRephraserSpec>,
pub fn set_or_clear_query_rephraser_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QueryRephraserSpec>,
Sets or clears the value of query_rephraser_spec.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::query_understanding_spec::QueryRephraserSpec;
let x = QueryUnderstandingSpec::new().set_or_clear_query_rephraser_spec(Some(QueryRephraserSpec::default()/* use setters */));
let x = QueryUnderstandingSpec::new().set_or_clear_query_rephraser_spec(None::<QueryRephraserSpec>);Sourcepub fn set_disable_spell_correction<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_spell_correction<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_spell_correction.
§Example
ⓘ
let x = QueryUnderstandingSpec::new().set_disable_spell_correction(true);Trait Implementations§
Source§impl Clone for QueryUnderstandingSpec
impl Clone for QueryUnderstandingSpec
Source§fn clone(&self) -> QueryUnderstandingSpec
fn clone(&self) -> QueryUnderstandingSpec
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 QueryUnderstandingSpec
impl Debug for QueryUnderstandingSpec
Source§impl Default for QueryUnderstandingSpec
impl Default for QueryUnderstandingSpec
Source§fn default() -> QueryUnderstandingSpec
fn default() -> QueryUnderstandingSpec
Returns the “default value” for a type. Read more
Source§impl Message for QueryUnderstandingSpec
impl Message for QueryUnderstandingSpec
Source§impl PartialEq for QueryUnderstandingSpec
impl PartialEq for QueryUnderstandingSpec
impl StructuralPartialEq for QueryUnderstandingSpec
Auto Trait Implementations§
impl Freeze for QueryUnderstandingSpec
impl RefUnwindSafe for QueryUnderstandingSpec
impl Send for QueryUnderstandingSpec
impl Sync for QueryUnderstandingSpec
impl Unpin for QueryUnderstandingSpec
impl UnwindSafe for QueryUnderstandingSpec
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