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 UpdateProxyInput {
    /// <p>The NAT Gateway the proxy is attached to.</p>
    pub nat_gateway_id: ::std::option::Option<::std::string::String>,
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub proxy_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of a proxy.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub proxy_arn: ::std::option::Option<::std::string::String>,
    /// <p>Listener properties for HTTP and HTTPS traffic to add.</p>
    pub listener_properties_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>,
    /// <p>Listener properties for HTTP and HTTPS traffic to remove.</p>
    pub listener_properties_to_remove: ::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>A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy. The token marks the state of the proxy resource at the time of the request.</p>
    /// <p>To make changes to the proxy, you provide the token in your request. Network Firewall uses the token to ensure that the proxy hasn't changed since you last retrieved it. If it has changed, the operation fails with an <code>InvalidTokenException</code>. If this happens, retrieve the proxy again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.</p>
    pub update_token: ::std::option::Option<::std::string::String>,
}
impl UpdateProxyInput {
    /// <p>The NAT Gateway the proxy is attached to.</p>
    pub fn nat_gateway_id(&self) -> ::std::option::Option<&str> {
        self.nat_gateway_id.as_deref()
    }
    /// <p>The descriptive name of the proxy. You can't change the name of a proxy after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_name(&self) -> ::std::option::Option<&str> {
        self.proxy_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_arn(&self) -> ::std::option::Option<&str> {
        self.proxy_arn.as_deref()
    }
    /// <p>Listener properties for HTTP and HTTPS traffic to add.</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_to_add.is_none()`.
    pub fn listener_properties_to_add(&self) -> &[crate::types::ListenerPropertyRequest] {
        self.listener_properties_to_add.as_deref().unwrap_or_default()
    }
    /// <p>Listener properties for HTTP and HTTPS traffic to remove.</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_to_remove.is_none()`.
    pub fn listener_properties_to_remove(&self) -> &[crate::types::ListenerPropertyRequest] {
        self.listener_properties_to_remove.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>A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy. The token marks the state of the proxy resource at the time of the request.</p>
    /// <p>To make changes to the proxy, you provide the token in your request. Network Firewall uses the token to ensure that the proxy hasn't changed since you last retrieved it. If it has changed, the operation fails with an <code>InvalidTokenException</code>. If this happens, retrieve the proxy again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.</p>
    pub fn update_token(&self) -> ::std::option::Option<&str> {
        self.update_token.as_deref()
    }
}
impl UpdateProxyInput {
    /// Creates a new builder-style object to manufacture [`UpdateProxyInput`](crate::operation::update_proxy::UpdateProxyInput).
    pub fn builder() -> crate::operation::update_proxy::builders::UpdateProxyInputBuilder {
        crate::operation::update_proxy::builders::UpdateProxyInputBuilder::default()
    }
}

/// A builder for [`UpdateProxyInput`](crate::operation::update_proxy::UpdateProxyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProxyInputBuilder {
    pub(crate) nat_gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) proxy_name: ::std::option::Option<::std::string::String>,
    pub(crate) proxy_arn: ::std::option::Option<::std::string::String>,
    pub(crate) listener_properties_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>,
    pub(crate) listener_properties_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>,
    pub(crate) tls_intercept_properties: ::std::option::Option<crate::types::TlsInterceptPropertiesRequest>,
    pub(crate) update_token: ::std::option::Option<::std::string::String>,
}
impl UpdateProxyInputBuilder {
    /// <p>The NAT Gateway the proxy is attached to.</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>The NAT Gateway the proxy is attached to.</p>
    pub fn set_nat_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.nat_gateway_id = input;
        self
    }
    /// <p>The NAT Gateway the proxy is attached to.</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. You can't change the name of a proxy after you create it.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    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>
    /// <p>You must specify the ARN or the name, and you can specify both.</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>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn get_proxy_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_name
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn proxy_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn set_proxy_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of a proxy.</p>
    /// <p>You must specify the ARN or the name, and you can specify both.</p>
    pub fn get_proxy_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_arn
    }
    /// Appends an item to `listener_properties_to_add`.
    ///
    /// To override the contents of this collection use [`set_listener_properties_to_add`](Self::set_listener_properties_to_add).
    ///
    /// <p>Listener properties for HTTP and HTTPS traffic to add.</p>
    pub fn listener_properties_to_add(mut self, input: crate::types::ListenerPropertyRequest) -> Self {
        let mut v = self.listener_properties_to_add.unwrap_or_default();
        v.push(input);
        self.listener_properties_to_add = ::std::option::Option::Some(v);
        self
    }
    /// <p>Listener properties for HTTP and HTTPS traffic to add.</p>
    pub fn set_listener_properties_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>) -> Self {
        self.listener_properties_to_add = input;
        self
    }
    /// <p>Listener properties for HTTP and HTTPS traffic to add.</p>
    pub fn get_listener_properties_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>> {
        &self.listener_properties_to_add
    }
    /// Appends an item to `listener_properties_to_remove`.
    ///
    /// To override the contents of this collection use [`set_listener_properties_to_remove`](Self::set_listener_properties_to_remove).
    ///
    /// <p>Listener properties for HTTP and HTTPS traffic to remove.</p>
    pub fn listener_properties_to_remove(mut self, input: crate::types::ListenerPropertyRequest) -> Self {
        let mut v = self.listener_properties_to_remove.unwrap_or_default();
        v.push(input);
        self.listener_properties_to_remove = ::std::option::Option::Some(v);
        self
    }
    /// <p>Listener properties for HTTP and HTTPS traffic to remove.</p>
    pub fn set_listener_properties_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>>) -> Self {
        self.listener_properties_to_remove = input;
        self
    }
    /// <p>Listener properties for HTTP and HTTPS traffic to remove.</p>
    pub fn get_listener_properties_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ListenerPropertyRequest>> {
        &self.listener_properties_to_remove
    }
    /// <p>TLS decryption on traffic to filter on attributes in the HTTP header.</p>
    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
    }
    /// <p>A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy. The token marks the state of the proxy resource at the time of the request.</p>
    /// <p>To make changes to the proxy, you provide the token in your request. Network Firewall uses the token to ensure that the proxy hasn't changed since you last retrieved it. If it has changed, the operation fails with an <code>InvalidTokenException</code>. If this happens, retrieve the proxy again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.</p>
    /// This field is required.
    pub fn update_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.update_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy. The token marks the state of the proxy resource at the time of the request.</p>
    /// <p>To make changes to the proxy, you provide the token in your request. Network Firewall uses the token to ensure that the proxy hasn't changed since you last retrieved it. If it has changed, the operation fails with an <code>InvalidTokenException</code>. If this happens, retrieve the proxy again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.</p>
    pub fn set_update_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.update_token = input;
        self
    }
    /// <p>A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy. The token marks the state of the proxy resource at the time of the request.</p>
    /// <p>To make changes to the proxy, you provide the token in your request. Network Firewall uses the token to ensure that the proxy hasn't changed since you last retrieved it. If it has changed, the operation fails with an <code>InvalidTokenException</code>. If this happens, retrieve the proxy again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.</p>
    pub fn get_update_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.update_token
    }
    /// Consumes the builder and constructs a [`UpdateProxyInput`](crate::operation::update_proxy::UpdateProxyInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_proxy::UpdateProxyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_proxy::UpdateProxyInput {
            nat_gateway_id: self.nat_gateway_id,
            proxy_name: self.proxy_name,
            proxy_arn: self.proxy_arn,
            listener_properties_to_add: self.listener_properties_to_add,
            listener_properties_to_remove: self.listener_properties_to_remove,
            tls_intercept_properties: self.tls_intercept_properties,
            update_token: self.update_token,
        })
    }
}