aws_sdk_iotsitewise/operation/describe_dataset/
_describe_dataset_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeDatasetOutput {
6 pub dataset_id: ::std::string::String,
8 pub dataset_arn: ::std::string::String,
10 pub dataset_name: ::std::string::String,
12 pub dataset_description: ::std::string::String,
14 pub dataset_source: ::std::option::Option<crate::types::DatasetSource>,
16 pub dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
18 pub dataset_creation_date: ::aws_smithy_types::DateTime,
20 pub dataset_last_update_date: ::aws_smithy_types::DateTime,
22 pub dataset_version: ::std::option::Option<::std::string::String>,
24 _request_id: Option<String>,
25}
26impl DescribeDatasetOutput {
27 pub fn dataset_id(&self) -> &str {
29 use std::ops::Deref;
30 self.dataset_id.deref()
31 }
32 pub fn dataset_arn(&self) -> &str {
34 use std::ops::Deref;
35 self.dataset_arn.deref()
36 }
37 pub fn dataset_name(&self) -> &str {
39 use std::ops::Deref;
40 self.dataset_name.deref()
41 }
42 pub fn dataset_description(&self) -> &str {
44 use std::ops::Deref;
45 self.dataset_description.deref()
46 }
47 pub fn dataset_source(&self) -> ::std::option::Option<&crate::types::DatasetSource> {
49 self.dataset_source.as_ref()
50 }
51 pub fn dataset_status(&self) -> ::std::option::Option<&crate::types::DatasetStatus> {
53 self.dataset_status.as_ref()
54 }
55 pub fn dataset_creation_date(&self) -> &::aws_smithy_types::DateTime {
57 &self.dataset_creation_date
58 }
59 pub fn dataset_last_update_date(&self) -> &::aws_smithy_types::DateTime {
61 &self.dataset_last_update_date
62 }
63 pub fn dataset_version(&self) -> ::std::option::Option<&str> {
65 self.dataset_version.as_deref()
66 }
67}
68impl ::aws_types::request_id::RequestId for DescribeDatasetOutput {
69 fn request_id(&self) -> Option<&str> {
70 self._request_id.as_deref()
71 }
72}
73impl DescribeDatasetOutput {
74 pub fn builder() -> crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder {
76 crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::default()
77 }
78}
79
80#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct DescribeDatasetOutputBuilder {
84 pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
85 pub(crate) dataset_arn: ::std::option::Option<::std::string::String>,
86 pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
87 pub(crate) dataset_description: ::std::option::Option<::std::string::String>,
88 pub(crate) dataset_source: ::std::option::Option<crate::types::DatasetSource>,
89 pub(crate) dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
90 pub(crate) dataset_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
91 pub(crate) dataset_last_update_date: ::std::option::Option<::aws_smithy_types::DateTime>,
92 pub(crate) dataset_version: ::std::option::Option<::std::string::String>,
93 _request_id: Option<String>,
94}
95impl DescribeDatasetOutputBuilder {
96 pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.dataset_id = ::std::option::Option::Some(input.into());
100 self
101 }
102 pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.dataset_id = input;
105 self
106 }
107 pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
109 &self.dataset_id
110 }
111 pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.dataset_arn = ::std::option::Option::Some(input.into());
115 self
116 }
117 pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.dataset_arn = input;
120 self
121 }
122 pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> {
124 &self.dataset_arn
125 }
126 pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.dataset_name = ::std::option::Option::Some(input.into());
130 self
131 }
132 pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.dataset_name = input;
135 self
136 }
137 pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
139 &self.dataset_name
140 }
141 pub fn dataset_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.dataset_description = ::std::option::Option::Some(input.into());
145 self
146 }
147 pub fn set_dataset_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.dataset_description = input;
150 self
151 }
152 pub fn get_dataset_description(&self) -> &::std::option::Option<::std::string::String> {
154 &self.dataset_description
155 }
156 pub fn dataset_source(mut self, input: crate::types::DatasetSource) -> Self {
159 self.dataset_source = ::std::option::Option::Some(input);
160 self
161 }
162 pub fn set_dataset_source(mut self, input: ::std::option::Option<crate::types::DatasetSource>) -> Self {
164 self.dataset_source = input;
165 self
166 }
167 pub fn get_dataset_source(&self) -> &::std::option::Option<crate::types::DatasetSource> {
169 &self.dataset_source
170 }
171 pub fn dataset_status(mut self, input: crate::types::DatasetStatus) -> Self {
174 self.dataset_status = ::std::option::Option::Some(input);
175 self
176 }
177 pub fn set_dataset_status(mut self, input: ::std::option::Option<crate::types::DatasetStatus>) -> Self {
179 self.dataset_status = input;
180 self
181 }
182 pub fn get_dataset_status(&self) -> &::std::option::Option<crate::types::DatasetStatus> {
184 &self.dataset_status
185 }
186 pub fn dataset_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
189 self.dataset_creation_date = ::std::option::Option::Some(input);
190 self
191 }
192 pub fn set_dataset_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
194 self.dataset_creation_date = input;
195 self
196 }
197 pub fn get_dataset_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
199 &self.dataset_creation_date
200 }
201 pub fn dataset_last_update_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
204 self.dataset_last_update_date = ::std::option::Option::Some(input);
205 self
206 }
207 pub fn set_dataset_last_update_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
209 self.dataset_last_update_date = input;
210 self
211 }
212 pub fn get_dataset_last_update_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
214 &self.dataset_last_update_date
215 }
216 pub fn dataset_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218 self.dataset_version = ::std::option::Option::Some(input.into());
219 self
220 }
221 pub fn set_dataset_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.dataset_version = input;
224 self
225 }
226 pub fn get_dataset_version(&self) -> &::std::option::Option<::std::string::String> {
228 &self.dataset_version
229 }
230 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
231 self._request_id = Some(request_id.into());
232 self
233 }
234
235 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
236 self._request_id = request_id;
237 self
238 }
239 pub fn build(
248 self,
249 ) -> ::std::result::Result<crate::operation::describe_dataset::DescribeDatasetOutput, ::aws_smithy_types::error::operation::BuildError> {
250 ::std::result::Result::Ok(crate::operation::describe_dataset::DescribeDatasetOutput {
251 dataset_id: self.dataset_id.ok_or_else(|| {
252 ::aws_smithy_types::error::operation::BuildError::missing_field(
253 "dataset_id",
254 "dataset_id was not specified but it is required when building DescribeDatasetOutput",
255 )
256 })?,
257 dataset_arn: self.dataset_arn.ok_or_else(|| {
258 ::aws_smithy_types::error::operation::BuildError::missing_field(
259 "dataset_arn",
260 "dataset_arn was not specified but it is required when building DescribeDatasetOutput",
261 )
262 })?,
263 dataset_name: self.dataset_name.ok_or_else(|| {
264 ::aws_smithy_types::error::operation::BuildError::missing_field(
265 "dataset_name",
266 "dataset_name was not specified but it is required when building DescribeDatasetOutput",
267 )
268 })?,
269 dataset_description: self.dataset_description.ok_or_else(|| {
270 ::aws_smithy_types::error::operation::BuildError::missing_field(
271 "dataset_description",
272 "dataset_description was not specified but it is required when building DescribeDatasetOutput",
273 )
274 })?,
275 dataset_source: self.dataset_source,
276 dataset_status: self.dataset_status,
277 dataset_creation_date: self.dataset_creation_date.ok_or_else(|| {
278 ::aws_smithy_types::error::operation::BuildError::missing_field(
279 "dataset_creation_date",
280 "dataset_creation_date was not specified but it is required when building DescribeDatasetOutput",
281 )
282 })?,
283 dataset_last_update_date: self.dataset_last_update_date.ok_or_else(|| {
284 ::aws_smithy_types::error::operation::BuildError::missing_field(
285 "dataset_last_update_date",
286 "dataset_last_update_date was not specified but it is required when building DescribeDatasetOutput",
287 )
288 })?,
289 dataset_version: self.dataset_version,
290 _request_id: self._request_id,
291 })
292 }
293}