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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Filtering options for <i>ListGroups</i> operation. This is only used as input to Operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListGroupsFilters {
    /// <p>Filters only groups with the provided name prefix.</p>
    pub name_prefix: ::std::option::Option<::std::string::String>,
    /// <p>Filters only groups with the provided primary email prefix.</p>
    pub primary_email_prefix: ::std::option::Option<::std::string::String>,
    /// <p>Filters only groups with the provided state.</p>
    pub state: ::std::option::Option<crate::types::EntityState>,
}
impl ListGroupsFilters {
    /// <p>Filters only groups with the provided name prefix.</p>
    pub fn name_prefix(&self) -> ::std::option::Option<&str> {
        self.name_prefix.as_deref()
    }
    /// <p>Filters only groups with the provided primary email prefix.</p>
    pub fn primary_email_prefix(&self) -> ::std::option::Option<&str> {
        self.primary_email_prefix.as_deref()
    }
    /// <p>Filters only groups with the provided state.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::EntityState> {
        self.state.as_ref()
    }
}
impl ListGroupsFilters {
    /// Creates a new builder-style object to manufacture [`ListGroupsFilters`](crate::types::ListGroupsFilters).
    pub fn builder() -> crate::types::builders::ListGroupsFiltersBuilder {
        crate::types::builders::ListGroupsFiltersBuilder::default()
    }
}

/// A builder for [`ListGroupsFilters`](crate::types::ListGroupsFilters).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListGroupsFiltersBuilder {
    pub(crate) name_prefix: ::std::option::Option<::std::string::String>,
    pub(crate) primary_email_prefix: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::EntityState>,
}
impl ListGroupsFiltersBuilder {
    /// <p>Filters only groups with the provided name prefix.</p>
    pub fn name_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name_prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filters only groups with the provided name prefix.</p>
    pub fn set_name_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name_prefix = input;
        self
    }
    /// <p>Filters only groups with the provided name prefix.</p>
    pub fn get_name_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.name_prefix
    }
    /// <p>Filters only groups with the provided primary email prefix.</p>
    pub fn primary_email_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.primary_email_prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filters only groups with the provided primary email prefix.</p>
    pub fn set_primary_email_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.primary_email_prefix = input;
        self
    }
    /// <p>Filters only groups with the provided primary email prefix.</p>
    pub fn get_primary_email_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.primary_email_prefix
    }
    /// <p>Filters only groups with the provided state.</p>
    pub fn state(mut self, input: crate::types::EntityState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filters only groups with the provided state.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::EntityState>) -> Self {
        self.state = input;
        self
    }
    /// <p>Filters only groups with the provided state.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::EntityState> {
        &self.state
    }
    /// Consumes the builder and constructs a [`ListGroupsFilters`](crate::types::ListGroupsFilters).
    pub fn build(self) -> crate::types::ListGroupsFilters {
        crate::types::ListGroupsFilters {
            name_prefix: self.name_prefix,
            primary_email_prefix: self.primary_email_prefix,
            state: self.state,
        }
    }
}