#[non_exhaustive]pub struct DocumentProcessingConfig {
pub name: String,
pub chunking_config: Option<ChunkingConfig>,
pub default_parsing_config: Option<ParsingConfig>,
pub parsing_config_overrides: HashMap<String, ParsingConfig>,
/* private fields */
}data-store-service only.Expand description
A singleton resource of DataStore. If it’s empty when DataStore is created and DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED, the default parser will default to digital parser.
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: StringThe full resource name of the Document Processing Config.
Format:
projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig.
chunking_config: Option<ChunkingConfig>Whether chunking mode is enabled.
default_parsing_config: Option<ParsingConfig>Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing.
parsing_config_overrides: HashMap<String, ParsingConfig>Map from file type to override the default parsing configuration based on the file type. Supported keys:
pdf: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported.html: Override parsing config for HTML files, only digital parsing and layout parsing are supported.docx: Override parsing config for DOCX files, only digital parsing and layout parsing are supported.pptx: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.xlsm: Override parsing config for XLSM files, only digital parsing and layout parsing are supported.xlsx: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.
Implementations§
Source§impl DocumentProcessingConfig
impl DocumentProcessingConfig
pub fn new() -> Self
Sourcepub fn set_chunking_config<T>(self, v: T) -> Selfwhere
T: Into<ChunkingConfig>,
pub fn set_chunking_config<T>(self, v: T) -> Selfwhere
T: Into<ChunkingConfig>,
Sets the value of chunking_config.
§Example
use google_cloud_discoveryengine_v1::model::document_processing_config::ChunkingConfig;
let x = DocumentProcessingConfig::new().set_chunking_config(ChunkingConfig::default()/* use setters */);Sourcepub fn set_or_clear_chunking_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ChunkingConfig>,
pub fn set_or_clear_chunking_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ChunkingConfig>,
Sets or clears the value of chunking_config.
§Example
use google_cloud_discoveryengine_v1::model::document_processing_config::ChunkingConfig;
let x = DocumentProcessingConfig::new().set_or_clear_chunking_config(Some(ChunkingConfig::default()/* use setters */));
let x = DocumentProcessingConfig::new().set_or_clear_chunking_config(None::<ChunkingConfig>);Sourcepub fn set_default_parsing_config<T>(self, v: T) -> Selfwhere
T: Into<ParsingConfig>,
pub fn set_default_parsing_config<T>(self, v: T) -> Selfwhere
T: Into<ParsingConfig>,
Sets the value of default_parsing_config.
§Example
use google_cloud_discoveryengine_v1::model::document_processing_config::ParsingConfig;
let x = DocumentProcessingConfig::new().set_default_parsing_config(ParsingConfig::default()/* use setters */);Sourcepub fn set_or_clear_default_parsing_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ParsingConfig>,
pub fn set_or_clear_default_parsing_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ParsingConfig>,
Sets or clears the value of default_parsing_config.
§Example
use google_cloud_discoveryengine_v1::model::document_processing_config::ParsingConfig;
let x = DocumentProcessingConfig::new().set_or_clear_default_parsing_config(Some(ParsingConfig::default()/* use setters */));
let x = DocumentProcessingConfig::new().set_or_clear_default_parsing_config(None::<ParsingConfig>);Sourcepub fn set_parsing_config_overrides<T, K, V>(self, v: T) -> Self
pub fn set_parsing_config_overrides<T, K, V>(self, v: T) -> Self
Sets the value of parsing_config_overrides.
§Example
use google_cloud_discoveryengine_v1::model::document_processing_config::ParsingConfig;
let x = DocumentProcessingConfig::new().set_parsing_config_overrides([
("key0", ParsingConfig::default()/* use setters */),
("key1", ParsingConfig::default()/* use (different) setters */),
]);Trait Implementations§
Source§impl Clone for DocumentProcessingConfig
impl Clone for DocumentProcessingConfig
Source§fn clone(&self) -> DocumentProcessingConfig
fn clone(&self) -> DocumentProcessingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more