#[non_exhaustive]pub struct VersionMetadata {
pub version: Option<Version>,
pub specs: Vec<SpecMetadata>,
pub deployments: Vec<DeploymentMetadata>,
pub original_id: String,
pub original_create_time: Option<Timestamp>,
pub original_update_time: Option<Timestamp>,
/* private fields */
}Expand description
The metadata associated with a version of the API resource.
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.version: Option<Version>Required. Represents a version of the API resource in API hub. The ID of the version will be generated by Hub.
specs: Vec<SpecMetadata>Optional. The specs associated with this version. Note that an API version can be associated with multiple specs.
deployments: Vec<DeploymentMetadata>Optional. The deployments linked to this API version. Note: A particular API version could be deployed to multiple deployments (for dev deployment, UAT deployment, etc.)
original_id: StringOptional. The unique identifier of the version in the system where it was originally created.
original_create_time: Option<Timestamp>Optional. Timestamp indicating when the version was created at the source.
original_update_time: Option<Timestamp>Required. Timestamp indicating when the version was last updated at the source.
Implementations§
Source§impl VersionMetadata
impl VersionMetadata
pub fn new() -> Self
Sourcepub fn set_version<T>(self, v: T) -> Self
pub fn set_version<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_version<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_version<T>(self, v: Option<T>) -> Self
Sourcepub fn set_deployments<T, V>(self, v: T) -> Self
pub fn set_deployments<T, V>(self, v: T) -> Self
Sets the value of deployments.
§Example
use google_cloud_apihub_v1::model::DeploymentMetadata;
let x = VersionMetadata::new()
.set_deployments([
DeploymentMetadata::default()/* use setters */,
DeploymentMetadata::default()/* use (different) setters */,
]);Sourcepub fn set_original_id<T: Into<String>>(self, v: T) -> Self
pub fn set_original_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_original_create_time<T>(self, v: T) -> Self
pub fn set_original_create_time<T>(self, v: T) -> Self
Sets the value of original_create_time.
§Example
use wkt::Timestamp;
let x = VersionMetadata::new().set_original_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_original_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_original_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of original_create_time.
§Example
use wkt::Timestamp;
let x = VersionMetadata::new().set_or_clear_original_create_time(Some(Timestamp::default()/* use setters */));
let x = VersionMetadata::new().set_or_clear_original_create_time(None::<Timestamp>);Sourcepub fn set_original_update_time<T>(self, v: T) -> Self
pub fn set_original_update_time<T>(self, v: T) -> Self
Sets the value of original_update_time.
§Example
use wkt::Timestamp;
let x = VersionMetadata::new().set_original_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_original_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_original_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of original_update_time.
§Example
use wkt::Timestamp;
let x = VersionMetadata::new().set_or_clear_original_update_time(Some(Timestamp::default()/* use setters */));
let x = VersionMetadata::new().set_or_clear_original_update_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for VersionMetadata
impl Clone for VersionMetadata
Source§fn clone(&self) -> VersionMetadata
fn clone(&self) -> VersionMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more