#[non_exhaustive]pub struct ImportCompletionSuggestionsRequest {
pub parent: String,
pub error_config: Option<ImportErrorConfig>,
pub source: Option<Source>,
/* private fields */
}completion-service only.Expand description
Request message for CompletionService.ImportCompletionSuggestions method.
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.parent: StringRequired. The parent data store resource name for which to import customer autocomplete suggestions.
Follows pattern projects/*/locations/*/collections/*/dataStores/*
error_config: Option<ImportErrorConfig>The desired location of errors incurred during the Import.
source: Option<Source>The source of the autocomplete suggestions.
Implementations§
Source§impl ImportCompletionSuggestionsRequest
impl ImportCompletionSuggestionsRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_error_config<T>(self, v: T) -> Selfwhere
T: Into<ImportErrorConfig>,
pub fn set_error_config<T>(self, v: T) -> Selfwhere
T: Into<ImportErrorConfig>,
Sets the value of error_config.
§Example
use google_cloud_discoveryengine_v1::model::ImportErrorConfig;
let x = ImportCompletionSuggestionsRequest::new().set_error_config(ImportErrorConfig::default()/* use setters */);Sourcepub fn set_or_clear_error_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImportErrorConfig>,
pub fn set_or_clear_error_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImportErrorConfig>,
Sets or clears the value of error_config.
§Example
use google_cloud_discoveryengine_v1::model::ImportErrorConfig;
let x = ImportCompletionSuggestionsRequest::new().set_or_clear_error_config(Some(ImportErrorConfig::default()/* use setters */));
let x = ImportCompletionSuggestionsRequest::new().set_or_clear_error_config(None::<ImportErrorConfig>);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::import_completion_suggestions_request::InlineSource;
let x = ImportCompletionSuggestionsRequest::new().set_source(Some(
google_cloud_discoveryengine_v1::model::import_completion_suggestions_request::Source::InlineSource(InlineSource::default().into())));Sourcepub fn inline_source(&self) -> Option<&Box<InlineSource>>
pub fn inline_source(&self) -> Option<&Box<InlineSource>>
The value of source
if it holds a InlineSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_source<T: Into<Box<InlineSource>>>(self, v: T) -> Self
pub fn set_inline_source<T: Into<Box<InlineSource>>>(self, v: T) -> Self
Sets the value of source
to hold a InlineSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::import_completion_suggestions_request::InlineSource;
let x = ImportCompletionSuggestionsRequest::new().set_inline_source(InlineSource::default()/* use setters */);
assert!(x.inline_source().is_some());
assert!(x.gcs_source().is_none());
assert!(x.bigquery_source().is_none());Sourcepub fn gcs_source(&self) -> Option<&Box<GcsSource>>
pub fn gcs_source(&self) -> Option<&Box<GcsSource>>
The value of source
if it holds a GcsSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_source<T: Into<Box<GcsSource>>>(self, v: T) -> Self
pub fn set_gcs_source<T: Into<Box<GcsSource>>>(self, v: T) -> Self
Sets the value of source
to hold a GcsSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::GcsSource;
let x = ImportCompletionSuggestionsRequest::new().set_gcs_source(GcsSource::default()/* use setters */);
assert!(x.gcs_source().is_some());
assert!(x.inline_source().is_none());
assert!(x.bigquery_source().is_none());Sourcepub fn bigquery_source(&self) -> Option<&Box<BigQuerySource>>
pub fn bigquery_source(&self) -> Option<&Box<BigQuerySource>>
The value of source
if it holds a BigquerySource, None if the field is not set or
holds a different branch.
Sourcepub fn set_bigquery_source<T: Into<Box<BigQuerySource>>>(self, v: T) -> Self
pub fn set_bigquery_source<T: Into<Box<BigQuerySource>>>(self, v: T) -> Self
Sets the value of source
to hold a BigquerySource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::BigQuerySource;
let x = ImportCompletionSuggestionsRequest::new().set_bigquery_source(BigQuerySource::default()/* use setters */);
assert!(x.bigquery_source().is_some());
assert!(x.inline_source().is_none());
assert!(x.gcs_source().is_none());Trait Implementations§
Source§impl Clone for ImportCompletionSuggestionsRequest
impl Clone for ImportCompletionSuggestionsRequest
Source§fn clone(&self) -> ImportCompletionSuggestionsRequest
fn clone(&self) -> ImportCompletionSuggestionsRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ImportCompletionSuggestionsRequest
impl Default for ImportCompletionSuggestionsRequest
Source§fn default() -> ImportCompletionSuggestionsRequest
fn default() -> ImportCompletionSuggestionsRequest
Source§impl PartialEq for ImportCompletionSuggestionsRequest
impl PartialEq for ImportCompletionSuggestionsRequest
Source§fn eq(&self, other: &ImportCompletionSuggestionsRequest) -> bool
fn eq(&self, other: &ImportCompletionSuggestionsRequest) -> bool
self and other values to be equal, and is used by ==.