#[non_exhaustive]pub struct KnowledgeOperationMetadata {
pub state: State,
pub knowledge_base: String,
pub done_time: Option<Timestamp>,
pub operation_metadata: Option<OperationMetadata>,
/* private fields */
}Available on crate feature
documents only.Expand description
Metadata in google::longrunning::Operation for Knowledge operations.
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.state: StateOutput only. The current state of this operation.
knowledge_base: StringThe name of the knowledge base interacted with during the operation.
done_time: Option<Timestamp>The time when the operation finished.
operation_metadata: Option<OperationMetadata>Additional metadata for the Knowledge operation.
Implementations§
Source§impl KnowledgeOperationMetadata
impl KnowledgeOperationMetadata
pub fn new() -> Self
Sourcepub fn set_state<T: Into<State>>(self, v: T) -> Self
pub fn set_state<T: Into<State>>(self, v: T) -> Self
Sets the value of state.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::knowledge_operation_metadata::State;
let x0 = KnowledgeOperationMetadata::new().set_state(State::Pending);
let x1 = KnowledgeOperationMetadata::new().set_state(State::Running);
let x2 = KnowledgeOperationMetadata::new().set_state(State::Done);Sourcepub fn set_knowledge_base<T: Into<String>>(self, v: T) -> Self
pub fn set_knowledge_base<T: Into<String>>(self, v: T) -> Self
Sets the value of knowledge_base.
§Example
ⓘ
let x = KnowledgeOperationMetadata::new().set_knowledge_base("example");Sourcepub fn set_done_time<T>(self, v: T) -> Self
pub fn set_done_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_done_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_done_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_operation_metadata<T: Into<Option<OperationMetadata>>>(
self,
v: T,
) -> Self
pub fn set_operation_metadata<T: Into<Option<OperationMetadata>>>( self, v: T, ) -> Self
Sets the value of operation_metadata.
Note that all the setters affecting operation_metadata are mutually
exclusive.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::ExportOperationMetadata;
let x = KnowledgeOperationMetadata::new().set_operation_metadata(Some(
google_cloud_dialogflow_v2::model::knowledge_operation_metadata::OperationMetadata::ExportOperationMetadata(ExportOperationMetadata::default().into())));Sourcepub fn export_operation_metadata(&self) -> Option<&Box<ExportOperationMetadata>>
pub fn export_operation_metadata(&self) -> Option<&Box<ExportOperationMetadata>>
The value of operation_metadata
if it holds a ExportOperationMetadata, None if the field is not set or
holds a different branch.
Sourcepub fn set_export_operation_metadata<T: Into<Box<ExportOperationMetadata>>>(
self,
v: T,
) -> Self
pub fn set_export_operation_metadata<T: Into<Box<ExportOperationMetadata>>>( self, v: T, ) -> Self
Sets the value of operation_metadata
to hold a ExportOperationMetadata.
Note that all the setters affecting operation_metadata are
mutually exclusive.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::ExportOperationMetadata;
let x = KnowledgeOperationMetadata::new().set_export_operation_metadata(ExportOperationMetadata::default()/* use setters */);
assert!(x.export_operation_metadata().is_some());Trait Implementations§
Source§impl Clone for KnowledgeOperationMetadata
impl Clone for KnowledgeOperationMetadata
Source§fn clone(&self) -> KnowledgeOperationMetadata
fn clone(&self) -> KnowledgeOperationMetadata
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 KnowledgeOperationMetadata
impl Debug for KnowledgeOperationMetadata
Source§impl Default for KnowledgeOperationMetadata
impl Default for KnowledgeOperationMetadata
Source§fn default() -> KnowledgeOperationMetadata
fn default() -> KnowledgeOperationMetadata
Returns the “default value” for a type. Read more
Source§impl Message for KnowledgeOperationMetadata
impl Message for KnowledgeOperationMetadata
impl StructuralPartialEq for KnowledgeOperationMetadata
Auto Trait Implementations§
impl Freeze for KnowledgeOperationMetadata
impl RefUnwindSafe for KnowledgeOperationMetadata
impl Send for KnowledgeOperationMetadata
impl Sync for KnowledgeOperationMetadata
impl Unpin for KnowledgeOperationMetadata
impl UnwindSafe for KnowledgeOperationMetadata
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