aws-sdk-waf 1.98.0

AWS SDK for AWS WAF
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 GetWebAclOutput {
    /// <p>Information about the <code>WebACL</code> that you specified in the <code>GetWebACL</code> request. For more information, see the following topics:</p>
    /// <ul>
    /// <li>
    /// <p><code>WebACL</code>: Contains <code>DefaultAction</code>, <code>MetricName</code>, <code>Name</code>, an array of <code>Rule</code> objects, and <code>WebACLId</code></p></li>
    /// <li>
    /// <p><code>DefaultAction</code> (Data type is <code>WafAction</code>): Contains <code>Type</code></p></li>
    /// <li>
    /// <p><code>Rules</code>: Contains an array of <code>ActivatedRule</code> objects, which contain <code>Action</code>, <code>Priority</code>, and <code>RuleId</code></p></li>
    /// <li>
    /// <p><code>Action</code>: Contains <code>Type</code></p></li>
    /// </ul>
    pub web_acl: ::std::option::Option<crate::types::WebAcl>,
    _request_id: Option<String>,
}
impl GetWebAclOutput {
    /// <p>Information about the <code>WebACL</code> that you specified in the <code>GetWebACL</code> request. For more information, see the following topics:</p>
    /// <ul>
    /// <li>
    /// <p><code>WebACL</code>: Contains <code>DefaultAction</code>, <code>MetricName</code>, <code>Name</code>, an array of <code>Rule</code> objects, and <code>WebACLId</code></p></li>
    /// <li>
    /// <p><code>DefaultAction</code> (Data type is <code>WafAction</code>): Contains <code>Type</code></p></li>
    /// <li>
    /// <p><code>Rules</code>: Contains an array of <code>ActivatedRule</code> objects, which contain <code>Action</code>, <code>Priority</code>, and <code>RuleId</code></p></li>
    /// <li>
    /// <p><code>Action</code>: Contains <code>Type</code></p></li>
    /// </ul>
    pub fn web_acl(&self) -> ::std::option::Option<&crate::types::WebAcl> {
        self.web_acl.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetWebAclOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetWebAclOutput {
    /// Creates a new builder-style object to manufacture [`GetWebAclOutput`](crate::operation::get_web_acl::GetWebAclOutput).
    pub fn builder() -> crate::operation::get_web_acl::builders::GetWebAclOutputBuilder {
        crate::operation::get_web_acl::builders::GetWebAclOutputBuilder::default()
    }
}

/// A builder for [`GetWebAclOutput`](crate::operation::get_web_acl::GetWebAclOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetWebAclOutputBuilder {
    pub(crate) web_acl: ::std::option::Option<crate::types::WebAcl>,
    _request_id: Option<String>,
}
impl GetWebAclOutputBuilder {
    /// <p>Information about the <code>WebACL</code> that you specified in the <code>GetWebACL</code> request. For more information, see the following topics:</p>
    /// <ul>
    /// <li>
    /// <p><code>WebACL</code>: Contains <code>DefaultAction</code>, <code>MetricName</code>, <code>Name</code>, an array of <code>Rule</code> objects, and <code>WebACLId</code></p></li>
    /// <li>
    /// <p><code>DefaultAction</code> (Data type is <code>WafAction</code>): Contains <code>Type</code></p></li>
    /// <li>
    /// <p><code>Rules</code>: Contains an array of <code>ActivatedRule</code> objects, which contain <code>Action</code>, <code>Priority</code>, and <code>RuleId</code></p></li>
    /// <li>
    /// <p><code>Action</code>: Contains <code>Type</code></p></li>
    /// </ul>
    pub fn web_acl(mut self, input: crate::types::WebAcl) -> Self {
        self.web_acl = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the <code>WebACL</code> that you specified in the <code>GetWebACL</code> request. For more information, see the following topics:</p>
    /// <ul>
    /// <li>
    /// <p><code>WebACL</code>: Contains <code>DefaultAction</code>, <code>MetricName</code>, <code>Name</code>, an array of <code>Rule</code> objects, and <code>WebACLId</code></p></li>
    /// <li>
    /// <p><code>DefaultAction</code> (Data type is <code>WafAction</code>): Contains <code>Type</code></p></li>
    /// <li>
    /// <p><code>Rules</code>: Contains an array of <code>ActivatedRule</code> objects, which contain <code>Action</code>, <code>Priority</code>, and <code>RuleId</code></p></li>
    /// <li>
    /// <p><code>Action</code>: Contains <code>Type</code></p></li>
    /// </ul>
    pub fn set_web_acl(mut self, input: ::std::option::Option<crate::types::WebAcl>) -> Self {
        self.web_acl = input;
        self
    }
    /// <p>Information about the <code>WebACL</code> that you specified in the <code>GetWebACL</code> request. For more information, see the following topics:</p>
    /// <ul>
    /// <li>
    /// <p><code>WebACL</code>: Contains <code>DefaultAction</code>, <code>MetricName</code>, <code>Name</code>, an array of <code>Rule</code> objects, and <code>WebACLId</code></p></li>
    /// <li>
    /// <p><code>DefaultAction</code> (Data type is <code>WafAction</code>): Contains <code>Type</code></p></li>
    /// <li>
    /// <p><code>Rules</code>: Contains an array of <code>ActivatedRule</code> objects, which contain <code>Action</code>, <code>Priority</code>, and <code>RuleId</code></p></li>
    /// <li>
    /// <p><code>Action</code>: Contains <code>Type</code></p></li>
    /// </ul>
    pub fn get_web_acl(&self) -> &::std::option::Option<crate::types::WebAcl> {
        &self.web_acl
    }
    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 [`GetWebAclOutput`](crate::operation::get_web_acl::GetWebAclOutput).
    pub fn build(self) -> crate::operation::get_web_acl::GetWebAclOutput {
        crate::operation::get_web_acl::GetWebAclOutput {
            web_acl: self.web_acl,
            _request_id: self._request_id,
        }
    }
}