aws_sdk_databasemigration/operation/describe_replications/
_describe_replications_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeReplicationsOutput {
7 pub marker: ::std::option::Option<::std::string::String>,
9 pub replications: ::std::option::Option<::std::vec::Vec<crate::types::Replication>>,
11 _request_id: Option<String>,
12}
13impl DescribeReplicationsOutput {
14 pub fn marker(&self) -> ::std::option::Option<&str> {
16 self.marker.as_deref()
17 }
18 pub fn replications(&self) -> &[crate::types::Replication] {
22 self.replications.as_deref().unwrap_or_default()
23 }
24}
25impl ::aws_types::request_id::RequestId for DescribeReplicationsOutput {
26 fn request_id(&self) -> Option<&str> {
27 self._request_id.as_deref()
28 }
29}
30impl DescribeReplicationsOutput {
31 pub fn builder() -> crate::operation::describe_replications::builders::DescribeReplicationsOutputBuilder {
33 crate::operation::describe_replications::builders::DescribeReplicationsOutputBuilder::default()
34 }
35}
36
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct DescribeReplicationsOutputBuilder {
41 pub(crate) marker: ::std::option::Option<::std::string::String>,
42 pub(crate) replications: ::std::option::Option<::std::vec::Vec<crate::types::Replication>>,
43 _request_id: Option<String>,
44}
45impl DescribeReplicationsOutputBuilder {
46 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.marker = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.marker = input;
54 self
55 }
56 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
58 &self.marker
59 }
60 pub fn replications(mut self, input: crate::types::Replication) -> Self {
66 let mut v = self.replications.unwrap_or_default();
67 v.push(input);
68 self.replications = ::std::option::Option::Some(v);
69 self
70 }
71 pub fn set_replications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Replication>>) -> Self {
73 self.replications = input;
74 self
75 }
76 pub fn get_replications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Replication>> {
78 &self.replications
79 }
80 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
81 self._request_id = Some(request_id.into());
82 self
83 }
84
85 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
86 self._request_id = request_id;
87 self
88 }
89 pub fn build(self) -> crate::operation::describe_replications::DescribeReplicationsOutput {
91 crate::operation::describe_replications::DescribeReplicationsOutput {
92 marker: self.marker,
93 replications: self.replications,
94 _request_id: self._request_id,
95 }
96 }
97}