aws_sdk_databrew/operation/describe_project/
_describe_project_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 DescribeProjectOutput {
6    /// <p>The date and time that the project was created.</p>
7    pub create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
8    /// <p>The identifier (user name) of the user who created the project.</p>
9    pub created_by: ::std::option::Option<::std::string::String>,
10    /// <p>The dataset associated with the project.</p>
11    pub dataset_name: ::std::option::Option<::std::string::String>,
12    /// <p>The date and time that the project was last modified.</p>
13    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>The identifier (user name) of the user who last modified the project.</p>
15    pub last_modified_by: ::std::option::Option<::std::string::String>,
16    /// <p>The name of the project.</p>
17    pub name: ::std::string::String,
18    /// <p>The recipe associated with this job.</p>
19    pub recipe_name: ::std::option::Option<::std::string::String>,
20    /// <p>The Amazon Resource Name (ARN) of the project.</p>
21    pub resource_arn: ::std::option::Option<::std::string::String>,
22    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
23    pub sample: ::std::option::Option<crate::types::Sample>,
24    /// <p>The ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
25    pub role_arn: ::std::option::Option<::std::string::String>,
26    /// <p>Metadata tags associated with this project.</p>
27    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28    /// <p>Describes the current state of the session:</p>
29    /// <ul>
30    /// <li>
31    /// <p><code>PROVISIONING</code> - allocating resources for the session.</p></li>
32    /// <li>
33    /// <p><code>INITIALIZING</code> - getting the session ready for first use.</p></li>
34    /// <li>
35    /// <p><code>ASSIGNED</code> - the session is ready for use.</p></li>
36    /// </ul>
37    pub session_status: ::std::option::Option<crate::types::SessionStatus>,
38    /// <p>The identifier (user name) of the user that opened the project for use.</p>
39    pub opened_by: ::std::option::Option<::std::string::String>,
40    /// <p>The date and time when the project was opened.</p>
41    pub open_date: ::std::option::Option<::aws_smithy_types::DateTime>,
42    _request_id: Option<String>,
43}
44impl DescribeProjectOutput {
45    /// <p>The date and time that the project was created.</p>
46    pub fn create_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47        self.create_date.as_ref()
48    }
49    /// <p>The identifier (user name) of the user who created the project.</p>
50    pub fn created_by(&self) -> ::std::option::Option<&str> {
51        self.created_by.as_deref()
52    }
53    /// <p>The dataset associated with the project.</p>
54    pub fn dataset_name(&self) -> ::std::option::Option<&str> {
55        self.dataset_name.as_deref()
56    }
57    /// <p>The date and time that the project was last modified.</p>
58    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59        self.last_modified_date.as_ref()
60    }
61    /// <p>The identifier (user name) of the user who last modified the project.</p>
62    pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
63        self.last_modified_by.as_deref()
64    }
65    /// <p>The name of the project.</p>
66    pub fn name(&self) -> &str {
67        use std::ops::Deref;
68        self.name.deref()
69    }
70    /// <p>The recipe associated with this job.</p>
71    pub fn recipe_name(&self) -> ::std::option::Option<&str> {
72        self.recipe_name.as_deref()
73    }
74    /// <p>The Amazon Resource Name (ARN) of the project.</p>
75    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
76        self.resource_arn.as_deref()
77    }
78    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
79    pub fn sample(&self) -> ::std::option::Option<&crate::types::Sample> {
80        self.sample.as_ref()
81    }
82    /// <p>The ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
83    pub fn role_arn(&self) -> ::std::option::Option<&str> {
84        self.role_arn.as_deref()
85    }
86    /// <p>Metadata tags associated with this project.</p>
87    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
88        self.tags.as_ref()
89    }
90    /// <p>Describes the current state of the session:</p>
91    /// <ul>
92    /// <li>
93    /// <p><code>PROVISIONING</code> - allocating resources for the session.</p></li>
94    /// <li>
95    /// <p><code>INITIALIZING</code> - getting the session ready for first use.</p></li>
96    /// <li>
97    /// <p><code>ASSIGNED</code> - the session is ready for use.</p></li>
98    /// </ul>
99    pub fn session_status(&self) -> ::std::option::Option<&crate::types::SessionStatus> {
100        self.session_status.as_ref()
101    }
102    /// <p>The identifier (user name) of the user that opened the project for use.</p>
103    pub fn opened_by(&self) -> ::std::option::Option<&str> {
104        self.opened_by.as_deref()
105    }
106    /// <p>The date and time when the project was opened.</p>
107    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    /// Creates a new builder-style object to manufacture [`DescribeProjectOutput`](crate::operation::describe_project::DescribeProjectOutput).
118    pub fn builder() -> crate::operation::describe_project::builders::DescribeProjectOutputBuilder {
119        crate::operation::describe_project::builders::DescribeProjectOutputBuilder::default()
120    }
121}
122
123/// A builder for [`DescribeProjectOutput`](crate::operation::describe_project::DescribeProjectOutput).
124#[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    /// <p>The date and time that the project was created.</p>
145    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    /// <p>The date and time that the project was created.</p>
150    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    /// <p>The date and time that the project was created.</p>
155    pub fn get_create_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
156        &self.create_date
157    }
158    /// <p>The identifier (user name) of the user who created the project.</p>
159    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    /// <p>The identifier (user name) of the user who created the project.</p>
164    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.created_by = input;
166        self
167    }
168    /// <p>The identifier (user name) of the user who created the project.</p>
169    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
170        &self.created_by
171    }
172    /// <p>The dataset associated with the project.</p>
173    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    /// <p>The dataset associated with the project.</p>
178    pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.dataset_name = input;
180        self
181    }
182    /// <p>The dataset associated with the project.</p>
183    pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
184        &self.dataset_name
185    }
186    /// <p>The date and time that the project was last modified.</p>
187    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    /// <p>The date and time that the project was last modified.</p>
192    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    /// <p>The date and time that the project was last modified.</p>
197    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
198        &self.last_modified_date
199    }
200    /// <p>The identifier (user name) of the user who last modified the project.</p>
201    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    /// <p>The identifier (user name) of the user who last modified the project.</p>
206    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    /// <p>The identifier (user name) of the user who last modified the project.</p>
211    pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
212        &self.last_modified_by
213    }
214    /// <p>The name of the project.</p>
215    /// This field is required.
216    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    /// <p>The name of the project.</p>
221    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.name = input;
223        self
224    }
225    /// <p>The name of the project.</p>
226    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
227        &self.name
228    }
229    /// <p>The recipe associated with this job.</p>
230    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    /// <p>The recipe associated with this job.</p>
235    pub fn set_recipe_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.recipe_name = input;
237        self
238    }
239    /// <p>The recipe associated with this job.</p>
240    pub fn get_recipe_name(&self) -> &::std::option::Option<::std::string::String> {
241        &self.recipe_name
242    }
243    /// <p>The Amazon Resource Name (ARN) of the project.</p>
244    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    /// <p>The Amazon Resource Name (ARN) of the project.</p>
249    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250        self.resource_arn = input;
251        self
252    }
253    /// <p>The Amazon Resource Name (ARN) of the project.</p>
254    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
255        &self.resource_arn
256    }
257    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
258    pub fn sample(mut self, input: crate::types::Sample) -> Self {
259        self.sample = ::std::option::Option::Some(input);
260        self
261    }
262    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
263    pub fn set_sample(mut self, input: ::std::option::Option<crate::types::Sample>) -> Self {
264        self.sample = input;
265        self
266    }
267    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
268    pub fn get_sample(&self) -> &::std::option::Option<crate::types::Sample> {
269        &self.sample
270    }
271    /// <p>The ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
272    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    /// <p>The ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
277    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278        self.role_arn = input;
279        self
280    }
281    /// <p>The ARN of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
282    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
283        &self.role_arn
284    }
285    /// Adds a key-value pair to `tags`.
286    ///
287    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
288    ///
289    /// <p>Metadata tags associated with this project.</p>
290    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    /// <p>Metadata tags associated with this project.</p>
297    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    /// <p>Metadata tags associated with this project.</p>
302    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
303        &self.tags
304    }
305    /// <p>Describes the current state of the session:</p>
306    /// <ul>
307    /// <li>
308    /// <p><code>PROVISIONING</code> - allocating resources for the session.</p></li>
309    /// <li>
310    /// <p><code>INITIALIZING</code> - getting the session ready for first use.</p></li>
311    /// <li>
312    /// <p><code>ASSIGNED</code> - the session is ready for use.</p></li>
313    /// </ul>
314    pub fn session_status(mut self, input: crate::types::SessionStatus) -> Self {
315        self.session_status = ::std::option::Option::Some(input);
316        self
317    }
318    /// <p>Describes the current state of the session:</p>
319    /// <ul>
320    /// <li>
321    /// <p><code>PROVISIONING</code> - allocating resources for the session.</p></li>
322    /// <li>
323    /// <p><code>INITIALIZING</code> - getting the session ready for first use.</p></li>
324    /// <li>
325    /// <p><code>ASSIGNED</code> - the session is ready for use.</p></li>
326    /// </ul>
327    pub fn set_session_status(mut self, input: ::std::option::Option<crate::types::SessionStatus>) -> Self {
328        self.session_status = input;
329        self
330    }
331    /// <p>Describes the current state of the session:</p>
332    /// <ul>
333    /// <li>
334    /// <p><code>PROVISIONING</code> - allocating resources for the session.</p></li>
335    /// <li>
336    /// <p><code>INITIALIZING</code> - getting the session ready for first use.</p></li>
337    /// <li>
338    /// <p><code>ASSIGNED</code> - the session is ready for use.</p></li>
339    /// </ul>
340    pub fn get_session_status(&self) -> &::std::option::Option<crate::types::SessionStatus> {
341        &self.session_status
342    }
343    /// <p>The identifier (user name) of the user that opened the project for use.</p>
344    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    /// <p>The identifier (user name) of the user that opened the project for use.</p>
349    pub fn set_opened_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
350        self.opened_by = input;
351        self
352    }
353    /// <p>The identifier (user name) of the user that opened the project for use.</p>
354    pub fn get_opened_by(&self) -> &::std::option::Option<::std::string::String> {
355        &self.opened_by
356    }
357    /// <p>The date and time when the project was opened.</p>
358    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    /// <p>The date and time when the project was opened.</p>
363    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    /// <p>The date and time when the project was opened.</p>
368    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    /// Consumes the builder and constructs a [`DescribeProjectOutput`](crate::operation::describe_project::DescribeProjectOutput).
381    /// This method will fail if any of the following fields are not set:
382    /// - [`name`](crate::operation::describe_project::builders::DescribeProjectOutputBuilder::name)
383    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}