#[non_exhaustive]pub struct BlueGreenDeploymentInfo {
pub deployment_id: Option<String>,
pub state: Option<State>,
pub role_details: Option<RoleDetails>,
/* private fields */
}Expand description
Blue-green deployment metadata for a database instance. In a blue-green deployment, we maintain two environments, one of which is live. This message contains details about the blue-green deployment.
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.deployment_id: Option<String>Output only. The resource ID of the blue-green deployment.
state: Option<State>Output only. The current state of blue-green-deployment for UI tags
role_details: Option<RoleDetails>The role of the instance in the blue-green deployment.
Implementations§
Source§impl BlueGreenDeploymentInfo
impl BlueGreenDeploymentInfo
Sourcepub fn set_deployment_id<T>(self, v: T) -> Self
pub fn set_deployment_id<T>(self, v: T) -> Self
Sets the value of deployment_id.
§Example
let x = BlueGreenDeploymentInfo::new().set_deployment_id("example");Sourcepub fn set_or_clear_deployment_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deployment_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of deployment_id.
§Example
let x = BlueGreenDeploymentInfo::new().set_or_clear_deployment_id(Some("example"));
let x = BlueGreenDeploymentInfo::new().set_or_clear_deployment_id(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_sql_v1::model::blue_green_deployment_info::State;
let x0 = BlueGreenDeploymentInfo::new().set_or_clear_state(Some(State::PreSwitchover));
let x1 = BlueGreenDeploymentInfo::new().set_or_clear_state(Some(State::PostSwitchover));
let x_none = BlueGreenDeploymentInfo::new().set_or_clear_state(None::<State>);Sourcepub fn set_role_details<T: Into<Option<RoleDetails>>>(self, v: T) -> Self
pub fn set_role_details<T: Into<Option<RoleDetails>>>(self, v: T) -> Self
Sets the value of role_details.
Note that all the setters affecting role_details are mutually
exclusive.
§Example
use google_cloud_sql_v1::model::blue_green_deployment_info::SourceRole;
let x = BlueGreenDeploymentInfo::new().set_role_details(Some(
google_cloud_sql_v1::model::blue_green_deployment_info::RoleDetails::Source(SourceRole::default().into())));Sourcepub fn source(&self) -> Option<&Box<SourceRole>>
pub fn source(&self) -> Option<&Box<SourceRole>>
The value of role_details
if it holds a Source, None if the field is not set or
holds a different branch.
Sourcepub fn set_source<T: Into<Box<SourceRole>>>(self, v: T) -> Self
pub fn set_source<T: Into<Box<SourceRole>>>(self, v: T) -> Self
Sets the value of role_details
to hold a Source.
Note that all the setters affecting role_details are
mutually exclusive.
§Example
use google_cloud_sql_v1::model::blue_green_deployment_info::SourceRole;
let x = BlueGreenDeploymentInfo::new().set_source(SourceRole::default()/* use setters */);
assert!(x.source().is_some());
assert!(x.target().is_none());Sourcepub fn target(&self) -> Option<&Box<TargetRole>>
pub fn target(&self) -> Option<&Box<TargetRole>>
The value of role_details
if it holds a Target, None if the field is not set or
holds a different branch.
Sourcepub fn set_target<T: Into<Box<TargetRole>>>(self, v: T) -> Self
pub fn set_target<T: Into<Box<TargetRole>>>(self, v: T) -> Self
Sets the value of role_details
to hold a Target.
Note that all the setters affecting role_details are
mutually exclusive.
§Example
use google_cloud_sql_v1::model::blue_green_deployment_info::TargetRole;
let x = BlueGreenDeploymentInfo::new().set_target(TargetRole::default()/* use setters */);
assert!(x.target().is_some());
assert!(x.source().is_none());