#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateFlowInput {
#[doc(hidden)]
pub flow_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub source_failover_config: std::option::Option<crate::types::UpdateFailoverConfig>,
#[doc(hidden)]
pub maintenance: std::option::Option<crate::types::UpdateMaintenance>,
}
impl UpdateFlowInput {
pub fn flow_arn(&self) -> std::option::Option<&str> {
self.flow_arn.as_deref()
}
pub fn source_failover_config(
&self,
) -> std::option::Option<&crate::types::UpdateFailoverConfig> {
self.source_failover_config.as_ref()
}
pub fn maintenance(&self) -> std::option::Option<&crate::types::UpdateMaintenance> {
self.maintenance.as_ref()
}
}
impl UpdateFlowInput {
pub fn builder() -> crate::operation::update_flow::builders::UpdateFlowInputBuilder {
crate::operation::update_flow::builders::UpdateFlowInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdateFlowInputBuilder {
pub(crate) flow_arn: std::option::Option<std::string::String>,
pub(crate) source_failover_config: std::option::Option<crate::types::UpdateFailoverConfig>,
pub(crate) maintenance: std::option::Option<crate::types::UpdateMaintenance>,
}
impl UpdateFlowInputBuilder {
pub fn flow_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.flow_arn = Some(input.into());
self
}
pub fn set_flow_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.flow_arn = input;
self
}
pub fn source_failover_config(mut self, input: crate::types::UpdateFailoverConfig) -> Self {
self.source_failover_config = Some(input);
self
}
pub fn set_source_failover_config(
mut self,
input: std::option::Option<crate::types::UpdateFailoverConfig>,
) -> Self {
self.source_failover_config = input;
self
}
pub fn maintenance(mut self, input: crate::types::UpdateMaintenance) -> Self {
self.maintenance = Some(input);
self
}
pub fn set_maintenance(
mut self,
input: std::option::Option<crate::types::UpdateMaintenance>,
) -> Self {
self.maintenance = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::update_flow::UpdateFlowInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::update_flow::UpdateFlowInput {
flow_arn: self.flow_arn,
source_failover_config: self.source_failover_config,
maintenance: self.maintenance,
})
}
}