#[non_exhaustive]pub struct ReloadDocumentRequest {
pub name: String,
pub import_gcs_custom_metadata: bool,
pub smart_messaging_partial_update: bool,
pub source: Option<Source>,
/* private fields */
}documents only.Expand description
Request message for Documents.ReloadDocument.
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. The name of the document to reload.
Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
import_gcs_custom_metadata: boolOptional. Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
smart_messaging_partial_update: boolOptional. When enabled, the reload request is to apply partial update to the smart messaging allowlist.
source: Option<Source>The source for document reloading.
If provided, the service will load the contents from the source and update document in the knowledge base.
Reloading from a new document source is allowed for smart messaging documents only. If you want to update the source for other document types, please delete the existing document and create a new one instead.
Implementations§
Source§impl ReloadDocumentRequest
impl ReloadDocumentRequest
pub fn new() -> Self
Sourcepub fn set_import_gcs_custom_metadata<T: Into<bool>>(self, v: T) -> Self
pub fn set_import_gcs_custom_metadata<T: Into<bool>>(self, v: T) -> Self
Sets the value of import_gcs_custom_metadata.
§Example
let x = ReloadDocumentRequest::new().set_import_gcs_custom_metadata(true);Sourcepub fn set_smart_messaging_partial_update<T: Into<bool>>(self, v: T) -> Self
pub fn set_smart_messaging_partial_update<T: Into<bool>>(self, v: T) -> Self
Sets the value of smart_messaging_partial_update.
§Example
let x = ReloadDocumentRequest::new().set_smart_messaging_partial_update(true);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sourcepub fn content_uri(&self) -> Option<&String>
pub fn content_uri(&self) -> Option<&String>
The value of source
if it holds a ContentUri, None if the field is not set or
holds a different branch.
Trait Implementations§
Source§impl Clone for ReloadDocumentRequest
impl Clone for ReloadDocumentRequest
Source§fn clone(&self) -> ReloadDocumentRequest
fn clone(&self) -> ReloadDocumentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more