aws_sdk_databrew/operation/create_project/
_create_project_input.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 CreateProjectInput {
6    /// <p>The name of an existing dataset to associate this project with.</p>
7    pub dataset_name: ::std::option::Option<::std::string::String>,
8    /// <p>A unique name for the new project. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of an existing recipe to associate with the project.</p>
11    pub recipe_name: ::std::option::Option<::std::string::String>,
12    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
13    pub sample: ::std::option::Option<crate::types::Sample>,
14    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.</p>
15    pub role_arn: ::std::option::Option<::std::string::String>,
16    /// <p>Metadata tags to apply to this project.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18}
19impl CreateProjectInput {
20    /// <p>The name of an existing dataset to associate this project with.</p>
21    pub fn dataset_name(&self) -> ::std::option::Option<&str> {
22        self.dataset_name.as_deref()
23    }
24    /// <p>A unique name for the new project. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The name of an existing recipe to associate with the project.</p>
29    pub fn recipe_name(&self) -> ::std::option::Option<&str> {
30        self.recipe_name.as_deref()
31    }
32    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
33    pub fn sample(&self) -> ::std::option::Option<&crate::types::Sample> {
34        self.sample.as_ref()
35    }
36    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.</p>
37    pub fn role_arn(&self) -> ::std::option::Option<&str> {
38        self.role_arn.as_deref()
39    }
40    /// <p>Metadata tags to apply to this project.</p>
41    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
42        self.tags.as_ref()
43    }
44}
45impl CreateProjectInput {
46    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
47    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
48        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
49    }
50}
51
52/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct CreateProjectInputBuilder {
56    pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
57    pub(crate) name: ::std::option::Option<::std::string::String>,
58    pub(crate) recipe_name: ::std::option::Option<::std::string::String>,
59    pub(crate) sample: ::std::option::Option<crate::types::Sample>,
60    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
61    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
62}
63impl CreateProjectInputBuilder {
64    /// <p>The name of an existing dataset to associate this project with.</p>
65    /// This field is required.
66    pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.dataset_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of an existing dataset to associate this project with.</p>
71    pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.dataset_name = input;
73        self
74    }
75    /// <p>The name of an existing dataset to associate this project with.</p>
76    pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.dataset_name
78    }
79    /// <p>A unique name for the new project. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
80    /// This field is required.
81    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.name = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>A unique name for the new project. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
86    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.name = input;
88        self
89    }
90    /// <p>A unique name for the new project. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.</p>
91    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
92        &self.name
93    }
94    /// <p>The name of an existing recipe to associate with the project.</p>
95    /// This field is required.
96    pub fn recipe_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.recipe_name = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The name of an existing recipe to associate with the project.</p>
101    pub fn set_recipe_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.recipe_name = input;
103        self
104    }
105    /// <p>The name of an existing recipe to associate with the project.</p>
106    pub fn get_recipe_name(&self) -> &::std::option::Option<::std::string::String> {
107        &self.recipe_name
108    }
109    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
110    pub fn sample(mut self, input: crate::types::Sample) -> Self {
111        self.sample = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
115    pub fn set_sample(mut self, input: ::std::option::Option<crate::types::Sample>) -> Self {
116        self.sample = input;
117        self
118    }
119    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
120    pub fn get_sample(&self) -> &::std::option::Option<crate::types::Sample> {
121        &self.sample
122    }
123    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.</p>
124    /// This field is required.
125    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.role_arn = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.</p>
130    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.role_arn = input;
132        self
133    }
134    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed for this request.</p>
135    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
136        &self.role_arn
137    }
138    /// Adds a key-value pair to `tags`.
139    ///
140    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
141    ///
142    /// <p>Metadata tags to apply to this project.</p>
143    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
144        let mut hash_map = self.tags.unwrap_or_default();
145        hash_map.insert(k.into(), v.into());
146        self.tags = ::std::option::Option::Some(hash_map);
147        self
148    }
149    /// <p>Metadata tags to apply to this project.</p>
150    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
151        self.tags = input;
152        self
153    }
154    /// <p>Metadata tags to apply to this project.</p>
155    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
156        &self.tags
157    }
158    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
159    pub fn build(
160        self,
161    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
162        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
163            dataset_name: self.dataset_name,
164            name: self.name,
165            recipe_name: self.recipe_name,
166            sample: self.sample,
167            role_arn: self.role_arn,
168            tags: self.tags,
169        })
170    }
171}