aws_sdk_iotsitewise/operation/describe_dataset/
_describe_dataset_output.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDatasetOutput {
    /// <p>The ID of the dataset.</p>
    pub dataset_id: ::std::string::String,
    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
    pub dataset_arn: ::std::string::String,
    /// <p>The name of the dataset.</p>
    pub dataset_name: ::std::string::String,
    /// <p>A description about the dataset, and its functionality.</p>
    pub dataset_description: ::std::string::String,
    /// <p>The data source for the dataset.</p>
    pub dataset_source: ::std::option::Option<crate::types::DatasetSource>,
    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>CREATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
    pub dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
    /// <p>The dataset creation date, in Unix epoch time.</p>
    pub dataset_creation_date: ::aws_smithy_types::DateTime,
    /// <p>The date the dataset was last updated, in Unix epoch time.</p>
    pub dataset_last_update_date: ::aws_smithy_types::DateTime,
    /// <p>The version of the dataset.</p>
    pub dataset_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDatasetOutput {
    /// <p>The ID of the dataset.</p>
    pub fn dataset_id(&self) -> &str {
        use std::ops::Deref;
        self.dataset_id.deref()
    }
    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
    pub fn dataset_arn(&self) -> &str {
        use std::ops::Deref;
        self.dataset_arn.deref()
    }
    /// <p>The name of the dataset.</p>
    pub fn dataset_name(&self) -> &str {
        use std::ops::Deref;
        self.dataset_name.deref()
    }
    /// <p>A description about the dataset, and its functionality.</p>
    pub fn dataset_description(&self) -> &str {
        use std::ops::Deref;
        self.dataset_description.deref()
    }
    /// <p>The data source for the dataset.</p>
    pub fn dataset_source(&self) -> ::std::option::Option<&crate::types::DatasetSource> {
        self.dataset_source.as_ref()
    }
    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>CREATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
    pub fn dataset_status(&self) -> ::std::option::Option<&crate::types::DatasetStatus> {
        self.dataset_status.as_ref()
    }
    /// <p>The dataset creation date, in Unix epoch time.</p>
    pub fn dataset_creation_date(&self) -> &::aws_smithy_types::DateTime {
        &self.dataset_creation_date
    }
    /// <p>The date the dataset was last updated, in Unix epoch time.</p>
    pub fn dataset_last_update_date(&self) -> &::aws_smithy_types::DateTime {
        &self.dataset_last_update_date
    }
    /// <p>The version of the dataset.</p>
    pub fn dataset_version(&self) -> ::std::option::Option<&str> {
        self.dataset_version.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeDatasetOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDatasetOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDatasetOutput`](crate::operation::describe_dataset::DescribeDatasetOutput).
    pub fn builder() -> crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder {
        crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::default()
    }
}

/// A builder for [`DescribeDatasetOutput`](crate::operation::describe_dataset::DescribeDatasetOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDatasetOutputBuilder {
    pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
    pub(crate) dataset_arn: ::std::option::Option<::std::string::String>,
    pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
    pub(crate) dataset_description: ::std::option::Option<::std::string::String>,
    pub(crate) dataset_source: ::std::option::Option<crate::types::DatasetSource>,
    pub(crate) dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
    pub(crate) dataset_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) dataset_last_update_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) dataset_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDatasetOutputBuilder {
    /// <p>The ID of the dataset.</p>
    /// This field is required.
    pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the dataset.</p>
    pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_id = input;
        self
    }
    /// <p>The ID of the dataset.</p>
    pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_id
    }
    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
    /// This field is required.
    pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
    pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_arn = input;
        self
    }
    /// <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">ARN</a> of the dataset. The format is <code>arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}</code>.</p>
    pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_arn
    }
    /// <p>The name of the dataset.</p>
    /// This field is required.
    pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the dataset.</p>
    pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_name = input;
        self
    }
    /// <p>The name of the dataset.</p>
    pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_name
    }
    /// <p>A description about the dataset, and its functionality.</p>
    /// This field is required.
    pub fn dataset_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description about the dataset, and its functionality.</p>
    pub fn set_dataset_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_description = input;
        self
    }
    /// <p>A description about the dataset, and its functionality.</p>
    pub fn get_dataset_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_description
    }
    /// <p>The data source for the dataset.</p>
    /// This field is required.
    pub fn dataset_source(mut self, input: crate::types::DatasetSource) -> Self {
        self.dataset_source = ::std::option::Option::Some(input);
        self
    }
    /// <p>The data source for the dataset.</p>
    pub fn set_dataset_source(mut self, input: ::std::option::Option<crate::types::DatasetSource>) -> Self {
        self.dataset_source = input;
        self
    }
    /// <p>The data source for the dataset.</p>
    pub fn get_dataset_source(&self) -> &::std::option::Option<crate::types::DatasetSource> {
        &self.dataset_source
    }
    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>CREATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
    /// This field is required.
    pub fn dataset_status(mut self, input: crate::types::DatasetStatus) -> Self {
        self.dataset_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>CREATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
    pub fn set_dataset_status(mut self, input: ::std::option::Option<crate::types::DatasetStatus>) -> Self {
        self.dataset_status = input;
        self
    }
    /// <p>The status of the dataset. This contains the state and any error messages. State is <code>CREATING</code> after a successfull call to this API, and any associated error message. The state is <code>ACTIVE</code> when ready to use.</p>
    pub fn get_dataset_status(&self) -> &::std::option::Option<crate::types::DatasetStatus> {
        &self.dataset_status
    }
    /// <p>The dataset creation date, in Unix epoch time.</p>
    /// This field is required.
    pub fn dataset_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.dataset_creation_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The dataset creation date, in Unix epoch time.</p>
    pub fn set_dataset_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.dataset_creation_date = input;
        self
    }
    /// <p>The dataset creation date, in Unix epoch time.</p>
    pub fn get_dataset_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.dataset_creation_date
    }
    /// <p>The date the dataset was last updated, in Unix epoch time.</p>
    /// This field is required.
    pub fn dataset_last_update_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.dataset_last_update_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date the dataset was last updated, in Unix epoch time.</p>
    pub fn set_dataset_last_update_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.dataset_last_update_date = input;
        self
    }
    /// <p>The date the dataset was last updated, in Unix epoch time.</p>
    pub fn get_dataset_last_update_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.dataset_last_update_date
    }
    /// <p>The version of the dataset.</p>
    pub fn dataset_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the dataset.</p>
    pub fn set_dataset_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_version = input;
        self
    }
    /// <p>The version of the dataset.</p>
    pub fn get_dataset_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_version
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeDatasetOutput`](crate::operation::describe_dataset::DescribeDatasetOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`dataset_id`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::dataset_id)
    /// - [`dataset_arn`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::dataset_arn)
    /// - [`dataset_name`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::dataset_name)
    /// - [`dataset_description`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::dataset_description)
    /// - [`dataset_creation_date`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::dataset_creation_date)
    /// - [`dataset_last_update_date`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::dataset_last_update_date)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_dataset::DescribeDatasetOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_dataset::DescribeDatasetOutput {
            dataset_id: self.dataset_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dataset_id",
                    "dataset_id was not specified but it is required when building DescribeDatasetOutput",
                )
            })?,
            dataset_arn: self.dataset_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dataset_arn",
                    "dataset_arn was not specified but it is required when building DescribeDatasetOutput",
                )
            })?,
            dataset_name: self.dataset_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dataset_name",
                    "dataset_name was not specified but it is required when building DescribeDatasetOutput",
                )
            })?,
            dataset_description: self.dataset_description.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dataset_description",
                    "dataset_description was not specified but it is required when building DescribeDatasetOutput",
                )
            })?,
            dataset_source: self.dataset_source,
            dataset_status: self.dataset_status,
            dataset_creation_date: self.dataset_creation_date.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dataset_creation_date",
                    "dataset_creation_date was not specified but it is required when building DescribeDatasetOutput",
                )
            })?,
            dataset_last_update_date: self.dataset_last_update_date.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "dataset_last_update_date",
                    "dataset_last_update_date was not specified but it is required when building DescribeDatasetOutput",
                )
            })?,
            dataset_version: self.dataset_version,
            _request_id: self._request_id,
        })
    }
}