#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyHapgInput {
pub hapg_arn: ::std::option::Option<::std::string::String>,
pub label: ::std::option::Option<::std::string::String>,
pub partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ModifyHapgInput {
pub fn hapg_arn(&self) -> ::std::option::Option<&str> {
self.hapg_arn.as_deref()
}
pub fn label(&self) -> ::std::option::Option<&str> {
self.label.as_deref()
}
pub fn partition_serial_list(&self) -> &[::std::string::String] {
self.partition_serial_list.as_deref().unwrap_or_default()
}
}
impl ModifyHapgInput {
pub fn builder() -> crate::operation::modify_hapg::builders::ModifyHapgInputBuilder {
crate::operation::modify_hapg::builders::ModifyHapgInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyHapgInputBuilder {
pub(crate) hapg_arn: ::std::option::Option<::std::string::String>,
pub(crate) label: ::std::option::Option<::std::string::String>,
pub(crate) partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ModifyHapgInputBuilder {
pub fn hapg_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hapg_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_hapg_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hapg_arn = input;
self
}
pub fn get_hapg_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.hapg_arn
}
pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.label = ::std::option::Option::Some(input.into());
self
}
pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.label = input;
self
}
pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
&self.label
}
pub fn partition_serial_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.partition_serial_list.unwrap_or_default();
v.push(input.into());
self.partition_serial_list = ::std::option::Option::Some(v);
self
}
pub fn set_partition_serial_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.partition_serial_list = input;
self
}
pub fn get_partition_serial_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.partition_serial_list
}
pub fn build(self) -> ::std::result::Result<crate::operation::modify_hapg::ModifyHapgInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::modify_hapg::ModifyHapgInput {
hapg_arn: self.hapg_arn,
label: self.label,
partition_serial_list: self.partition_serial_list,
})
}
}