aws-sdk-quicksight 1.135.0

AWS SDK for Amazon QuickSight
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIpRestrictionInput {
    /// <p>The ID of the Amazon Web Services account that contains the IP rules.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>A map that describes the updated IP rules with CIDR ranges and descriptions.</p>
    pub ip_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A map of VPC IDs and their corresponding rules. When you configure this parameter, traffic from all VPC endpoints that are present in the specified VPC is allowed.</p>
    pub vpc_id_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A map of allowed VPC endpoint IDs and their corresponding rule descriptions.</p>
    pub vpc_endpoint_id_restriction_rule_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A value that specifies whether IP rules are turned on.</p>
    pub enabled: ::std::option::Option<bool>,
}
impl UpdateIpRestrictionInput {
    /// <p>The ID of the Amazon Web Services account that contains the IP rules.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>A map that describes the updated IP rules with CIDR ranges and descriptions.</p>
    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()
    }
    /// <p>A map of VPC IDs and their corresponding rules. When you configure this parameter, traffic from all VPC endpoints that are present in the specified VPC is allowed.</p>
    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()
    }
    /// <p>A map of allowed VPC endpoint IDs and their corresponding rule descriptions.</p>
    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()
    }
    /// <p>A value that specifies whether IP rules are turned on.</p>
    pub fn enabled(&self) -> ::std::option::Option<bool> {
        self.enabled
    }
}
impl UpdateIpRestrictionInput {
    /// Creates a new builder-style object to manufacture [`UpdateIpRestrictionInput`](crate::operation::update_ip_restriction::UpdateIpRestrictionInput).
    pub fn builder() -> crate::operation::update_ip_restriction::builders::UpdateIpRestrictionInputBuilder {
        crate::operation::update_ip_restriction::builders::UpdateIpRestrictionInputBuilder::default()
    }
}

/// A builder for [`UpdateIpRestrictionInput`](crate::operation::update_ip_restriction::UpdateIpRestrictionInput).
#[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 {
    /// <p>The ID of the Amazon Web Services account that contains the IP rules.</p>
    /// This field is required.
    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
    }
    /// <p>The ID of the Amazon Web Services account that contains the IP rules.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the IP rules.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// Adds a key-value pair to `ip_restriction_rule_map`.
    ///
    /// To override the contents of this collection use [`set_ip_restriction_rule_map`](Self::set_ip_restriction_rule_map).
    ///
    /// <p>A map that describes the updated IP rules with CIDR ranges and descriptions.</p>
    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
    }
    /// <p>A map that describes the updated IP rules with CIDR ranges and descriptions.</p>
    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
    }
    /// <p>A map that describes the updated IP rules with CIDR ranges and descriptions.</p>
    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
    }
    /// Adds a key-value pair to `vpc_id_restriction_rule_map`.
    ///
    /// To override the contents of this collection use [`set_vpc_id_restriction_rule_map`](Self::set_vpc_id_restriction_rule_map).
    ///
    /// <p>A map of VPC IDs and their corresponding rules. When you configure this parameter, traffic from all VPC endpoints that are present in the specified VPC is allowed.</p>
    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
    }
    /// <p>A map of VPC IDs and their corresponding rules. When you configure this parameter, traffic from all VPC endpoints that are present in the specified VPC is allowed.</p>
    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
    }
    /// <p>A map of VPC IDs and their corresponding rules. When you configure this parameter, traffic from all VPC endpoints that are present in the specified VPC is allowed.</p>
    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
    }
    /// Adds a key-value pair to `vpc_endpoint_id_restriction_rule_map`.
    ///
    /// To override the contents of this collection use [`set_vpc_endpoint_id_restriction_rule_map`](Self::set_vpc_endpoint_id_restriction_rule_map).
    ///
    /// <p>A map of allowed VPC endpoint IDs and their corresponding rule descriptions.</p>
    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
    }
    /// <p>A map of allowed VPC endpoint IDs and their corresponding rule descriptions.</p>
    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
    }
    /// <p>A map of allowed VPC endpoint IDs and their corresponding rule descriptions.</p>
    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
    }
    /// <p>A value that specifies whether IP rules are turned on.</p>
    pub fn enabled(mut self, input: bool) -> Self {
        self.enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>A value that specifies whether IP rules are turned on.</p>
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enabled = input;
        self
    }
    /// <p>A value that specifies whether IP rules are turned on.</p>
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
        &self.enabled
    }
    /// Consumes the builder and constructs a [`UpdateIpRestrictionInput`](crate::operation::update_ip_restriction::UpdateIpRestrictionInput).
    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,
        })
    }
}