aws_sdk_databasemigration/operation/describe_endpoints/
_describe_endpoints_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeEndpointsInput {
7    /// <p>Filters applied to the endpoints.</p>
8    /// <p>Valid filter names: endpoint-arn | endpoint-type | endpoint-id | engine-name</p>
9    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
10    /// <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>
11    /// <p>Default: 100</p>
12    /// <p>Constraints: Minimum 20, maximum 100.</p>
13    pub max_records: ::std::option::Option<i32>,
14    /// <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>
15    pub marker: ::std::option::Option<::std::string::String>,
16}
17impl DescribeEndpointsInput {
18    /// <p>Filters applied to the endpoints.</p>
19    /// <p>Valid filter names: endpoint-arn | endpoint-type | endpoint-id | engine-name</p>
20    ///
21    /// 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()`.
22    pub fn filters(&self) -> &[crate::types::Filter] {
23        self.filters.as_deref().unwrap_or_default()
24    }
25    /// <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>
26    /// <p>Default: 100</p>
27    /// <p>Constraints: Minimum 20, maximum 100.</p>
28    pub fn max_records(&self) -> ::std::option::Option<i32> {
29        self.max_records
30    }
31    /// <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>
32    pub fn marker(&self) -> ::std::option::Option<&str> {
33        self.marker.as_deref()
34    }
35}
36impl DescribeEndpointsInput {
37    /// Creates a new builder-style object to manufacture [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
38    pub fn builder() -> crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder {
39        crate::operation::describe_endpoints::builders::DescribeEndpointsInputBuilder::default()
40    }
41}
42
43/// A builder for [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct DescribeEndpointsInputBuilder {
47    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
48    pub(crate) max_records: ::std::option::Option<i32>,
49    pub(crate) marker: ::std::option::Option<::std::string::String>,
50}
51impl DescribeEndpointsInputBuilder {
52    /// Appends an item to `filters`.
53    ///
54    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
55    ///
56    /// <p>Filters applied to the endpoints.</p>
57    /// <p>Valid filter names: endpoint-arn | endpoint-type | endpoint-id | engine-name</p>
58    pub fn filters(mut self, input: crate::types::Filter) -> Self {
59        let mut v = self.filters.unwrap_or_default();
60        v.push(input);
61        self.filters = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>Filters applied to the endpoints.</p>
65    /// <p>Valid filter names: endpoint-arn | endpoint-type | endpoint-id | engine-name</p>
66    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
67        self.filters = input;
68        self
69    }
70    /// <p>Filters applied to the endpoints.</p>
71    /// <p>Valid filter names: endpoint-arn | endpoint-type | endpoint-id | engine-name</p>
72    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
73        &self.filters
74    }
75    /// <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>
76    /// <p>Default: 100</p>
77    /// <p>Constraints: Minimum 20, maximum 100.</p>
78    pub fn max_records(mut self, input: i32) -> Self {
79        self.max_records = ::std::option::Option::Some(input);
80        self
81    }
82    /// <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>
83    /// <p>Default: 100</p>
84    /// <p>Constraints: Minimum 20, maximum 100.</p>
85    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
86        self.max_records = input;
87        self
88    }
89    /// <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>
90    /// <p>Default: 100</p>
91    /// <p>Constraints: Minimum 20, maximum 100.</p>
92    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
93        &self.max_records
94    }
95    /// <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>
96    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.marker = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <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>
101    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.marker = input;
103        self
104    }
105    /// <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>
106    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
107        &self.marker
108    }
109    /// Consumes the builder and constructs a [`DescribeEndpointsInput`](crate::operation::describe_endpoints::DescribeEndpointsInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::describe_endpoints::DescribeEndpointsInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::describe_endpoints::DescribeEndpointsInput {
114            filters: self.filters,
115            max_records: self.max_records,
116            marker: self.marker,
117        })
118    }
119}