aws_sdk_elasticache/operation/describe_users/
_describe_users_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeUsersInput {
6    /// <p>The engine.</p>
7    pub engine: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the user.</p>
9    pub user_id: ::std::option::Option<::std::string::String>,
10    /// <p>Filter to determine the list of User IDs to return.</p>
11    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
12    /// <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.</p>
13    pub max_records: ::std::option::Option<i32>,
14    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. &gt;</p>
15    pub marker: ::std::option::Option<::std::string::String>,
16}
17impl DescribeUsersInput {
18    /// <p>The engine.</p>
19    pub fn engine(&self) -> ::std::option::Option<&str> {
20        self.engine.as_deref()
21    }
22    /// <p>The ID of the user.</p>
23    pub fn user_id(&self) -> ::std::option::Option<&str> {
24        self.user_id.as_deref()
25    }
26    /// <p>Filter to determine the list of User IDs to return.</p>
27    ///
28    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
29    pub fn filters(&self) -> &[crate::types::Filter] {
30        self.filters.as_deref().unwrap_or_default()
31    }
32    /// <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.</p>
33    pub fn max_records(&self) -> ::std::option::Option<i32> {
34        self.max_records
35    }
36    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. &gt;</p>
37    pub fn marker(&self) -> ::std::option::Option<&str> {
38        self.marker.as_deref()
39    }
40}
41impl DescribeUsersInput {
42    /// Creates a new builder-style object to manufacture [`DescribeUsersInput`](crate::operation::describe_users::DescribeUsersInput).
43    pub fn builder() -> crate::operation::describe_users::builders::DescribeUsersInputBuilder {
44        crate::operation::describe_users::builders::DescribeUsersInputBuilder::default()
45    }
46}
47
48/// A builder for [`DescribeUsersInput`](crate::operation::describe_users::DescribeUsersInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct DescribeUsersInputBuilder {
52    pub(crate) engine: ::std::option::Option<::std::string::String>,
53    pub(crate) user_id: ::std::option::Option<::std::string::String>,
54    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
55    pub(crate) max_records: ::std::option::Option<i32>,
56    pub(crate) marker: ::std::option::Option<::std::string::String>,
57}
58impl DescribeUsersInputBuilder {
59    /// <p>The engine.</p>
60    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.engine = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The engine.</p>
65    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.engine = input;
67        self
68    }
69    /// <p>The engine.</p>
70    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
71        &self.engine
72    }
73    /// <p>The ID of the user.</p>
74    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.user_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The ID of the user.</p>
79    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.user_id = input;
81        self
82    }
83    /// <p>The ID of the user.</p>
84    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.user_id
86    }
87    /// Appends an item to `filters`.
88    ///
89    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
90    ///
91    /// <p>Filter to determine the list of User IDs to return.</p>
92    pub fn filters(mut self, input: crate::types::Filter) -> Self {
93        let mut v = self.filters.unwrap_or_default();
94        v.push(input);
95        self.filters = ::std::option::Option::Some(v);
96        self
97    }
98    /// <p>Filter to determine the list of User IDs to return.</p>
99    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
100        self.filters = input;
101        self
102    }
103    /// <p>Filter to determine the list of User IDs to return.</p>
104    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
105        &self.filters
106    }
107    /// <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.</p>
108    pub fn max_records(mut self, input: i32) -> Self {
109        self.max_records = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.</p>
113    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
114        self.max_records = input;
115        self
116    }
117    /// <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.</p>
118    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
119        &self.max_records
120    }
121    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. &gt;</p>
122    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.marker = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. &gt;</p>
127    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.marker = input;
129        self
130    }
131    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. &gt;</p>
132    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
133        &self.marker
134    }
135    /// Consumes the builder and constructs a [`DescribeUsersInput`](crate::operation::describe_users::DescribeUsersInput).
136    pub fn build(
137        self,
138    ) -> ::std::result::Result<crate::operation::describe_users::DescribeUsersInput, ::aws_smithy_types::error::operation::BuildError> {
139        ::std::result::Result::Ok(crate::operation::describe_users::DescribeUsersInput {
140            engine: self.engine,
141            user_id: self.user_id,
142            filters: self.filters,
143            max_records: self.max_records,
144            marker: self.marker,
145        })
146    }
147}