aws_sdk_docdb/operation/describe_certificates/
_describe_certificates_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 DescribeCertificatesInput {
6    /// <p>The user-supplied certificate identifier. If this parameter is specified, information for only the specified certificate is returned. If this parameter is omitted, a list of up to <code>MaxRecords</code> certificates is returned. This parameter is not case sensitive.</p>
7    /// <p>Constraints</p>
8    /// <ul>
9    /// <li>
10    /// <p>Must match an existing <code>CertificateIdentifier</code>.</p></li>
11    /// </ul>
12    pub certificate_identifier: ::std::option::Option<::std::string::String>,
13    /// <p>This parameter is not currently supported.</p>
14    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
15    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
16    /// <p>Default: 100</p>
17    /// <p>Constraints:</p>
18    /// <ul>
19    /// <li>
20    /// <p>Minimum: 20</p></li>
21    /// <li>
22    /// <p>Maximum: 100</p></li>
23    /// </ul>
24    pub max_records: ::std::option::Option<i32>,
25    /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
26    pub marker: ::std::option::Option<::std::string::String>,
27}
28impl DescribeCertificatesInput {
29    /// <p>The user-supplied certificate identifier. If this parameter is specified, information for only the specified certificate is returned. If this parameter is omitted, a list of up to <code>MaxRecords</code> certificates is returned. This parameter is not case sensitive.</p>
30    /// <p>Constraints</p>
31    /// <ul>
32    /// <li>
33    /// <p>Must match an existing <code>CertificateIdentifier</code>.</p></li>
34    /// </ul>
35    pub fn certificate_identifier(&self) -> ::std::option::Option<&str> {
36        self.certificate_identifier.as_deref()
37    }
38    /// <p>This parameter is not currently supported.</p>
39    ///
40    /// 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()`.
41    pub fn filters(&self) -> &[crate::types::Filter] {
42        self.filters.as_deref().unwrap_or_default()
43    }
44    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
45    /// <p>Default: 100</p>
46    /// <p>Constraints:</p>
47    /// <ul>
48    /// <li>
49    /// <p>Minimum: 20</p></li>
50    /// <li>
51    /// <p>Maximum: 100</p></li>
52    /// </ul>
53    pub fn max_records(&self) -> ::std::option::Option<i32> {
54        self.max_records
55    }
56    /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
57    pub fn marker(&self) -> ::std::option::Option<&str> {
58        self.marker.as_deref()
59    }
60}
61impl DescribeCertificatesInput {
62    /// Creates a new builder-style object to manufacture [`DescribeCertificatesInput`](crate::operation::describe_certificates::DescribeCertificatesInput).
63    pub fn builder() -> crate::operation::describe_certificates::builders::DescribeCertificatesInputBuilder {
64        crate::operation::describe_certificates::builders::DescribeCertificatesInputBuilder::default()
65    }
66}
67
68/// A builder for [`DescribeCertificatesInput`](crate::operation::describe_certificates::DescribeCertificatesInput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
70#[non_exhaustive]
71pub struct DescribeCertificatesInputBuilder {
72    pub(crate) certificate_identifier: ::std::option::Option<::std::string::String>,
73    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
74    pub(crate) max_records: ::std::option::Option<i32>,
75    pub(crate) marker: ::std::option::Option<::std::string::String>,
76}
77impl DescribeCertificatesInputBuilder {
78    /// <p>The user-supplied certificate identifier. If this parameter is specified, information for only the specified certificate is returned. If this parameter is omitted, a list of up to <code>MaxRecords</code> certificates is returned. This parameter is not case sensitive.</p>
79    /// <p>Constraints</p>
80    /// <ul>
81    /// <li>
82    /// <p>Must match an existing <code>CertificateIdentifier</code>.</p></li>
83    /// </ul>
84    pub fn certificate_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.certificate_identifier = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The user-supplied certificate identifier. If this parameter is specified, information for only the specified certificate is returned. If this parameter is omitted, a list of up to <code>MaxRecords</code> certificates is returned. This parameter is not case sensitive.</p>
89    /// <p>Constraints</p>
90    /// <ul>
91    /// <li>
92    /// <p>Must match an existing <code>CertificateIdentifier</code>.</p></li>
93    /// </ul>
94    pub fn set_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.certificate_identifier = input;
96        self
97    }
98    /// <p>The user-supplied certificate identifier. If this parameter is specified, information for only the specified certificate is returned. If this parameter is omitted, a list of up to <code>MaxRecords</code> certificates is returned. This parameter is not case sensitive.</p>
99    /// <p>Constraints</p>
100    /// <ul>
101    /// <li>
102    /// <p>Must match an existing <code>CertificateIdentifier</code>.</p></li>
103    /// </ul>
104    pub fn get_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
105        &self.certificate_identifier
106    }
107    /// Appends an item to `filters`.
108    ///
109    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
110    ///
111    /// <p>This parameter is not currently supported.</p>
112    pub fn filters(mut self, input: crate::types::Filter) -> Self {
113        let mut v = self.filters.unwrap_or_default();
114        v.push(input);
115        self.filters = ::std::option::Option::Some(v);
116        self
117    }
118    /// <p>This parameter is not currently supported.</p>
119    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
120        self.filters = input;
121        self
122    }
123    /// <p>This parameter is not currently supported.</p>
124    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
125        &self.filters
126    }
127    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
128    /// <p>Default: 100</p>
129    /// <p>Constraints:</p>
130    /// <ul>
131    /// <li>
132    /// <p>Minimum: 20</p></li>
133    /// <li>
134    /// <p>Maximum: 100</p></li>
135    /// </ul>
136    pub fn max_records(mut self, input: i32) -> Self {
137        self.max_records = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
141    /// <p>Default: 100</p>
142    /// <p>Constraints:</p>
143    /// <ul>
144    /// <li>
145    /// <p>Minimum: 20</p></li>
146    /// <li>
147    /// <p>Maximum: 100</p></li>
148    /// </ul>
149    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
150        self.max_records = input;
151        self
152    }
153    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
154    /// <p>Default: 100</p>
155    /// <p>Constraints:</p>
156    /// <ul>
157    /// <li>
158    /// <p>Minimum: 20</p></li>
159    /// <li>
160    /// <p>Maximum: 100</p></li>
161    /// </ul>
162    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
163        &self.max_records
164    }
165    /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
166    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.marker = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
171    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.marker = input;
173        self
174    }
175    /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
176    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
177        &self.marker
178    }
179    /// Consumes the builder and constructs a [`DescribeCertificatesInput`](crate::operation::describe_certificates::DescribeCertificatesInput).
180    pub fn build(
181        self,
182    ) -> ::std::result::Result<crate::operation::describe_certificates::DescribeCertificatesInput, ::aws_smithy_types::error::operation::BuildError>
183    {
184        ::std::result::Result::Ok(crate::operation::describe_certificates::DescribeCertificatesInput {
185            certificate_identifier: self.certificate_identifier,
186            filters: self.filters,
187            max_records: self.max_records,
188            marker: self.marker,
189        })
190    }
191}