aws_sdk_databrew/operation/describe_dataset/
_describe_dataset_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 DescribeDatasetOutput {
6    /// <p>The identifier (user name) of the user who created the dataset.</p>
7    pub created_by: ::std::option::Option<::std::string::String>,
8    /// <p>The date and time that the dataset was created.</p>
9    pub create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>The name of the dataset.</p>
11    pub name: ::std::string::String,
12    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
13    pub format: ::std::option::Option<crate::types::InputFormat>,
14    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
15    pub format_options: ::std::option::Option<crate::types::FormatOptions>,
16    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
17    pub input: ::std::option::Option<crate::types::Input>,
18    /// <p>The date and time that the dataset was last modified.</p>
19    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The identifier (user name) of the user who last modified the dataset.</p>
21    pub last_modified_by: ::std::option::Option<::std::string::String>,
22    /// <p>The location of the data for this dataset, Amazon S3 or the Glue Data Catalog.</p>
23    pub source: ::std::option::Option<crate::types::Source>,
24    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
25    pub path_options: ::std::option::Option<crate::types::PathOptions>,
26    /// <p>Metadata tags associated with this dataset.</p>
27    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28    /// <p>The Amazon Resource Name (ARN) of the dataset.</p>
29    pub resource_arn: ::std::option::Option<::std::string::String>,
30    _request_id: Option<String>,
31}
32impl DescribeDatasetOutput {
33    /// <p>The identifier (user name) of the user who created the dataset.</p>
34    pub fn created_by(&self) -> ::std::option::Option<&str> {
35        self.created_by.as_deref()
36    }
37    /// <p>The date and time that the dataset was created.</p>
38    pub fn create_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.create_date.as_ref()
40    }
41    /// <p>The name of the dataset.</p>
42    pub fn name(&self) -> &str {
43        use std::ops::Deref;
44        self.name.deref()
45    }
46    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
47    pub fn format(&self) -> ::std::option::Option<&crate::types::InputFormat> {
48        self.format.as_ref()
49    }
50    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
51    pub fn format_options(&self) -> ::std::option::Option<&crate::types::FormatOptions> {
52        self.format_options.as_ref()
53    }
54    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
55    pub fn input(&self) -> ::std::option::Option<&crate::types::Input> {
56        self.input.as_ref()
57    }
58    /// <p>The date and time that the dataset was last modified.</p>
59    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
60        self.last_modified_date.as_ref()
61    }
62    /// <p>The identifier (user name) of the user who last modified the dataset.</p>
63    pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
64        self.last_modified_by.as_deref()
65    }
66    /// <p>The location of the data for this dataset, Amazon S3 or the Glue Data Catalog.</p>
67    pub fn source(&self) -> ::std::option::Option<&crate::types::Source> {
68        self.source.as_ref()
69    }
70    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
71    pub fn path_options(&self) -> ::std::option::Option<&crate::types::PathOptions> {
72        self.path_options.as_ref()
73    }
74    /// <p>Metadata tags associated with this dataset.</p>
75    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
76        self.tags.as_ref()
77    }
78    /// <p>The Amazon Resource Name (ARN) of the dataset.</p>
79    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
80        self.resource_arn.as_deref()
81    }
82}
83impl ::aws_types::request_id::RequestId for DescribeDatasetOutput {
84    fn request_id(&self) -> Option<&str> {
85        self._request_id.as_deref()
86    }
87}
88impl DescribeDatasetOutput {
89    /// Creates a new builder-style object to manufacture [`DescribeDatasetOutput`](crate::operation::describe_dataset::DescribeDatasetOutput).
90    pub fn builder() -> crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder {
91        crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::default()
92    }
93}
94
95/// A builder for [`DescribeDatasetOutput`](crate::operation::describe_dataset::DescribeDatasetOutput).
96#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
97#[non_exhaustive]
98pub struct DescribeDatasetOutputBuilder {
99    pub(crate) created_by: ::std::option::Option<::std::string::String>,
100    pub(crate) create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
101    pub(crate) name: ::std::option::Option<::std::string::String>,
102    pub(crate) format: ::std::option::Option<crate::types::InputFormat>,
103    pub(crate) format_options: ::std::option::Option<crate::types::FormatOptions>,
104    pub(crate) input: ::std::option::Option<crate::types::Input>,
105    pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
106    pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
107    pub(crate) source: ::std::option::Option<crate::types::Source>,
108    pub(crate) path_options: ::std::option::Option<crate::types::PathOptions>,
109    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
110    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
111    _request_id: Option<String>,
112}
113impl DescribeDatasetOutputBuilder {
114    /// <p>The identifier (user name) of the user who created the dataset.</p>
115    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.created_by = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The identifier (user name) of the user who created the dataset.</p>
120    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.created_by = input;
122        self
123    }
124    /// <p>The identifier (user name) of the user who created the dataset.</p>
125    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
126        &self.created_by
127    }
128    /// <p>The date and time that the dataset was created.</p>
129    pub fn create_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
130        self.create_date = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The date and time that the dataset was created.</p>
134    pub fn set_create_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
135        self.create_date = input;
136        self
137    }
138    /// <p>The date and time that the dataset was created.</p>
139    pub fn get_create_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
140        &self.create_date
141    }
142    /// <p>The name of the dataset.</p>
143    /// This field is required.
144    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.name = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The name of the dataset.</p>
149    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.name = input;
151        self
152    }
153    /// <p>The name of the dataset.</p>
154    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
155        &self.name
156    }
157    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
158    pub fn format(mut self, input: crate::types::InputFormat) -> Self {
159        self.format = ::std::option::Option::Some(input);
160        self
161    }
162    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
163    pub fn set_format(mut self, input: ::std::option::Option<crate::types::InputFormat>) -> Self {
164        self.format = input;
165        self
166    }
167    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
168    pub fn get_format(&self) -> &::std::option::Option<crate::types::InputFormat> {
169        &self.format
170    }
171    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
172    pub fn format_options(mut self, input: crate::types::FormatOptions) -> Self {
173        self.format_options = ::std::option::Option::Some(input);
174        self
175    }
176    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
177    pub fn set_format_options(mut self, input: ::std::option::Option<crate::types::FormatOptions>) -> Self {
178        self.format_options = input;
179        self
180    }
181    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
182    pub fn get_format_options(&self) -> &::std::option::Option<crate::types::FormatOptions> {
183        &self.format_options
184    }
185    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
186    /// This field is required.
187    pub fn input(mut self, input: crate::types::Input) -> Self {
188        self.input = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
192    pub fn set_input(mut self, input: ::std::option::Option<crate::types::Input>) -> Self {
193        self.input = input;
194        self
195    }
196    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
197    pub fn get_input(&self) -> &::std::option::Option<crate::types::Input> {
198        &self.input
199    }
200    /// <p>The date and time that the dataset was last modified.</p>
201    pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
202        self.last_modified_date = ::std::option::Option::Some(input);
203        self
204    }
205    /// <p>The date and time that the dataset was last modified.</p>
206    pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
207        self.last_modified_date = input;
208        self
209    }
210    /// <p>The date and time that the dataset was last modified.</p>
211    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
212        &self.last_modified_date
213    }
214    /// <p>The identifier (user name) of the user who last modified the dataset.</p>
215    pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216        self.last_modified_by = ::std::option::Option::Some(input.into());
217        self
218    }
219    /// <p>The identifier (user name) of the user who last modified the dataset.</p>
220    pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221        self.last_modified_by = input;
222        self
223    }
224    /// <p>The identifier (user name) of the user who last modified the dataset.</p>
225    pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
226        &self.last_modified_by
227    }
228    /// <p>The location of the data for this dataset, Amazon S3 or the Glue Data Catalog.</p>
229    pub fn source(mut self, input: crate::types::Source) -> Self {
230        self.source = ::std::option::Option::Some(input);
231        self
232    }
233    /// <p>The location of the data for this dataset, Amazon S3 or the Glue Data Catalog.</p>
234    pub fn set_source(mut self, input: ::std::option::Option<crate::types::Source>) -> Self {
235        self.source = input;
236        self
237    }
238    /// <p>The location of the data for this dataset, Amazon S3 or the Glue Data Catalog.</p>
239    pub fn get_source(&self) -> &::std::option::Option<crate::types::Source> {
240        &self.source
241    }
242    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
243    pub fn path_options(mut self, input: crate::types::PathOptions) -> Self {
244        self.path_options = ::std::option::Option::Some(input);
245        self
246    }
247    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
248    pub fn set_path_options(mut self, input: ::std::option::Option<crate::types::PathOptions>) -> Self {
249        self.path_options = input;
250        self
251    }
252    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
253    pub fn get_path_options(&self) -> &::std::option::Option<crate::types::PathOptions> {
254        &self.path_options
255    }
256    /// Adds a key-value pair to `tags`.
257    ///
258    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
259    ///
260    /// <p>Metadata tags associated with this dataset.</p>
261    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
262        let mut hash_map = self.tags.unwrap_or_default();
263        hash_map.insert(k.into(), v.into());
264        self.tags = ::std::option::Option::Some(hash_map);
265        self
266    }
267    /// <p>Metadata tags associated with this dataset.</p>
268    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
269        self.tags = input;
270        self
271    }
272    /// <p>Metadata tags associated with this dataset.</p>
273    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
274        &self.tags
275    }
276    /// <p>The Amazon Resource Name (ARN) of the dataset.</p>
277    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278        self.resource_arn = ::std::option::Option::Some(input.into());
279        self
280    }
281    /// <p>The Amazon Resource Name (ARN) of the dataset.</p>
282    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283        self.resource_arn = input;
284        self
285    }
286    /// <p>The Amazon Resource Name (ARN) of the dataset.</p>
287    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
288        &self.resource_arn
289    }
290    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
291        self._request_id = Some(request_id.into());
292        self
293    }
294
295    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
296        self._request_id = request_id;
297        self
298    }
299    /// Consumes the builder and constructs a [`DescribeDatasetOutput`](crate::operation::describe_dataset::DescribeDatasetOutput).
300    /// This method will fail if any of the following fields are not set:
301    /// - [`name`](crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::name)
302    pub fn build(
303        self,
304    ) -> ::std::result::Result<crate::operation::describe_dataset::DescribeDatasetOutput, ::aws_smithy_types::error::operation::BuildError> {
305        ::std::result::Result::Ok(crate::operation::describe_dataset::DescribeDatasetOutput {
306            created_by: self.created_by,
307            create_date: self.create_date,
308            name: self.name.ok_or_else(|| {
309                ::aws_smithy_types::error::operation::BuildError::missing_field(
310                    "name",
311                    "name was not specified but it is required when building DescribeDatasetOutput",
312                )
313            })?,
314            format: self.format,
315            format_options: self.format_options,
316            input: self.input,
317            last_modified_date: self.last_modified_date,
318            last_modified_by: self.last_modified_by,
319            source: self.source,
320            path_options: self.path_options,
321            tags: self.tags,
322            resource_arn: self.resource_arn,
323            _request_id: self._request_id,
324        })
325    }
326}