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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A logical rule statement used to negate the results of another rule statement. You provide one <code>Statement</code> within the <code>NotStatement</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct NotStatement {
    /// <p>The statement to negate. You can use any statement that can be nested.</p>
    pub statement: ::std::option::Option<::std::boxed::Box<crate::types::Statement>>,
}
impl NotStatement {
    /// <p>The statement to negate. You can use any statement that can be nested.</p>
    pub fn statement(&self) -> ::std::option::Option<&crate::types::Statement> {
        self.statement.as_deref()
    }
}
impl NotStatement {
    /// Creates a new builder-style object to manufacture [`NotStatement`](crate::types::NotStatement).
    pub fn builder() -> crate::types::builders::NotStatementBuilder {
        crate::types::builders::NotStatementBuilder::default()
    }
}

/// A builder for [`NotStatement`](crate::types::NotStatement).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct NotStatementBuilder {
    pub(crate) statement: ::std::option::Option<::std::boxed::Box<crate::types::Statement>>,
}
impl NotStatementBuilder {
    /// <p>The statement to negate. You can use any statement that can be nested.</p>
    /// This field is required.
    pub fn statement(mut self, input: impl ::std::convert::Into<::std::boxed::Box<crate::types::Statement>>) -> Self {
        self.statement = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The statement to negate. You can use any statement that can be nested.</p>
    pub fn set_statement(mut self, input: ::std::option::Option<::std::boxed::Box<crate::types::Statement>>) -> Self {
        self.statement = input;
        self
    }
    /// <p>The statement to negate. You can use any statement that can be nested.</p>
    pub fn get_statement(&self) -> &::std::option::Option<::std::boxed::Box<crate::types::Statement>> {
        &self.statement
    }
    /// Consumes the builder and constructs a [`NotStatement`](crate::types::NotStatement).
    pub fn build(self) -> crate::types::NotStatement {
        crate::types::NotStatement { statement: self.statement }
    }
}