aws_sdk_databrew/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 created_by: ::std::option::Option<::std::string::String>,
8 pub create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
10 pub name: ::std::string::String,
12 pub format: ::std::option::Option<crate::types::InputFormat>,
14 pub format_options: ::std::option::Option<crate::types::FormatOptions>,
16 pub input: ::std::option::Option<crate::types::Input>,
18 pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub last_modified_by: ::std::option::Option<::std::string::String>,
22 pub source: ::std::option::Option<crate::types::Source>,
24 pub path_options: ::std::option::Option<crate::types::PathOptions>,
26 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28 pub resource_arn: ::std::option::Option<::std::string::String>,
30 _request_id: Option<String>,
31}
32impl DescribeDatasetOutput {
33 pub fn created_by(&self) -> ::std::option::Option<&str> {
35 self.created_by.as_deref()
36 }
37 pub fn create_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39 self.create_date.as_ref()
40 }
41 pub fn name(&self) -> &str {
43 use std::ops::Deref;
44 self.name.deref()
45 }
46 pub fn format(&self) -> ::std::option::Option<&crate::types::InputFormat> {
48 self.format.as_ref()
49 }
50 pub fn format_options(&self) -> ::std::option::Option<&crate::types::FormatOptions> {
52 self.format_options.as_ref()
53 }
54 pub fn input(&self) -> ::std::option::Option<&crate::types::Input> {
56 self.input.as_ref()
57 }
58 pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
60 self.last_modified_date.as_ref()
61 }
62 pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
64 self.last_modified_by.as_deref()
65 }
66 pub fn source(&self) -> ::std::option::Option<&crate::types::Source> {
68 self.source.as_ref()
69 }
70 pub fn path_options(&self) -> ::std::option::Option<&crate::types::PathOptions> {
72 self.path_options.as_ref()
73 }
74 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
76 self.tags.as_ref()
77 }
78 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 pub fn builder() -> crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder {
91 crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::default()
92 }
93}
94
95#[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 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 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.created_by = input;
122 self
123 }
124 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
126 &self.created_by
127 }
128 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 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 pub fn get_create_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
140 &self.create_date
141 }
142 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.name = input;
151 self
152 }
153 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
155 &self.name
156 }
157 pub fn format(mut self, input: crate::types::InputFormat) -> Self {
159 self.format = ::std::option::Option::Some(input);
160 self
161 }
162 pub fn set_format(mut self, input: ::std::option::Option<crate::types::InputFormat>) -> Self {
164 self.format = input;
165 self
166 }
167 pub fn get_format(&self) -> &::std::option::Option<crate::types::InputFormat> {
169 &self.format
170 }
171 pub fn format_options(mut self, input: crate::types::FormatOptions) -> Self {
173 self.format_options = ::std::option::Option::Some(input);
174 self
175 }
176 pub fn set_format_options(mut self, input: ::std::option::Option<crate::types::FormatOptions>) -> Self {
178 self.format_options = input;
179 self
180 }
181 pub fn get_format_options(&self) -> &::std::option::Option<crate::types::FormatOptions> {
183 &self.format_options
184 }
185 pub fn input(mut self, input: crate::types::Input) -> Self {
188 self.input = ::std::option::Option::Some(input);
189 self
190 }
191 pub fn set_input(mut self, input: ::std::option::Option<crate::types::Input>) -> Self {
193 self.input = input;
194 self
195 }
196 pub fn get_input(&self) -> &::std::option::Option<crate::types::Input> {
198 &self.input
199 }
200 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 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 pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
212 &self.last_modified_date
213 }
214 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 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 pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
226 &self.last_modified_by
227 }
228 pub fn source(mut self, input: crate::types::Source) -> Self {
230 self.source = ::std::option::Option::Some(input);
231 self
232 }
233 pub fn set_source(mut self, input: ::std::option::Option<crate::types::Source>) -> Self {
235 self.source = input;
236 self
237 }
238 pub fn get_source(&self) -> &::std::option::Option<crate::types::Source> {
240 &self.source
241 }
242 pub fn path_options(mut self, input: crate::types::PathOptions) -> Self {
244 self.path_options = ::std::option::Option::Some(input);
245 self
246 }
247 pub fn set_path_options(mut self, input: ::std::option::Option<crate::types::PathOptions>) -> Self {
249 self.path_options = input;
250 self
251 }
252 pub fn get_path_options(&self) -> &::std::option::Option<crate::types::PathOptions> {
254 &self.path_options
255 }
256 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
274 &self.tags
275 }
276 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 pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283 self.resource_arn = input;
284 self
285 }
286 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 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}