#[non_exhaustive]pub struct QueryRephraserSpec {
pub disable: bool,
pub max_rephrase_steps: i32,
pub model_spec: Option<ModelSpec>,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
Query rephraser 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.disable: boolDisable query rephraser.
max_rephrase_steps: i32Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.
model_spec: Option<ModelSpec>Optional. Query Rephraser Model specification.
Implementations§
Source§impl QueryRephraserSpec
impl QueryRephraserSpec
pub fn new() -> Self
Sourcepub fn set_disable<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_max_rephrase_steps<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_rephrase_steps<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_rephrase_steps.
§Example
ⓘ
let x = QueryRephraserSpec::new().set_max_rephrase_steps(42);Sourcepub fn set_model_spec<T>(self, v: T) -> Self
pub fn set_model_spec<T>(self, v: T) -> Self
Sets the value of model_spec.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::query_understanding_spec::query_rephraser_spec::ModelSpec;
let x = QueryRephraserSpec::new().set_model_spec(ModelSpec::default()/* use setters */);Sourcepub fn set_or_clear_model_spec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_model_spec<T>(self, v: Option<T>) -> Self
Sets or clears the value of model_spec.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::query_understanding_spec::query_rephraser_spec::ModelSpec;
let x = QueryRephraserSpec::new().set_or_clear_model_spec(Some(ModelSpec::default()/* use setters */));
let x = QueryRephraserSpec::new().set_or_clear_model_spec(None::<ModelSpec>);Trait Implementations§
Source§impl Clone for QueryRephraserSpec
impl Clone for QueryRephraserSpec
Source§fn clone(&self) -> QueryRephraserSpec
fn clone(&self) -> QueryRephraserSpec
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 QueryRephraserSpec
impl Debug for QueryRephraserSpec
Source§impl Default for QueryRephraserSpec
impl Default for QueryRephraserSpec
Source§fn default() -> QueryRephraserSpec
fn default() -> QueryRephraserSpec
Returns the “default value” for a type. Read more
Source§impl Message for QueryRephraserSpec
impl Message for QueryRephraserSpec
Source§impl PartialEq for QueryRephraserSpec
impl PartialEq for QueryRephraserSpec
impl StructuralPartialEq for QueryRephraserSpec
Auto Trait Implementations§
impl Freeze for QueryRephraserSpec
impl RefUnwindSafe for QueryRephraserSpec
impl Send for QueryRephraserSpec
impl Sync for QueryRephraserSpec
impl Unpin for QueryRephraserSpec
impl UnwindSafe for QueryRephraserSpec
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