#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartFailbackLaunchInput {
pub recovery_instance_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl StartFailbackLaunchInput {
pub fn recovery_instance_ids(&self) -> &[::std::string::String] {
self.recovery_instance_ids.as_deref().unwrap_or_default()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::std::fmt::Debug for StartFailbackLaunchInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartFailbackLaunchInput");
formatter.field("recovery_instance_ids", &self.recovery_instance_ids);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl StartFailbackLaunchInput {
pub fn builder() -> crate::operation::start_failback_launch::builders::StartFailbackLaunchInputBuilder {
crate::operation::start_failback_launch::builders::StartFailbackLaunchInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartFailbackLaunchInputBuilder {
pub(crate) recovery_instance_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl StartFailbackLaunchInputBuilder {
pub fn recovery_instance_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.recovery_instance_ids.unwrap_or_default();
v.push(input.into());
self.recovery_instance_ids = ::std::option::Option::Some(v);
self
}
pub fn set_recovery_instance_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.recovery_instance_ids = input;
self
}
pub fn get_recovery_instance_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.recovery_instance_ids
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_failback_launch::StartFailbackLaunchInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::start_failback_launch::StartFailbackLaunchInput {
recovery_instance_ids: self.recovery_instance_ids,
tags: self.tags,
})
}
}
impl ::std::fmt::Debug for StartFailbackLaunchInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartFailbackLaunchInputBuilder");
formatter.field("recovery_instance_ids", &self.recovery_instance_ids);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}