aws_sdk_databrew/operation/describe_project/
_describe_project_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeProjectOutput {
6 pub create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
8 pub created_by: ::std::option::Option<::std::string::String>,
10 pub dataset_name: ::std::option::Option<::std::string::String>,
12 pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
14 pub last_modified_by: ::std::option::Option<::std::string::String>,
16 pub name: ::std::string::String,
18 pub recipe_name: ::std::option::Option<::std::string::String>,
20 pub resource_arn: ::std::option::Option<::std::string::String>,
22 pub sample: ::std::option::Option<crate::types::Sample>,
24 pub role_arn: ::std::option::Option<::std::string::String>,
26 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28 pub session_status: ::std::option::Option<crate::types::SessionStatus>,
38 pub opened_by: ::std::option::Option<::std::string::String>,
40 pub open_date: ::std::option::Option<::aws_smithy_types::DateTime>,
42 _request_id: Option<String>,
43}
44impl DescribeProjectOutput {
45 pub fn create_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47 self.create_date.as_ref()
48 }
49 pub fn created_by(&self) -> ::std::option::Option<&str> {
51 self.created_by.as_deref()
52 }
53 pub fn dataset_name(&self) -> ::std::option::Option<&str> {
55 self.dataset_name.as_deref()
56 }
57 pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59 self.last_modified_date.as_ref()
60 }
61 pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
63 self.last_modified_by.as_deref()
64 }
65 pub fn name(&self) -> &str {
67 use std::ops::Deref;
68 self.name.deref()
69 }
70 pub fn recipe_name(&self) -> ::std::option::Option<&str> {
72 self.recipe_name.as_deref()
73 }
74 pub fn resource_arn(&self) -> ::std::option::Option<&str> {
76 self.resource_arn.as_deref()
77 }
78 pub fn sample(&self) -> ::std::option::Option<&crate::types::Sample> {
80 self.sample.as_ref()
81 }
82 pub fn role_arn(&self) -> ::std::option::Option<&str> {
84 self.role_arn.as_deref()
85 }
86 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
88 self.tags.as_ref()
89 }
90 pub fn session_status(&self) -> ::std::option::Option<&crate::types::SessionStatus> {
100 self.session_status.as_ref()
101 }
102 pub fn opened_by(&self) -> ::std::option::Option<&str> {
104 self.opened_by.as_deref()
105 }
106 pub fn open_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
108 self.open_date.as_ref()
109 }
110}
111impl ::aws_types::request_id::RequestId for DescribeProjectOutput {
112 fn request_id(&self) -> Option<&str> {
113 self._request_id.as_deref()
114 }
115}
116impl DescribeProjectOutput {
117 pub fn builder() -> crate::operation::describe_project::builders::DescribeProjectOutputBuilder {
119 crate::operation::describe_project::builders::DescribeProjectOutputBuilder::default()
120 }
121}
122
123#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
125#[non_exhaustive]
126pub struct DescribeProjectOutputBuilder {
127 pub(crate) create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
128 pub(crate) created_by: ::std::option::Option<::std::string::String>,
129 pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
130 pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
131 pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
132 pub(crate) name: ::std::option::Option<::std::string::String>,
133 pub(crate) recipe_name: ::std::option::Option<::std::string::String>,
134 pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
135 pub(crate) sample: ::std::option::Option<crate::types::Sample>,
136 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
137 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
138 pub(crate) session_status: ::std::option::Option<crate::types::SessionStatus>,
139 pub(crate) opened_by: ::std::option::Option<::std::string::String>,
140 pub(crate) open_date: ::std::option::Option<::aws_smithy_types::DateTime>,
141 _request_id: Option<String>,
142}
143impl DescribeProjectOutputBuilder {
144 pub fn create_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
146 self.create_date = ::std::option::Option::Some(input);
147 self
148 }
149 pub fn set_create_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
151 self.create_date = input;
152 self
153 }
154 pub fn get_create_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
156 &self.create_date
157 }
158 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.created_by = ::std::option::Option::Some(input.into());
161 self
162 }
163 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.created_by = input;
166 self
167 }
168 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
170 &self.created_by
171 }
172 pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174 self.dataset_name = ::std::option::Option::Some(input.into());
175 self
176 }
177 pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179 self.dataset_name = input;
180 self
181 }
182 pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
184 &self.dataset_name
185 }
186 pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
188 self.last_modified_date = ::std::option::Option::Some(input);
189 self
190 }
191 pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
193 self.last_modified_date = input;
194 self
195 }
196 pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
198 &self.last_modified_date
199 }
200 pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.last_modified_by = ::std::option::Option::Some(input.into());
203 self
204 }
205 pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.last_modified_by = input;
208 self
209 }
210 pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
212 &self.last_modified_by
213 }
214 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217 self.name = ::std::option::Option::Some(input.into());
218 self
219 }
220 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222 self.name = input;
223 self
224 }
225 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
227 &self.name
228 }
229 pub fn recipe_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.recipe_name = ::std::option::Option::Some(input.into());
232 self
233 }
234 pub fn set_recipe_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236 self.recipe_name = input;
237 self
238 }
239 pub fn get_recipe_name(&self) -> &::std::option::Option<::std::string::String> {
241 &self.recipe_name
242 }
243 pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245 self.resource_arn = ::std::option::Option::Some(input.into());
246 self
247 }
248 pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250 self.resource_arn = input;
251 self
252 }
253 pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
255 &self.resource_arn
256 }
257 pub fn sample(mut self, input: crate::types::Sample) -> Self {
259 self.sample = ::std::option::Option::Some(input);
260 self
261 }
262 pub fn set_sample(mut self, input: ::std::option::Option<crate::types::Sample>) -> Self {
264 self.sample = input;
265 self
266 }
267 pub fn get_sample(&self) -> &::std::option::Option<crate::types::Sample> {
269 &self.sample
270 }
271 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273 self.role_arn = ::std::option::Option::Some(input.into());
274 self
275 }
276 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278 self.role_arn = input;
279 self
280 }
281 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
283 &self.role_arn
284 }
285 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
291 let mut hash_map = self.tags.unwrap_or_default();
292 hash_map.insert(k.into(), v.into());
293 self.tags = ::std::option::Option::Some(hash_map);
294 self
295 }
296 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
298 self.tags = input;
299 self
300 }
301 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
303 &self.tags
304 }
305 pub fn session_status(mut self, input: crate::types::SessionStatus) -> Self {
315 self.session_status = ::std::option::Option::Some(input);
316 self
317 }
318 pub fn set_session_status(mut self, input: ::std::option::Option<crate::types::SessionStatus>) -> Self {
328 self.session_status = input;
329 self
330 }
331 pub fn get_session_status(&self) -> &::std::option::Option<crate::types::SessionStatus> {
341 &self.session_status
342 }
343 pub fn opened_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
345 self.opened_by = ::std::option::Option::Some(input.into());
346 self
347 }
348 pub fn set_opened_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
350 self.opened_by = input;
351 self
352 }
353 pub fn get_opened_by(&self) -> &::std::option::Option<::std::string::String> {
355 &self.opened_by
356 }
357 pub fn open_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
359 self.open_date = ::std::option::Option::Some(input);
360 self
361 }
362 pub fn set_open_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
364 self.open_date = input;
365 self
366 }
367 pub fn get_open_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
369 &self.open_date
370 }
371 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
372 self._request_id = Some(request_id.into());
373 self
374 }
375
376 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
377 self._request_id = request_id;
378 self
379 }
380 pub fn build(
384 self,
385 ) -> ::std::result::Result<crate::operation::describe_project::DescribeProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
386 ::std::result::Result::Ok(crate::operation::describe_project::DescribeProjectOutput {
387 create_date: self.create_date,
388 created_by: self.created_by,
389 dataset_name: self.dataset_name,
390 last_modified_date: self.last_modified_date,
391 last_modified_by: self.last_modified_by,
392 name: self.name.ok_or_else(|| {
393 ::aws_smithy_types::error::operation::BuildError::missing_field(
394 "name",
395 "name was not specified but it is required when building DescribeProjectOutput",
396 )
397 })?,
398 recipe_name: self.recipe_name,
399 resource_arn: self.resource_arn,
400 sample: self.sample,
401 role_arn: self.role_arn,
402 tags: self.tags,
403 session_status: self.session_status,
404 opened_by: self.opened_by,
405 open_date: self.open_date,
406 _request_id: self._request_id,
407 })
408 }
409}