aws_sdk_databrew/operation/update_project/
_update_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 UpdateProjectInput {
6    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
7    pub sample: ::std::option::Option<crate::types::Sample>,
8    /// <p>The Amazon Resource Name (ARN) of the IAM role to be assumed for this request.</p>
9    pub role_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the project to be updated.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12}
13impl UpdateProjectInput {
14    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
15    pub fn sample(&self) -> ::std::option::Option<&crate::types::Sample> {
16        self.sample.as_ref()
17    }
18    /// <p>The Amazon Resource Name (ARN) of the IAM role to be assumed for this request.</p>
19    pub fn role_arn(&self) -> ::std::option::Option<&str> {
20        self.role_arn.as_deref()
21    }
22    /// <p>The name of the project to be updated.</p>
23    pub fn name(&self) -> ::std::option::Option<&str> {
24        self.name.as_deref()
25    }
26}
27impl UpdateProjectInput {
28    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
29    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
30        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateProjectInputBuilder {
38    pub(crate) sample: ::std::option::Option<crate::types::Sample>,
39    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) name: ::std::option::Option<::std::string::String>,
41}
42impl UpdateProjectInputBuilder {
43    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
44    pub fn sample(mut self, input: crate::types::Sample) -> Self {
45        self.sample = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
49    pub fn set_sample(mut self, input: ::std::option::Option<crate::types::Sample>) -> Self {
50        self.sample = input;
51        self
52    }
53    /// <p>Represents the sample size and sampling type for DataBrew to use for interactive data analysis.</p>
54    pub fn get_sample(&self) -> &::std::option::Option<crate::types::Sample> {
55        &self.sample
56    }
57    /// <p>The Amazon Resource Name (ARN) of the IAM role to be assumed for this request.</p>
58    /// This field is required.
59    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.role_arn = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The Amazon Resource Name (ARN) of the IAM role to be assumed for this request.</p>
64    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.role_arn = input;
66        self
67    }
68    /// <p>The Amazon Resource Name (ARN) of the IAM role to be assumed for this request.</p>
69    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
70        &self.role_arn
71    }
72    /// <p>The name of the project to be updated.</p>
73    /// This field is required.
74    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of the project to be updated.</p>
79    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.name = input;
81        self
82    }
83    /// <p>The name of the project to be updated.</p>
84    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.name
86    }
87    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
92            sample: self.sample,
93            role_arn: self.role_arn,
94            name: self.name,
95        })
96    }
97}