#[non_exhaustive]pub struct SourceMetadata {
pub source_type: SourceType,
pub original_resource_id: String,
pub original_resource_create_time: Option<Timestamp>,
pub original_resource_update_time: Option<Timestamp>,
pub source: Option<Source>,
/* private fields */
}Expand description
SourceMetadata represents the metadata for a resource at the source.
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.source_type: SourceTypeOutput only. The type of the source.
original_resource_id: StringOutput only. The unique identifier of the resource at the source.
original_resource_create_time: Option<Timestamp>Output only. The time at which the resource was created at the source.
original_resource_update_time: Option<Timestamp>Output only. The time at which the resource was last updated at the source.
source: Option<Source>The source of the resource.
Implementations§
Source§impl SourceMetadata
impl SourceMetadata
pub fn new() -> Self
Sourcepub fn set_source_type<T: Into<SourceType>>(self, v: T) -> Self
pub fn set_source_type<T: Into<SourceType>>(self, v: T) -> Self
Sets the value of source_type.
§Example
use google_cloud_apihub_v1::model::source_metadata::SourceType;
let x0 = SourceMetadata::new().set_source_type(SourceType::Plugin);Sourcepub fn set_original_resource_id<T: Into<String>>(self, v: T) -> Self
pub fn set_original_resource_id<T: Into<String>>(self, v: T) -> Self
Sets the value of original_resource_id.
§Example
let x = SourceMetadata::new().set_original_resource_id("example");Sourcepub fn set_original_resource_create_time<T>(self, v: T) -> Self
pub fn set_original_resource_create_time<T>(self, v: T) -> Self
Sets the value of original_resource_create_time.
§Example
use wkt::Timestamp;
let x = SourceMetadata::new().set_original_resource_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_original_resource_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_original_resource_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of original_resource_create_time.
§Example
use wkt::Timestamp;
let x = SourceMetadata::new().set_or_clear_original_resource_create_time(Some(Timestamp::default()/* use setters */));
let x = SourceMetadata::new().set_or_clear_original_resource_create_time(None::<Timestamp>);Sourcepub fn set_original_resource_update_time<T>(self, v: T) -> Self
pub fn set_original_resource_update_time<T>(self, v: T) -> Self
Sets the value of original_resource_update_time.
§Example
use wkt::Timestamp;
let x = SourceMetadata::new().set_original_resource_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_original_resource_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_original_resource_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of original_resource_update_time.
§Example
use wkt::Timestamp;
let x = SourceMetadata::new().set_or_clear_original_resource_update_time(Some(Timestamp::default()/* use setters */));
let x = SourceMetadata::new().set_or_clear_original_resource_update_time(None::<Timestamp>);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_apihub_v1::model::source_metadata::PluginInstanceActionSource;
let x = SourceMetadata::new().set_source(Some(
google_cloud_apihub_v1::model::source_metadata::Source::PluginInstanceActionSource(PluginInstanceActionSource::default().into())));Sourcepub fn plugin_instance_action_source(
&self,
) -> Option<&Box<PluginInstanceActionSource>>
pub fn plugin_instance_action_source( &self, ) -> Option<&Box<PluginInstanceActionSource>>
The value of source
if it holds a PluginInstanceActionSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_plugin_instance_action_source<T: Into<Box<PluginInstanceActionSource>>>(
self,
v: T,
) -> Self
pub fn set_plugin_instance_action_source<T: Into<Box<PluginInstanceActionSource>>>( self, v: T, ) -> Self
Sets the value of source
to hold a PluginInstanceActionSource.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_apihub_v1::model::source_metadata::PluginInstanceActionSource;
let x = SourceMetadata::new().set_plugin_instance_action_source(PluginInstanceActionSource::default()/* use setters */);
assert!(x.plugin_instance_action_source().is_some());Trait Implementations§
Source§impl Clone for SourceMetadata
impl Clone for SourceMetadata
Source§fn clone(&self) -> SourceMetadata
fn clone(&self) -> SourceMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more