1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types.</p><note>
/// <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href="http://aws.amazon.com/waf/pricing/">WAF Pricing</a>.</p>
/// </note>
/// <p>Example JSON: <code> { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" }</code></p>
/// <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>
/// <p>This is used in the <code>AssociationConfig</code> of the web ACL.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RequestBodyAssociatedResourceTypeConfig {
    /// <p>Specifies the maximum size of the web request body component that an associated CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resource should send to WAF for inspection. This applies to statements in the web ACL that inspect the body or JSON body.</p>
    /// <p>Default: <code>16 KB (16,384 bytes)</code></p>
    pub default_size_inspection_limit: crate::types::SizeInspectionLimit,
}
impl RequestBodyAssociatedResourceTypeConfig {
    /// <p>Specifies the maximum size of the web request body component that an associated CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resource should send to WAF for inspection. This applies to statements in the web ACL that inspect the body or JSON body.</p>
    /// <p>Default: <code>16 KB (16,384 bytes)</code></p>
    pub fn default_size_inspection_limit(&self) -> &crate::types::SizeInspectionLimit {
        &self.default_size_inspection_limit
    }
}
impl RequestBodyAssociatedResourceTypeConfig {
    /// Creates a new builder-style object to manufacture [`RequestBodyAssociatedResourceTypeConfig`](crate::types::RequestBodyAssociatedResourceTypeConfig).
    pub fn builder() -> crate::types::builders::RequestBodyAssociatedResourceTypeConfigBuilder {
        crate::types::builders::RequestBodyAssociatedResourceTypeConfigBuilder::default()
    }
}

/// A builder for [`RequestBodyAssociatedResourceTypeConfig`](crate::types::RequestBodyAssociatedResourceTypeConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RequestBodyAssociatedResourceTypeConfigBuilder {
    pub(crate) default_size_inspection_limit: ::std::option::Option<crate::types::SizeInspectionLimit>,
}
impl RequestBodyAssociatedResourceTypeConfigBuilder {
    /// <p>Specifies the maximum size of the web request body component that an associated CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resource should send to WAF for inspection. This applies to statements in the web ACL that inspect the body or JSON body.</p>
    /// <p>Default: <code>16 KB (16,384 bytes)</code></p>
    /// This field is required.
    pub fn default_size_inspection_limit(mut self, input: crate::types::SizeInspectionLimit) -> Self {
        self.default_size_inspection_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the maximum size of the web request body component that an associated CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resource should send to WAF for inspection. This applies to statements in the web ACL that inspect the body or JSON body.</p>
    /// <p>Default: <code>16 KB (16,384 bytes)</code></p>
    pub fn set_default_size_inspection_limit(mut self, input: ::std::option::Option<crate::types::SizeInspectionLimit>) -> Self {
        self.default_size_inspection_limit = input;
        self
    }
    /// <p>Specifies the maximum size of the web request body component that an associated CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resource should send to WAF for inspection. This applies to statements in the web ACL that inspect the body or JSON body.</p>
    /// <p>Default: <code>16 KB (16,384 bytes)</code></p>
    pub fn get_default_size_inspection_limit(&self) -> &::std::option::Option<crate::types::SizeInspectionLimit> {
        &self.default_size_inspection_limit
    }
    /// Consumes the builder and constructs a [`RequestBodyAssociatedResourceTypeConfig`](crate::types::RequestBodyAssociatedResourceTypeConfig).
    /// This method will fail if any of the following fields are not set:
    /// - [`default_size_inspection_limit`](crate::types::builders::RequestBodyAssociatedResourceTypeConfigBuilder::default_size_inspection_limit)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::types::RequestBodyAssociatedResourceTypeConfig, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::RequestBodyAssociatedResourceTypeConfig {
            default_size_inspection_limit: self.default_size_inspection_limit.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "default_size_inspection_limit",
                    "default_size_inspection_limit was not specified but it is required when building RequestBodyAssociatedResourceTypeConfig",
                )
            })?,
        })
    }
}