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 DisassociateSubnetsOutput {
    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
    pub firewall_arn: ::std::option::Option<::std::string::String>,
    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
    pub firewall_name: ::std::option::Option<::std::string::String>,
    /// <p>The IDs of the subnets that are associated with the firewall.</p>
    pub subnet_mappings: ::std::option::Option<::std::vec::Vec<crate::types::SubnetMapping>>,
    /// <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>,
    _request_id: Option<String>,
}
impl DisassociateSubnetsOutput {
    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
    pub fn firewall_arn(&self) -> ::std::option::Option<&str> {
        self.firewall_arn.as_deref()
    }
    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
    pub fn firewall_name(&self) -> ::std::option::Option<&str> {
        self.firewall_name.as_deref()
    }
    /// <p>The IDs of the subnets that are associated with the firewall.</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 `.subnet_mappings.is_none()`.
    pub fn subnet_mappings(&self) -> &[crate::types::SubnetMapping] {
        self.subnet_mappings.as_deref().unwrap_or_default()
    }
    /// <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()
    }
}
impl ::aws_types::request_id::RequestId for DisassociateSubnetsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DisassociateSubnetsOutput {
    /// Creates a new builder-style object to manufacture [`DisassociateSubnetsOutput`](crate::operation::disassociate_subnets::DisassociateSubnetsOutput).
    pub fn builder() -> crate::operation::disassociate_subnets::builders::DisassociateSubnetsOutputBuilder {
        crate::operation::disassociate_subnets::builders::DisassociateSubnetsOutputBuilder::default()
    }
}

/// A builder for [`DisassociateSubnetsOutput`](crate::operation::disassociate_subnets::DisassociateSubnetsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateSubnetsOutputBuilder {
    pub(crate) firewall_arn: ::std::option::Option<::std::string::String>,
    pub(crate) firewall_name: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_mappings: ::std::option::Option<::std::vec::Vec<crate::types::SubnetMapping>>,
    pub(crate) update_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DisassociateSubnetsOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
    pub fn firewall_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.firewall_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
    pub fn set_firewall_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.firewall_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
    pub fn get_firewall_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.firewall_arn
    }
    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
    pub fn firewall_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.firewall_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
    pub fn set_firewall_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.firewall_name = input;
        self
    }
    /// <p>The descriptive name of the firewall. You can't change the name of a firewall after you create it.</p>
    pub fn get_firewall_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.firewall_name
    }
    /// Appends an item to `subnet_mappings`.
    ///
    /// To override the contents of this collection use [`set_subnet_mappings`](Self::set_subnet_mappings).
    ///
    /// <p>The IDs of the subnets that are associated with the firewall.</p>
    pub fn subnet_mappings(mut self, input: crate::types::SubnetMapping) -> Self {
        let mut v = self.subnet_mappings.unwrap_or_default();
        v.push(input);
        self.subnet_mappings = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of the subnets that are associated with the firewall.</p>
    pub fn set_subnet_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubnetMapping>>) -> Self {
        self.subnet_mappings = input;
        self
    }
    /// <p>The IDs of the subnets that are associated with the firewall.</p>
    pub fn get_subnet_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubnetMapping>> {
        &self.subnet_mappings
    }
    /// <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
    }
    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 [`DisassociateSubnetsOutput`](crate::operation::disassociate_subnets::DisassociateSubnetsOutput).
    pub fn build(self) -> crate::operation::disassociate_subnets::DisassociateSubnetsOutput {
        crate::operation::disassociate_subnets::DisassociateSubnetsOutput {
            firewall_arn: self.firewall_arn,
            firewall_name: self.firewall_name,
            subnet_mappings: self.subnet_mappings,
            update_token: self.update_token,
            _request_id: self._request_id,
        }
    }
}