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 DescribeFirewallOutput {
    /// <p>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new 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>,
    /// <p>The configuration settings for the firewall. These settings include the firewall policy and the subnets in your VPC to use for the firewall endpoints.</p>
    pub firewall: ::std::option::Option<crate::types::Firewall>,
    /// <p>Detailed information about the current status of a <code>Firewall</code>. You can retrieve this for a firewall by calling <code>DescribeFirewall</code> and providing the firewall name and ARN.</p>
    /// <p>The firewall status indicates a combined status. It indicates whether all subnets are up-to-date with the latest firewall configurations, which is based on the sync states config values, and also whether all subnets have their endpoints fully enabled, based on their sync states attachment values.</p>
    pub firewall_status: ::std::option::Option<crate::types::FirewallStatus>,
    _request_id: Option<String>,
}
impl DescribeFirewallOutput {
    /// <p>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new 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()
    }
    /// <p>The configuration settings for the firewall. These settings include the firewall policy and the subnets in your VPC to use for the firewall endpoints.</p>
    pub fn firewall(&self) -> ::std::option::Option<&crate::types::Firewall> {
        self.firewall.as_ref()
    }
    /// <p>Detailed information about the current status of a <code>Firewall</code>. You can retrieve this for a firewall by calling <code>DescribeFirewall</code> and providing the firewall name and ARN.</p>
    /// <p>The firewall status indicates a combined status. It indicates whether all subnets are up-to-date with the latest firewall configurations, which is based on the sync states config values, and also whether all subnets have their endpoints fully enabled, based on their sync states attachment values.</p>
    pub fn firewall_status(&self) -> ::std::option::Option<&crate::types::FirewallStatus> {
        self.firewall_status.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeFirewallOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeFirewallOutput {
    /// Creates a new builder-style object to manufacture [`DescribeFirewallOutput`](crate::operation::describe_firewall::DescribeFirewallOutput).
    pub fn builder() -> crate::operation::describe_firewall::builders::DescribeFirewallOutputBuilder {
        crate::operation::describe_firewall::builders::DescribeFirewallOutputBuilder::default()
    }
}

/// A builder for [`DescribeFirewallOutput`](crate::operation::describe_firewall::DescribeFirewallOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeFirewallOutputBuilder {
    pub(crate) update_token: ::std::option::Option<::std::string::String>,
    pub(crate) firewall: ::std::option::Option<crate::types::Firewall>,
    pub(crate) firewall_status: ::std::option::Option<crate::types::FirewallStatus>,
    _request_id: Option<String>,
}
impl DescribeFirewallOutputBuilder {
    /// <p>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new token. Reapply your changes as needed, then try the operation again using the new token.</p>
    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>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new 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>An optional token that you can use for optimistic locking. Network Firewall returns a token to your requests that access the firewall. The token marks the state of the firewall resource at the time of the request.</p>
    /// <p>To make an unconditional change to the firewall, omit the token in your update request. Without the token, Network Firewall performs your updates regardless of whether the firewall has changed since you last retrieved it.</p>
    /// <p>To make a conditional change to the firewall, provide the token in your update request. Network Firewall uses the token to ensure that the firewall 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 firewall again to get a current copy of it with a new 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
    }
    /// <p>The configuration settings for the firewall. These settings include the firewall policy and the subnets in your VPC to use for the firewall endpoints.</p>
    pub fn firewall(mut self, input: crate::types::Firewall) -> Self {
        self.firewall = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration settings for the firewall. These settings include the firewall policy and the subnets in your VPC to use for the firewall endpoints.</p>
    pub fn set_firewall(mut self, input: ::std::option::Option<crate::types::Firewall>) -> Self {
        self.firewall = input;
        self
    }
    /// <p>The configuration settings for the firewall. These settings include the firewall policy and the subnets in your VPC to use for the firewall endpoints.</p>
    pub fn get_firewall(&self) -> &::std::option::Option<crate::types::Firewall> {
        &self.firewall
    }
    /// <p>Detailed information about the current status of a <code>Firewall</code>. You can retrieve this for a firewall by calling <code>DescribeFirewall</code> and providing the firewall name and ARN.</p>
    /// <p>The firewall status indicates a combined status. It indicates whether all subnets are up-to-date with the latest firewall configurations, which is based on the sync states config values, and also whether all subnets have their endpoints fully enabled, based on their sync states attachment values.</p>
    pub fn firewall_status(mut self, input: crate::types::FirewallStatus) -> Self {
        self.firewall_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Detailed information about the current status of a <code>Firewall</code>. You can retrieve this for a firewall by calling <code>DescribeFirewall</code> and providing the firewall name and ARN.</p>
    /// <p>The firewall status indicates a combined status. It indicates whether all subnets are up-to-date with the latest firewall configurations, which is based on the sync states config values, and also whether all subnets have their endpoints fully enabled, based on their sync states attachment values.</p>
    pub fn set_firewall_status(mut self, input: ::std::option::Option<crate::types::FirewallStatus>) -> Self {
        self.firewall_status = input;
        self
    }
    /// <p>Detailed information about the current status of a <code>Firewall</code>. You can retrieve this for a firewall by calling <code>DescribeFirewall</code> and providing the firewall name and ARN.</p>
    /// <p>The firewall status indicates a combined status. It indicates whether all subnets are up-to-date with the latest firewall configurations, which is based on the sync states config values, and also whether all subnets have their endpoints fully enabled, based on their sync states attachment values.</p>
    pub fn get_firewall_status(&self) -> &::std::option::Option<crate::types::FirewallStatus> {
        &self.firewall_status
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeFirewallOutput`](crate::operation::describe_firewall::DescribeFirewallOutput).
    pub fn build(self) -> crate::operation::describe_firewall::DescribeFirewallOutput {
        crate::operation::describe_firewall::DescribeFirewallOutput {
            update_token: self.update_token,
            firewall: self.firewall,
            firewall_status: self.firewall_status,
            _request_id: self._request_id,
        }
    }
}