#[non_exhaustive]pub struct CreateDataStoreRequest {
pub parent: String,
pub data_store: Option<DataStore>,
pub data_store_id: String,
pub create_advanced_site_search: bool,
pub skip_default_schema_creation: bool,
pub cmek_options: Option<CmekOptions>,
/* private fields */
}data-store-service only.Expand description
Request for DataStoreService.CreateDataStore 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 resource name, such as
projects/{project}/locations/{location}/collections/{collection}.
data_store: Option<DataStore>Required. The DataStore to create.
data_store_id: StringRequired. The ID to use for the DataStore, which will become the final component of the DataStore’s resource name.
This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
create_advanced_site_search: boolA boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.
skip_default_schema_creation: boolA boolean flag indicating whether to skip the default schema creation for the data store. Only enable this flag if you are certain that the default schema is incompatible with your use case.
If set to true, you must manually create a schema for the data store before any documents can be ingested.
This flag cannot be specified if data_store.starting_schema is specified.
cmek_options: Option<CmekOptions>CMEK options for the DataStore. Setting this field will override the default CmekConfig if one is set for the project.
Implementations§
Source§impl CreateDataStoreRequest
impl CreateDataStoreRequest
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_data_store<T>(self, v: T) -> Self
pub fn set_data_store<T>(self, v: T) -> Self
Sets the value of data_store.
§Example
use google_cloud_discoveryengine_v1::model::DataStore;
let x = CreateDataStoreRequest::new().set_data_store(DataStore::default()/* use setters */);Sourcepub fn set_or_clear_data_store<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_data_store<T>(self, v: Option<T>) -> Self
Sets or clears the value of data_store.
§Example
use google_cloud_discoveryengine_v1::model::DataStore;
let x = CreateDataStoreRequest::new().set_or_clear_data_store(Some(DataStore::default()/* use setters */));
let x = CreateDataStoreRequest::new().set_or_clear_data_store(None::<DataStore>);Sourcepub fn set_data_store_id<T: Into<String>>(self, v: T) -> Self
pub fn set_data_store_id<T: Into<String>>(self, v: T) -> Self
Sets the value of data_store_id.
§Example
let x = CreateDataStoreRequest::new().set_data_store_id("example");Sourcepub fn set_create_advanced_site_search<T: Into<bool>>(self, v: T) -> Self
pub fn set_create_advanced_site_search<T: Into<bool>>(self, v: T) -> Self
Sets the value of create_advanced_site_search.
§Example
let x = CreateDataStoreRequest::new().set_create_advanced_site_search(true);Sourcepub fn set_skip_default_schema_creation<T: Into<bool>>(self, v: T) -> Self
pub fn set_skip_default_schema_creation<T: Into<bool>>(self, v: T) -> Self
Sets the value of skip_default_schema_creation.
§Example
let x = CreateDataStoreRequest::new().set_skip_default_schema_creation(true);Sourcepub fn set_cmek_options<T: Into<Option<CmekOptions>>>(self, v: T) -> Self
pub fn set_cmek_options<T: Into<Option<CmekOptions>>>(self, v: T) -> Self
Sets the value of cmek_options.
Note that all the setters affecting cmek_options are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::create_data_store_request::CmekOptions;
let x = CreateDataStoreRequest::new().set_cmek_options(Some(CmekOptions::CmekConfigName("example".to_string())));Sourcepub fn cmek_config_name(&self) -> Option<&String>
pub fn cmek_config_name(&self) -> Option<&String>
The value of cmek_options
if it holds a CmekConfigName, None if the field is not set or
holds a different branch.
Sourcepub fn set_cmek_config_name<T: Into<String>>(self, v: T) -> Self
pub fn set_cmek_config_name<T: Into<String>>(self, v: T) -> Self
Sets the value of cmek_options
to hold a CmekConfigName.
Note that all the setters affecting cmek_options are
mutually exclusive.
§Example
let x = CreateDataStoreRequest::new().set_cmek_config_name("example");
assert!(x.cmek_config_name().is_some());
assert!(x.disable_cmek().is_none());Sourcepub fn disable_cmek(&self) -> Option<&bool>
pub fn disable_cmek(&self) -> Option<&bool>
The value of cmek_options
if it holds a DisableCmek, None if the field is not set or
holds a different branch.
Sourcepub fn set_disable_cmek<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_cmek<T: Into<bool>>(self, v: T) -> Self
Sets the value of cmek_options
to hold a DisableCmek.
Note that all the setters affecting cmek_options are
mutually exclusive.
§Example
let x = CreateDataStoreRequest::new().set_disable_cmek(true);
assert!(x.disable_cmek().is_some());
assert!(x.cmek_config_name().is_none());Trait Implementations§
Source§impl Clone for CreateDataStoreRequest
impl Clone for CreateDataStoreRequest
Source§fn clone(&self) -> CreateDataStoreRequest
fn clone(&self) -> CreateDataStoreRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more