aws_sdk_databasemigration/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>Filters applied to the certificates described in the form of key-value pairs. Valid values are <code>certificate-arn</code> and <code>certificate-id</code>.</p>
7 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
8 /// <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>
9 /// <p>Default: 10</p>
10 pub max_records: ::std::option::Option<i32>,
11 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
12 pub marker: ::std::option::Option<::std::string::String>,
13}
14impl DescribeCertificatesInput {
15 /// <p>Filters applied to the certificates described in the form of key-value pairs. Valid values are <code>certificate-arn</code> and <code>certificate-id</code>.</p>
16 ///
17 /// 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()`.
18 pub fn filters(&self) -> &[crate::types::Filter] {
19 self.filters.as_deref().unwrap_or_default()
20 }
21 /// <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>
22 /// <p>Default: 10</p>
23 pub fn max_records(&self) -> ::std::option::Option<i32> {
24 self.max_records
25 }
26 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
27 pub fn marker(&self) -> ::std::option::Option<&str> {
28 self.marker.as_deref()
29 }
30}
31impl DescribeCertificatesInput {
32 /// Creates a new builder-style object to manufacture [`DescribeCertificatesInput`](crate::operation::describe_certificates::DescribeCertificatesInput).
33 pub fn builder() -> crate::operation::describe_certificates::builders::DescribeCertificatesInputBuilder {
34 crate::operation::describe_certificates::builders::DescribeCertificatesInputBuilder::default()
35 }
36}
37
38/// A builder for [`DescribeCertificatesInput`](crate::operation::describe_certificates::DescribeCertificatesInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DescribeCertificatesInputBuilder {
42 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
43 pub(crate) max_records: ::std::option::Option<i32>,
44 pub(crate) marker: ::std::option::Option<::std::string::String>,
45}
46impl DescribeCertificatesInputBuilder {
47 /// Appends an item to `filters`.
48 ///
49 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
50 ///
51 /// <p>Filters applied to the certificates described in the form of key-value pairs. Valid values are <code>certificate-arn</code> and <code>certificate-id</code>.</p>
52 pub fn filters(mut self, input: crate::types::Filter) -> Self {
53 let mut v = self.filters.unwrap_or_default();
54 v.push(input);
55 self.filters = ::std::option::Option::Some(v);
56 self
57 }
58 /// <p>Filters applied to the certificates described in the form of key-value pairs. Valid values are <code>certificate-arn</code> and <code>certificate-id</code>.</p>
59 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
60 self.filters = input;
61 self
62 }
63 /// <p>Filters applied to the certificates described in the form of key-value pairs. Valid values are <code>certificate-arn</code> and <code>certificate-id</code>.</p>
64 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
65 &self.filters
66 }
67 /// <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>
68 /// <p>Default: 10</p>
69 pub fn max_records(mut self, input: i32) -> Self {
70 self.max_records = ::std::option::Option::Some(input);
71 self
72 }
73 /// <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>
74 /// <p>Default: 10</p>
75 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
76 self.max_records = input;
77 self
78 }
79 /// <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>
80 /// <p>Default: 10</p>
81 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
82 &self.max_records
83 }
84 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
85 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.marker = ::std::option::Option::Some(input.into());
87 self
88 }
89 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
90 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.marker = input;
92 self
93 }
94 /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
95 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
96 &self.marker
97 }
98 /// Consumes the builder and constructs a [`DescribeCertificatesInput`](crate::operation::describe_certificates::DescribeCertificatesInput).
99 pub fn build(
100 self,
101 ) -> ::std::result::Result<crate::operation::describe_certificates::DescribeCertificatesInput, ::aws_smithy_types::error::operation::BuildError>
102 {
103 ::std::result::Result::Ok(crate::operation::describe_certificates::DescribeCertificatesInput {
104 filters: self.filters,
105 max_records: self.max_records,
106 marker: self.marker,
107 })
108 }
109}