aws_sdk_pipes/operation/create_pipe/
_create_pipe_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 CreatePipeOutput {
6    /// <p>The ARN of the pipe.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the pipe.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The state the pipe should be in.</p>
11    pub desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
12    /// <p>The state the pipe is in.</p>
13    pub current_state: ::std::option::Option<crate::types::PipeState>,
14    /// <p>The time the pipe was created.</p>
15    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>When the pipe was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
17    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18    _request_id: Option<String>,
19}
20impl CreatePipeOutput {
21    /// <p>The ARN of the pipe.</p>
22    pub fn arn(&self) -> ::std::option::Option<&str> {
23        self.arn.as_deref()
24    }
25    /// <p>The name of the pipe.</p>
26    pub fn name(&self) -> ::std::option::Option<&str> {
27        self.name.as_deref()
28    }
29    /// <p>The state the pipe should be in.</p>
30    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::RequestedPipeState> {
31        self.desired_state.as_ref()
32    }
33    /// <p>The state the pipe is in.</p>
34    pub fn current_state(&self) -> ::std::option::Option<&crate::types::PipeState> {
35        self.current_state.as_ref()
36    }
37    /// <p>The time the pipe was created.</p>
38    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.creation_time.as_ref()
40    }
41    /// <p>When the pipe was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
42    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.last_modified_time.as_ref()
44    }
45}
46impl ::aws_types::request_id::RequestId for CreatePipeOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl CreatePipeOutput {
52    /// Creates a new builder-style object to manufacture [`CreatePipeOutput`](crate::operation::create_pipe::CreatePipeOutput).
53    pub fn builder() -> crate::operation::create_pipe::builders::CreatePipeOutputBuilder {
54        crate::operation::create_pipe::builders::CreatePipeOutputBuilder::default()
55    }
56}
57
58/// A builder for [`CreatePipeOutput`](crate::operation::create_pipe::CreatePipeOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreatePipeOutputBuilder {
62    pub(crate) arn: ::std::option::Option<::std::string::String>,
63    pub(crate) name: ::std::option::Option<::std::string::String>,
64    pub(crate) desired_state: ::std::option::Option<crate::types::RequestedPipeState>,
65    pub(crate) current_state: ::std::option::Option<crate::types::PipeState>,
66    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
67    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
68    _request_id: Option<String>,
69}
70impl CreatePipeOutputBuilder {
71    /// <p>The ARN of the pipe.</p>
72    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The ARN of the pipe.</p>
77    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.arn = input;
79        self
80    }
81    /// <p>The ARN of the pipe.</p>
82    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.arn
84    }
85    /// <p>The name of the pipe.</p>
86    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.name = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The name of the pipe.</p>
91    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.name = input;
93        self
94    }
95    /// <p>The name of the pipe.</p>
96    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
97        &self.name
98    }
99    /// <p>The state the pipe should be in.</p>
100    pub fn desired_state(mut self, input: crate::types::RequestedPipeState) -> Self {
101        self.desired_state = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The state the pipe should be in.</p>
105    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::RequestedPipeState>) -> Self {
106        self.desired_state = input;
107        self
108    }
109    /// <p>The state the pipe should be in.</p>
110    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::RequestedPipeState> {
111        &self.desired_state
112    }
113    /// <p>The state the pipe is in.</p>
114    pub fn current_state(mut self, input: crate::types::PipeState) -> Self {
115        self.current_state = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The state the pipe is in.</p>
119    pub fn set_current_state(mut self, input: ::std::option::Option<crate::types::PipeState>) -> Self {
120        self.current_state = input;
121        self
122    }
123    /// <p>The state the pipe is in.</p>
124    pub fn get_current_state(&self) -> &::std::option::Option<crate::types::PipeState> {
125        &self.current_state
126    }
127    /// <p>The time the pipe was created.</p>
128    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
129        self.creation_time = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>The time the pipe was created.</p>
133    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
134        self.creation_time = input;
135        self
136    }
137    /// <p>The time the pipe was created.</p>
138    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
139        &self.creation_time
140    }
141    /// <p>When the pipe was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
142    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
143        self.last_modified_time = ::std::option::Option::Some(input);
144        self
145    }
146    /// <p>When the pipe was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
147    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
148        self.last_modified_time = input;
149        self
150    }
151    /// <p>When the pipe was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
152    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
153        &self.last_modified_time
154    }
155    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156        self._request_id = Some(request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161        self._request_id = request_id;
162        self
163    }
164    /// Consumes the builder and constructs a [`CreatePipeOutput`](crate::operation::create_pipe::CreatePipeOutput).
165    pub fn build(self) -> crate::operation::create_pipe::CreatePipeOutput {
166        crate::operation::create_pipe::CreatePipeOutput {
167            arn: self.arn,
168            name: self.name,
169            desired_state: self.desired_state,
170            current_state: self.current_state,
171            creation_time: self.creation_time,
172            last_modified_time: self.last_modified_time,
173            _request_id: self._request_id,
174        }
175    }
176}