aws_sdk_dsql/operation/delete_stream/
_delete_stream_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteStreamOutput {
7 pub cluster_identifier: ::std::string::String,
9 pub stream_identifier: ::std::string::String,
11 pub arn: ::std::string::String,
13 pub status: crate::types::StreamStatus,
15 pub creation_time: ::aws_smithy_types::DateTime,
17 _request_id: Option<String>,
18}
19impl DeleteStreamOutput {
20 pub fn cluster_identifier(&self) -> &str {
22 use std::ops::Deref;
23 self.cluster_identifier.deref()
24 }
25 pub fn stream_identifier(&self) -> &str {
27 use std::ops::Deref;
28 self.stream_identifier.deref()
29 }
30 pub fn arn(&self) -> &str {
32 use std::ops::Deref;
33 self.arn.deref()
34 }
35 pub fn status(&self) -> &crate::types::StreamStatus {
37 &self.status
38 }
39 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
41 &self.creation_time
42 }
43}
44impl ::aws_types::request_id::RequestId for DeleteStreamOutput {
45 fn request_id(&self) -> Option<&str> {
46 self._request_id.as_deref()
47 }
48}
49impl DeleteStreamOutput {
50 pub fn builder() -> crate::operation::delete_stream::builders::DeleteStreamOutputBuilder {
52 crate::operation::delete_stream::builders::DeleteStreamOutputBuilder::default()
53 }
54}
55
56#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct DeleteStreamOutputBuilder {
60 pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
61 pub(crate) stream_identifier: ::std::option::Option<::std::string::String>,
62 pub(crate) arn: ::std::option::Option<::std::string::String>,
63 pub(crate) status: ::std::option::Option<crate::types::StreamStatus>,
64 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
65 _request_id: Option<String>,
66}
67impl DeleteStreamOutputBuilder {
68 pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.cluster_identifier = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.cluster_identifier = input;
77 self
78 }
79 pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
81 &self.cluster_identifier
82 }
83 pub fn stream_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.stream_identifier = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_stream_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.stream_identifier = input;
92 self
93 }
94 pub fn get_stream_identifier(&self) -> &::std::option::Option<::std::string::String> {
96 &self.stream_identifier
97 }
98 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.arn = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.arn = input;
107 self
108 }
109 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
111 &self.arn
112 }
113 pub fn status(mut self, input: crate::types::StreamStatus) -> Self {
116 self.status = ::std::option::Option::Some(input);
117 self
118 }
119 pub fn set_status(mut self, input: ::std::option::Option<crate::types::StreamStatus>) -> Self {
121 self.status = input;
122 self
123 }
124 pub fn get_status(&self) -> &::std::option::Option<crate::types::StreamStatus> {
126 &self.status
127 }
128 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
131 self.creation_time = ::std::option::Option::Some(input);
132 self
133 }
134 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
136 self.creation_time = input;
137 self
138 }
139 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
141 &self.creation_time
142 }
143 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
144 self._request_id = Some(request_id.into());
145 self
146 }
147
148 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
149 self._request_id = request_id;
150 self
151 }
152 pub fn build(
160 self,
161 ) -> ::std::result::Result<crate::operation::delete_stream::DeleteStreamOutput, ::aws_smithy_types::error::operation::BuildError> {
162 ::std::result::Result::Ok(crate::operation::delete_stream::DeleteStreamOutput {
163 cluster_identifier: self.cluster_identifier.ok_or_else(|| {
164 ::aws_smithy_types::error::operation::BuildError::missing_field(
165 "cluster_identifier",
166 "cluster_identifier was not specified but it is required when building DeleteStreamOutput",
167 )
168 })?,
169 stream_identifier: self.stream_identifier.ok_or_else(|| {
170 ::aws_smithy_types::error::operation::BuildError::missing_field(
171 "stream_identifier",
172 "stream_identifier was not specified but it is required when building DeleteStreamOutput",
173 )
174 })?,
175 arn: self.arn.ok_or_else(|| {
176 ::aws_smithy_types::error::operation::BuildError::missing_field(
177 "arn",
178 "arn was not specified but it is required when building DeleteStreamOutput",
179 )
180 })?,
181 status: self.status.ok_or_else(|| {
182 ::aws_smithy_types::error::operation::BuildError::missing_field(
183 "status",
184 "status was not specified but it is required when building DeleteStreamOutput",
185 )
186 })?,
187 creation_time: self.creation_time.ok_or_else(|| {
188 ::aws_smithy_types::error::operation::BuildError::missing_field(
189 "creation_time",
190 "creation_time was not specified but it is required when building DeleteStreamOutput",
191 )
192 })?,
193 _request_id: self._request_id,
194 })
195 }
196}