#[non_exhaustive]pub struct CompletionConfig {
pub name: String,
pub matching_order: String,
pub max_suggestions: i32,
pub min_prefix_length: i32,
pub auto_learning: bool,
pub suggestions_input_config: Option<CompletionDataInputConfig>,
pub last_suggestions_import_operation: String,
pub denylist_input_config: Option<CompletionDataInputConfig>,
pub last_denylist_import_operation: String,
pub allowlist_input_config: Option<CompletionDataInputConfig>,
pub last_allowlist_import_operation: String,
/* private fields */
}Expand description
Catalog level autocomplete config for customers to customize autocomplete feature’s settings.
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.name: StringRequired. Immutable. Fully qualified name
projects/*/locations/*/catalogs/*/completionConfig
matching_order: StringSpecifies the matching order for autocomplete suggestions, e.g., a query consisting of ‘sh’ with ‘out-of-order’ specified would suggest “women’s shoes”, whereas a query of ‘red s’ with ‘exact-prefix’ specified would suggest “red shoes”. Currently supported values:
- ‘out-of-order’
- ‘exact-prefix’
Default value: ‘exact-prefix’.
max_suggestions: i32The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value.
Value range is 1 to 20.
min_prefix_length: i32The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value.
Value range is 1 to 20.
auto_learning: boolIf set to true, the auto learning function is enabled. Auto learning uses
user data to generate suggestions using ML techniques. Default value is
false. Only after enabling auto learning can users use cloud-retail
data in
CompleteQueryRequest.
suggestions_input_config: Option<CompletionDataInputConfig>Output only. The source data for the latest import of the autocomplete suggestion phrases.
last_suggestions_import_operation: StringOutput only. Name of the LRO corresponding to the latest suggestion terms list import.
Can use [GetOperation][google.longrunning.Operations.GetOperation] API method to retrieve the latest state of the Long Running Operation.
denylist_input_config: Option<CompletionDataInputConfig>Output only. The source data for the latest import of the autocomplete denylist phrases.
last_denylist_import_operation: StringOutput only. Name of the LRO corresponding to the latest denylist import.
Can use [GetOperation][google.longrunning.Operations.GetOperation] API to retrieve the latest state of the Long Running Operation.
allowlist_input_config: Option<CompletionDataInputConfig>Output only. The source data for the latest import of the autocomplete allowlist phrases.
last_allowlist_import_operation: StringOutput only. Name of the LRO corresponding to the latest allowlist import.
Can use [GetOperation][google.longrunning.Operations.GetOperation] API to retrieve the latest state of the Long Running Operation.
Implementations§
Source§impl CompletionConfig
impl CompletionConfig
Sourcepub fn set_matching_order<T: Into<String>>(self, v: T) -> Self
pub fn set_matching_order<T: Into<String>>(self, v: T) -> Self
Sets the value of matching_order.
§Example
let x = CompletionConfig::new().set_matching_order("example");Sourcepub fn set_max_suggestions<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_suggestions<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_suggestions.
§Example
let x = CompletionConfig::new().set_max_suggestions(42);Sourcepub fn set_min_prefix_length<T: Into<i32>>(self, v: T) -> Self
pub fn set_min_prefix_length<T: Into<i32>>(self, v: T) -> Self
Sets the value of min_prefix_length.
§Example
let x = CompletionConfig::new().set_min_prefix_length(42);Sourcepub fn set_auto_learning<T: Into<bool>>(self, v: T) -> Self
pub fn set_auto_learning<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_suggestions_input_config<T>(self, v: T) -> Selfwhere
T: Into<CompletionDataInputConfig>,
pub fn set_suggestions_input_config<T>(self, v: T) -> Selfwhere
T: Into<CompletionDataInputConfig>,
Sets the value of suggestions_input_config.
§Example
use google_cloud_retail_v2::model::CompletionDataInputConfig;
let x = CompletionConfig::new().set_suggestions_input_config(CompletionDataInputConfig::default()/* use setters */);Sourcepub fn set_or_clear_suggestions_input_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CompletionDataInputConfig>,
pub fn set_or_clear_suggestions_input_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CompletionDataInputConfig>,
Sets or clears the value of suggestions_input_config.
§Example
use google_cloud_retail_v2::model::CompletionDataInputConfig;
let x = CompletionConfig::new().set_or_clear_suggestions_input_config(Some(CompletionDataInputConfig::default()/* use setters */));
let x = CompletionConfig::new().set_or_clear_suggestions_input_config(None::<CompletionDataInputConfig>);Sourcepub fn set_last_suggestions_import_operation<T: Into<String>>(
self,
v: T,
) -> Self
pub fn set_last_suggestions_import_operation<T: Into<String>>( self, v: T, ) -> Self
Sets the value of last_suggestions_import_operation.
§Example
let x = CompletionConfig::new().set_last_suggestions_import_operation("example");Sourcepub fn set_denylist_input_config<T>(self, v: T) -> Selfwhere
T: Into<CompletionDataInputConfig>,
pub fn set_denylist_input_config<T>(self, v: T) -> Selfwhere
T: Into<CompletionDataInputConfig>,
Sets the value of denylist_input_config.
§Example
use google_cloud_retail_v2::model::CompletionDataInputConfig;
let x = CompletionConfig::new().set_denylist_input_config(CompletionDataInputConfig::default()/* use setters */);Sourcepub fn set_or_clear_denylist_input_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CompletionDataInputConfig>,
pub fn set_or_clear_denylist_input_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CompletionDataInputConfig>,
Sets or clears the value of denylist_input_config.
§Example
use google_cloud_retail_v2::model::CompletionDataInputConfig;
let x = CompletionConfig::new().set_or_clear_denylist_input_config(Some(CompletionDataInputConfig::default()/* use setters */));
let x = CompletionConfig::new().set_or_clear_denylist_input_config(None::<CompletionDataInputConfig>);Sourcepub fn set_last_denylist_import_operation<T: Into<String>>(self, v: T) -> Self
pub fn set_last_denylist_import_operation<T: Into<String>>(self, v: T) -> Self
Sets the value of last_denylist_import_operation.
§Example
let x = CompletionConfig::new().set_last_denylist_import_operation("example");Sourcepub fn set_allowlist_input_config<T>(self, v: T) -> Selfwhere
T: Into<CompletionDataInputConfig>,
pub fn set_allowlist_input_config<T>(self, v: T) -> Selfwhere
T: Into<CompletionDataInputConfig>,
Sets the value of allowlist_input_config.
§Example
use google_cloud_retail_v2::model::CompletionDataInputConfig;
let x = CompletionConfig::new().set_allowlist_input_config(CompletionDataInputConfig::default()/* use setters */);Sourcepub fn set_or_clear_allowlist_input_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CompletionDataInputConfig>,
pub fn set_or_clear_allowlist_input_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CompletionDataInputConfig>,
Sets or clears the value of allowlist_input_config.
§Example
use google_cloud_retail_v2::model::CompletionDataInputConfig;
let x = CompletionConfig::new().set_or_clear_allowlist_input_config(Some(CompletionDataInputConfig::default()/* use setters */));
let x = CompletionConfig::new().set_or_clear_allowlist_input_config(None::<CompletionDataInputConfig>);Sourcepub fn set_last_allowlist_import_operation<T: Into<String>>(self, v: T) -> Self
pub fn set_last_allowlist_import_operation<T: Into<String>>(self, v: T) -> Self
Sets the value of last_allowlist_import_operation.
§Example
let x = CompletionConfig::new().set_last_allowlist_import_operation("example");Trait Implementations§
Source§impl Clone for CompletionConfig
impl Clone for CompletionConfig
Source§fn clone(&self) -> CompletionConfig
fn clone(&self) -> CompletionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompletionConfig
impl Debug for CompletionConfig
Source§impl Default for CompletionConfig
impl Default for CompletionConfig
Source§fn default() -> CompletionConfig
fn default() -> CompletionConfig
Source§impl Message for CompletionConfig
impl Message for CompletionConfig
Source§impl PartialEq for CompletionConfig
impl PartialEq for CompletionConfig
impl StructuralPartialEq for CompletionConfig
Auto Trait Implementations§
impl Freeze for CompletionConfig
impl RefUnwindSafe for CompletionConfig
impl Send for CompletionConfig
impl Sync for CompletionConfig
impl Unpin for CompletionConfig
impl UnsafeUnpin for CompletionConfig
impl UnwindSafe for CompletionConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request