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