aws-sdk-networkfirewall 1.111.0

AWS SDK for AWS Network Firewall
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 CreateProxyInput {
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    pub proxy_name: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the NAT gateway to use with proxy resources.</p>
    pub nat_gateway_id: ::std::option::Option<::std::string::String>,
    /// <p>The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub proxy_configuration_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of a proxy configuration.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub proxy_configuration_arn: ::std::option::Option<::std::string::String>,
    /// <p>Listener properties for HTTP and HTTPS traffic.</p>
    pub listener_properties: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>,
    /// <p>TLS decryption on traffic to filter on attributes in the HTTP header.</p>
    pub tls_intercept_properties: ::std::option::Option<crate::types::TlsInterceptPropertiesRequest>,
    /// <p>The key:value pairs to associate with the resource.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateProxyInput {
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    pub fn proxy_name(&self) -> ::std::option::Option<&str> {
        self.proxy_name.as_deref()
    }
    /// <p>A unique identifier for the NAT gateway to use with proxy resources.</p>
    pub fn nat_gateway_id(&self) -> ::std::option::Option<&str> {
        self.nat_gateway_id.as_deref()
    }
    /// <p>The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_configuration_name(&self) -> ::std::option::Option<&str> {
        self.proxy_configuration_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy configuration.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_configuration_arn(&self) -> ::std::option::Option<&str> {
        self.proxy_configuration_arn.as_deref()
    }
    /// <p>Listener properties for HTTP and HTTPS traffic.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.listener_properties.is_none()`.
    pub fn listener_properties(&self) -> &[crate::types::ListenerPropertyRequest] {
        self.listener_properties.as_deref().unwrap_or_default()
    }
    /// <p>TLS decryption on traffic to filter on attributes in the HTTP header.</p>
    pub fn tls_intercept_properties(&self) -> ::std::option::Option<&crate::types::TlsInterceptPropertiesRequest> {
        self.tls_intercept_properties.as_ref()
    }
    /// <p>The key:value pairs to associate with the resource.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateProxyInput {
    /// Creates a new builder-style object to manufacture [`CreateProxyInput`](crate::operation::create_proxy::CreateProxyInput).
    pub fn builder() -> crate::operation::create_proxy::builders::CreateProxyInputBuilder {
        crate::operation::create_proxy::builders::CreateProxyInputBuilder::default()
    }
}

/// A builder for [`CreateProxyInput`](crate::operation::create_proxy::CreateProxyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateProxyInputBuilder {
    pub(crate) proxy_name: ::std::option::Option<::std::string::String>,
    pub(crate) nat_gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) proxy_configuration_name: ::std::option::Option<::std::string::String>,
    pub(crate) proxy_configuration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) listener_properties: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>,
    pub(crate) tls_intercept_properties: ::std::option::Option<crate::types::TlsInterceptPropertiesRequest>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateProxyInputBuilder {
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    /// This field is required.
    pub fn proxy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    pub fn set_proxy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_name = input;
        self
    }
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    pub fn get_proxy_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_name
    }
    /// <p>A unique identifier for the NAT gateway to use with proxy resources.</p>
    /// This field is required.
    pub fn nat_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.nat_gateway_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the NAT gateway to use with proxy resources.</p>
    pub fn set_nat_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.nat_gateway_id = input;
        self
    }
    /// <p>A unique identifier for the NAT gateway to use with proxy resources.</p>
    pub fn get_nat_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.nat_gateway_id
    }
    /// <p>The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_configuration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_configuration_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn set_proxy_configuration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_configuration_name = input;
        self
    }
    /// <p>The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn get_proxy_configuration_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_configuration_name
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy configuration.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_configuration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy configuration.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn set_proxy_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_configuration_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy configuration.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn get_proxy_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_configuration_arn
    }
    /// Appends an item to `listener_properties`.
    ///
    /// To override the contents of this collection use [`set_listener_properties`](Self::set_listener_properties).
    ///
    /// <p>Listener properties for HTTP and HTTPS traffic.</p>
    pub fn listener_properties(mut self, input: crate::types::ListenerPropertyRequest) -> Self {
        let mut v = self.listener_properties.unwrap_or_default();
        v.push(input);
        self.listener_properties = ::std::option::Option::Some(v);
        self
    }
    /// <p>Listener properties for HTTP and HTTPS traffic.</p>
    pub fn set_listener_properties(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>) -> Self {
        self.listener_properties = input;
        self
    }
    /// <p>Listener properties for HTTP and HTTPS traffic.</p>
    pub fn get_listener_properties(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>> {
        &self.listener_properties
    }
    /// <p>TLS decryption on traffic to filter on attributes in the HTTP header.</p>
    /// This field is required.
    pub fn tls_intercept_properties(mut self, input: crate::types::TlsInterceptPropertiesRequest) -> Self {
        self.tls_intercept_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>TLS decryption on traffic to filter on attributes in the HTTP header.</p>
    pub fn set_tls_intercept_properties(mut self, input: ::std::option::Option<crate::types::TlsInterceptPropertiesRequest>) -> Self {
        self.tls_intercept_properties = input;
        self
    }
    /// <p>TLS decryption on traffic to filter on attributes in the HTTP header.</p>
    pub fn get_tls_intercept_properties(&self) -> &::std::option::Option<crate::types::TlsInterceptPropertiesRequest> {
        &self.tls_intercept_properties
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The key:value pairs to associate with the resource.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The key:value pairs to associate with the resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The key:value pairs to associate with the resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateProxyInput`](crate::operation::create_proxy::CreateProxyInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_proxy::CreateProxyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_proxy::CreateProxyInput {
            proxy_name: self.proxy_name,
            nat_gateway_id: self.nat_gateway_id,
            proxy_configuration_name: self.proxy_configuration_name,
            proxy_configuration_arn: self.proxy_configuration_arn,
            listener_properties: self.listener_properties,
            tls_intercept_properties: self.tls_intercept_properties,
            tags: self.tags,
        })
    }
}