#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIpRestrictionInput {
pub aws_account_id: ::std::option::Option<::std::string::String>,
pub ip_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub vpc_id_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub vpc_endpoint_id_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub enabled: ::std::option::Option<bool>,
}
impl UpdateIpRestrictionInput {
pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
self.aws_account_id.as_deref()
}
pub fn ip_restriction_rule_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.ip_restriction_rule_map.as_ref()
}
pub fn vpc_id_restriction_rule_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.vpc_id_restriction_rule_map.as_ref()
}
pub fn vpc_endpoint_id_restriction_rule_map(
&self,
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.vpc_endpoint_id_restriction_rule_map.as_ref()
}
pub fn enabled(&self) -> ::std::option::Option<bool> {
self.enabled
}
}
impl UpdateIpRestrictionInput {
pub fn builder() -> crate::operation::update_ip_restriction::builders::UpdateIpRestrictionInputBuilder {
crate::operation::update_ip_restriction::builders::UpdateIpRestrictionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateIpRestrictionInputBuilder {
pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
pub(crate) ip_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) vpc_id_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) vpc_endpoint_id_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) enabled: ::std::option::Option<bool>,
}
impl UpdateIpRestrictionInputBuilder {
pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.aws_account_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aws_account_id = input;
self
}
pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.aws_account_id
}
pub fn ip_restriction_rule_map(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.ip_restriction_rule_map.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.ip_restriction_rule_map = ::std::option::Option::Some(hash_map);
self
}
pub fn set_ip_restriction_rule_map(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.ip_restriction_rule_map = input;
self
}
pub fn get_ip_restriction_rule_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.ip_restriction_rule_map
}
pub fn vpc_id_restriction_rule_map(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.vpc_id_restriction_rule_map.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.vpc_id_restriction_rule_map = ::std::option::Option::Some(hash_map);
self
}
pub fn set_vpc_id_restriction_rule_map(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.vpc_id_restriction_rule_map = input;
self
}
pub fn get_vpc_id_restriction_rule_map(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.vpc_id_restriction_rule_map
}
pub fn vpc_endpoint_id_restriction_rule_map(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.vpc_endpoint_id_restriction_rule_map.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.vpc_endpoint_id_restriction_rule_map = ::std::option::Option::Some(hash_map);
self
}
pub fn set_vpc_endpoint_id_restriction_rule_map(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.vpc_endpoint_id_restriction_rule_map = input;
self
}
pub fn get_vpc_endpoint_id_restriction_rule_map(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.vpc_endpoint_id_restriction_rule_map
}
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_ip_restriction::UpdateIpRestrictionInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_ip_restriction::UpdateIpRestrictionInput {
aws_account_id: self.aws_account_id,
ip_restriction_rule_map: self.ip_restriction_rule_map,
vpc_id_restriction_rule_map: self.vpc_id_restriction_rule_map,
vpc_endpoint_id_restriction_rule_map: self.vpc_endpoint_id_restriction_rule_map,
enabled: self.enabled,
})
}
}