#[non_exhaustive]pub struct ImportDocumentTemplate {
pub mime_type: String,
pub knowledge_types: Vec<KnowledgeType>,
pub metadata: HashMap<String, String>,
/* private fields */
}Available on crate feature
documents only.Expand description
The template used for importing documents.
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.mime_type: StringRequired. The MIME type of the document.
knowledge_types: Vec<KnowledgeType>Required. The knowledge type of document content.
metadata: HashMap<String, String>Metadata for the document. The metadata supports arbitrary
key-value pairs. Suggested use cases include storing a document’s title,
an external URL distinct from the document’s content_uri, etc.
The max size of a key or a value of the metadata is 1024 bytes.
Implementations§
Source§impl ImportDocumentTemplate
impl ImportDocumentTemplate
pub fn new() -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_knowledge_types<T, V>(self, v: T) -> Self
pub fn set_knowledge_types<T, V>(self, v: T) -> Self
Sets the value of knowledge_types.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::document::KnowledgeType;
let x = ImportDocumentTemplate::new().set_knowledge_types([
KnowledgeType::Faq,
KnowledgeType::ExtractiveQa,
KnowledgeType::ArticleSuggestion,
]);Trait Implementations§
Source§impl Clone for ImportDocumentTemplate
impl Clone for ImportDocumentTemplate
Source§fn clone(&self) -> ImportDocumentTemplate
fn clone(&self) -> ImportDocumentTemplate
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 ImportDocumentTemplate
impl Debug for ImportDocumentTemplate
Source§impl Default for ImportDocumentTemplate
impl Default for ImportDocumentTemplate
Source§fn default() -> ImportDocumentTemplate
fn default() -> ImportDocumentTemplate
Returns the “default value” for a type. Read more
Source§impl Message for ImportDocumentTemplate
impl Message for ImportDocumentTemplate
Source§impl PartialEq for ImportDocumentTemplate
impl PartialEq for ImportDocumentTemplate
impl StructuralPartialEq for ImportDocumentTemplate
Auto Trait Implementations§
impl Freeze for ImportDocumentTemplate
impl RefUnwindSafe for ImportDocumentTemplate
impl Send for ImportDocumentTemplate
impl Sync for ImportDocumentTemplate
impl Unpin for ImportDocumentTemplate
impl UnsafeUnpin for ImportDocumentTemplate
impl UnwindSafe for ImportDocumentTemplate
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