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

/// <p>Filters user data based on the contact information that is associated to the users. It contains a list of <a href="https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html">contact states</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ContactFilter {
    /// <p>A list of up to 9 <a href="https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html">contact states</a>.</p>
    pub contact_states: ::std::option::Option<::std::vec::Vec<crate::types::ContactState>>,
}
impl ContactFilter {
    /// <p>A list of up to 9 <a href="https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html">contact states</a>.</p>
    pub fn contact_states(&self) -> ::std::option::Option<&[crate::types::ContactState]> {
        self.contact_states.as_deref()
    }
}
impl ContactFilter {
    /// Creates a new builder-style object to manufacture [`ContactFilter`](crate::types::ContactFilter).
    pub fn builder() -> crate::types::builders::ContactFilterBuilder {
        crate::types::builders::ContactFilterBuilder::default()
    }
}

/// A builder for [`ContactFilter`](crate::types::ContactFilter).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ContactFilterBuilder {
    pub(crate) contact_states: ::std::option::Option<::std::vec::Vec<crate::types::ContactState>>,
}
impl ContactFilterBuilder {
    /// Appends an item to `contact_states`.
    ///
    /// To override the contents of this collection use [`set_contact_states`](Self::set_contact_states).
    ///
    /// <p>A list of up to 9 <a href="https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html">contact states</a>.</p>
    pub fn contact_states(mut self, input: crate::types::ContactState) -> Self {
        let mut v = self.contact_states.unwrap_or_default();
        v.push(input);
        self.contact_states = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of up to 9 <a href="https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html">contact states</a>.</p>
    pub fn set_contact_states(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContactState>>) -> Self {
        self.contact_states = input;
        self
    }
    /// <p>A list of up to 9 <a href="https://docs.aws.amazon.com/connect/latest/adminguide/about-contact-states.html">contact states</a>.</p>
    pub fn get_contact_states(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContactState>> {
        &self.contact_states
    }
    /// Consumes the builder and constructs a [`ContactFilter`](crate::types::ContactFilter).
    pub fn build(self) -> crate::types::ContactFilter {
        crate::types::ContactFilter {
            contact_states: self.contact_states,
        }
    }
}