#[non_exhaustive]pub struct DeprecationStatus {
pub deleted: Option<String>,
pub deprecated: Option<String>,
pub obsolete: Option<String>,
pub replacement: Option<String>,
pub state: Option<State>,
/* private fields */
}accelerator-types or disk-types or image-family-views or images or machine-types or node-types or region-disk-types or region-zones or regions or storage-pool-types or zones only.Expand description
Deprecation status for a public 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.deleted: Option<String>An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
deprecated: Option<String>An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
obsolete: Option<String>An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
replacement: Option<String>The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
state: Option<State>The deprecation state of this resource. This can be ACTIVE,DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can useACTIVE. Operations which create a new resource using aDEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE orDELETED resources will be rejected and result in an error.
Implementations§
Source§impl DeprecationStatus
impl DeprecationStatus
pub fn new() -> Self
Sourcepub fn set_deleted<T>(self, v: T) -> Self
pub fn set_deleted<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_deleted<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deleted<T>(self, v: Option<T>) -> Self
Sourcepub fn set_deprecated<T>(self, v: T) -> Self
pub fn set_deprecated<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_deprecated<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deprecated<T>(self, v: Option<T>) -> Self
Sets or clears the value of deprecated.
§Example
let x = DeprecationStatus::new().set_or_clear_deprecated(Some("example"));
let x = DeprecationStatus::new().set_or_clear_deprecated(None::<String>);Sourcepub fn set_obsolete<T>(self, v: T) -> Self
pub fn set_obsolete<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_obsolete<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_obsolete<T>(self, v: Option<T>) -> Self
Sourcepub fn set_replacement<T>(self, v: T) -> Self
pub fn set_replacement<T>(self, v: T) -> Self
Sets the value of replacement.
§Example
let x = DeprecationStatus::new().set_replacement("example");Sourcepub fn set_or_clear_replacement<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_replacement<T>(self, v: Option<T>) -> Self
Sets or clears the value of replacement.
§Example
let x = DeprecationStatus::new().set_or_clear_replacement(Some("example"));
let x = DeprecationStatus::new().set_or_clear_replacement(None::<String>);Sourcepub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
Sets or clears the value of state.
§Example
use google_cloud_compute_v1::model::deprecation_status::State;
let x0 = DeprecationStatus::new().set_or_clear_state(Some(State::Deleted));
let x1 = DeprecationStatus::new().set_or_clear_state(Some(State::Deprecated));
let x2 = DeprecationStatus::new().set_or_clear_state(Some(State::Obsolete));
let x_none = DeprecationStatus::new().set_or_clear_state(None::<State>);Trait Implementations§
Source§impl Clone for DeprecationStatus
impl Clone for DeprecationStatus
Source§fn clone(&self) -> DeprecationStatus
fn clone(&self) -> DeprecationStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more