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
// 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 ValidateSecurityProfileBehaviorsInput {
    /// <p>Specifies the behaviors that, when violated by a device (thing), cause an alert.</p>
    pub behaviors: ::std::option::Option<::std::vec::Vec<crate::types::Behavior>>,
}
impl ValidateSecurityProfileBehaviorsInput {
    /// <p>Specifies the behaviors that, when violated by a device (thing), cause an alert.</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 `.behaviors.is_none()`.
    pub fn behaviors(&self) -> &[crate::types::Behavior] {
        self.behaviors.as_deref().unwrap_or_default()
    }
}
impl ValidateSecurityProfileBehaviorsInput {
    /// Creates a new builder-style object to manufacture [`ValidateSecurityProfileBehaviorsInput`](crate::operation::validate_security_profile_behaviors::ValidateSecurityProfileBehaviorsInput).
    pub fn builder() -> crate::operation::validate_security_profile_behaviors::builders::ValidateSecurityProfileBehaviorsInputBuilder {
        crate::operation::validate_security_profile_behaviors::builders::ValidateSecurityProfileBehaviorsInputBuilder::default()
    }
}

/// A builder for [`ValidateSecurityProfileBehaviorsInput`](crate::operation::validate_security_profile_behaviors::ValidateSecurityProfileBehaviorsInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ValidateSecurityProfileBehaviorsInputBuilder {
    pub(crate) behaviors: ::std::option::Option<::std::vec::Vec<crate::types::Behavior>>,
}
impl ValidateSecurityProfileBehaviorsInputBuilder {
    /// Appends an item to `behaviors`.
    ///
    /// To override the contents of this collection use [`set_behaviors`](Self::set_behaviors).
    ///
    /// <p>Specifies the behaviors that, when violated by a device (thing), cause an alert.</p>
    pub fn behaviors(mut self, input: crate::types::Behavior) -> Self {
        let mut v = self.behaviors.unwrap_or_default();
        v.push(input);
        self.behaviors = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies the behaviors that, when violated by a device (thing), cause an alert.</p>
    pub fn set_behaviors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Behavior>>) -> Self {
        self.behaviors = input;
        self
    }
    /// <p>Specifies the behaviors that, when violated by a device (thing), cause an alert.</p>
    pub fn get_behaviors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Behavior>> {
        &self.behaviors
    }
    /// Consumes the builder and constructs a [`ValidateSecurityProfileBehaviorsInput`](crate::operation::validate_security_profile_behaviors::ValidateSecurityProfileBehaviorsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::validate_security_profile_behaviors::ValidateSecurityProfileBehaviorsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::validate_security_profile_behaviors::ValidateSecurityProfileBehaviorsInput { behaviors: self.behaviors },
        )
    }
}