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