aws_sdk_drs/operation/stop_replication/
_stop_replication_output.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 StopReplicationOutput {
6    /// <p>The Source Server that this action was targeted on.</p>
7    pub source_server: ::std::option::Option<crate::types::SourceServer>,
8    _request_id: Option<String>,
9}
10impl StopReplicationOutput {
11    /// <p>The Source Server that this action was targeted on.</p>
12    pub fn source_server(&self) -> ::std::option::Option<&crate::types::SourceServer> {
13        self.source_server.as_ref()
14    }
15}
16impl ::aws_types::request_id::RequestId for StopReplicationOutput {
17    fn request_id(&self) -> Option<&str> {
18        self._request_id.as_deref()
19    }
20}
21impl StopReplicationOutput {
22    /// Creates a new builder-style object to manufacture [`StopReplicationOutput`](crate::operation::stop_replication::StopReplicationOutput).
23    pub fn builder() -> crate::operation::stop_replication::builders::StopReplicationOutputBuilder {
24        crate::operation::stop_replication::builders::StopReplicationOutputBuilder::default()
25    }
26}
27
28/// A builder for [`StopReplicationOutput`](crate::operation::stop_replication::StopReplicationOutput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct StopReplicationOutputBuilder {
32    pub(crate) source_server: ::std::option::Option<crate::types::SourceServer>,
33    _request_id: Option<String>,
34}
35impl StopReplicationOutputBuilder {
36    /// <p>The Source Server that this action was targeted on.</p>
37    pub fn source_server(mut self, input: crate::types::SourceServer) -> Self {
38        self.source_server = ::std::option::Option::Some(input);
39        self
40    }
41    /// <p>The Source Server that this action was targeted on.</p>
42    pub fn set_source_server(mut self, input: ::std::option::Option<crate::types::SourceServer>) -> Self {
43        self.source_server = input;
44        self
45    }
46    /// <p>The Source Server that this action was targeted on.</p>
47    pub fn get_source_server(&self) -> &::std::option::Option<crate::types::SourceServer> {
48        &self.source_server
49    }
50    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
51        self._request_id = Some(request_id.into());
52        self
53    }
54
55    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
56        self._request_id = request_id;
57        self
58    }
59    /// Consumes the builder and constructs a [`StopReplicationOutput`](crate::operation::stop_replication::StopReplicationOutput).
60    pub fn build(self) -> crate::operation::stop_replication::StopReplicationOutput {
61        crate::operation::stop_replication::StopReplicationOutput {
62            source_server: self.source_server,
63            _request_id: self._request_id,
64        }
65    }
66}