#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSubnetGroupInput {
pub subnet_group_name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateSubnetGroupInput {
pub fn subnet_group_name(&self) -> ::std::option::Option<&str> {
self.subnet_group_name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn subnet_ids(&self) -> &[::std::string::String] {
self.subnet_ids.as_deref().unwrap_or_default()
}
}
impl CreateSubnetGroupInput {
pub fn builder() -> crate::operation::create_subnet_group::builders::CreateSubnetGroupInputBuilder {
crate::operation::create_subnet_group::builders::CreateSubnetGroupInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSubnetGroupInputBuilder {
pub(crate) subnet_group_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateSubnetGroupInputBuilder {
pub fn subnet_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subnet_group_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_subnet_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subnet_group_name = input;
self
}
pub fn get_subnet_group_name(&self) -> &::std::option::Option<::std::string::String> {
&self.subnet_group_name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subnet_ids.unwrap_or_default();
v.push(input.into());
self.subnet_ids = ::std::option::Option::Some(v);
self
}
pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subnet_ids = input;
self
}
pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subnet_ids
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_subnet_group::CreateSubnetGroupInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_subnet_group::CreateSubnetGroupInput {
subnet_group_name: self.subnet_group_name,
description: self.description,
subnet_ids: self.subnet_ids,
})
}
}