aws_sdk_emr/operation/update_studio/
_update_studio_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 UpdateStudioInput {
6    /// <p>The ID of the Amazon EMR Studio to update.</p>
7    pub studio_id: ::std::option::Option<::std::string::String>,
8    /// <p>A descriptive name for the Amazon EMR Studio.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>A detailed description to assign to the Amazon EMR Studio.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.</p>
13    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14    /// <p>The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.</p>
15    pub default_s3_location: ::std::option::Option<::std::string::String>,
16    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
17    pub encryption_key_arn: ::std::option::Option<::std::string::String>,
18}
19impl UpdateStudioInput {
20    /// <p>The ID of the Amazon EMR Studio to update.</p>
21    pub fn studio_id(&self) -> ::std::option::Option<&str> {
22        self.studio_id.as_deref()
23    }
24    /// <p>A descriptive name for the Amazon EMR Studio.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>A detailed description to assign to the Amazon EMR Studio.</p>
29    pub fn description(&self) -> ::std::option::Option<&str> {
30        self.description.as_deref()
31    }
32    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.</p>
33    ///
34    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
35    pub fn subnet_ids(&self) -> &[::std::string::String] {
36        self.subnet_ids.as_deref().unwrap_or_default()
37    }
38    /// <p>The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.</p>
39    pub fn default_s3_location(&self) -> ::std::option::Option<&str> {
40        self.default_s3_location.as_deref()
41    }
42    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
43    pub fn encryption_key_arn(&self) -> ::std::option::Option<&str> {
44        self.encryption_key_arn.as_deref()
45    }
46}
47impl UpdateStudioInput {
48    /// Creates a new builder-style object to manufacture [`UpdateStudioInput`](crate::operation::update_studio::UpdateStudioInput).
49    pub fn builder() -> crate::operation::update_studio::builders::UpdateStudioInputBuilder {
50        crate::operation::update_studio::builders::UpdateStudioInputBuilder::default()
51    }
52}
53
54/// A builder for [`UpdateStudioInput`](crate::operation::update_studio::UpdateStudioInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct UpdateStudioInputBuilder {
58    pub(crate) studio_id: ::std::option::Option<::std::string::String>,
59    pub(crate) name: ::std::option::Option<::std::string::String>,
60    pub(crate) description: ::std::option::Option<::std::string::String>,
61    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
62    pub(crate) default_s3_location: ::std::option::Option<::std::string::String>,
63    pub(crate) encryption_key_arn: ::std::option::Option<::std::string::String>,
64}
65impl UpdateStudioInputBuilder {
66    /// <p>The ID of the Amazon EMR Studio to update.</p>
67    /// This field is required.
68    pub fn studio_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.studio_id = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The ID of the Amazon EMR Studio to update.</p>
73    pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.studio_id = input;
75        self
76    }
77    /// <p>The ID of the Amazon EMR Studio to update.</p>
78    pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.studio_id
80    }
81    /// <p>A descriptive name for the Amazon EMR Studio.</p>
82    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>A descriptive name for the Amazon EMR Studio.</p>
87    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.name = input;
89        self
90    }
91    /// <p>A descriptive name for the Amazon EMR Studio.</p>
92    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.name
94    }
95    /// <p>A detailed description to assign to the Amazon EMR Studio.</p>
96    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.description = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>A detailed description to assign to the Amazon EMR Studio.</p>
101    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.description = input;
103        self
104    }
105    /// <p>A detailed description to assign to the Amazon EMR Studio.</p>
106    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
107        &self.description
108    }
109    /// Appends an item to `subnet_ids`.
110    ///
111    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
112    ///
113    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.</p>
114    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        let mut v = self.subnet_ids.unwrap_or_default();
116        v.push(input.into());
117        self.subnet_ids = ::std::option::Option::Some(v);
118        self
119    }
120    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.</p>
121    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
122        self.subnet_ids = input;
123        self
124    }
125    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.</p>
126    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
127        &self.subnet_ids
128    }
129    /// <p>The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.</p>
130    pub fn default_s3_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.default_s3_location = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.</p>
135    pub fn set_default_s3_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.default_s3_location = input;
137        self
138    }
139    /// <p>The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.</p>
140    pub fn get_default_s3_location(&self) -> &::std::option::Option<::std::string::String> {
141        &self.default_s3_location
142    }
143    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
144    pub fn encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.encryption_key_arn = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
149    pub fn set_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.encryption_key_arn = input;
151        self
152    }
153    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
154    pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
155        &self.encryption_key_arn
156    }
157    /// Consumes the builder and constructs a [`UpdateStudioInput`](crate::operation::update_studio::UpdateStudioInput).
158    pub fn build(
159        self,
160    ) -> ::std::result::Result<crate::operation::update_studio::UpdateStudioInput, ::aws_smithy_types::error::operation::BuildError> {
161        ::std::result::Result::Ok(crate::operation::update_studio::UpdateStudioInput {
162            studio_id: self.studio_id,
163            name: self.name,
164            description: self.description,
165            subnet_ids: self.subnet_ids,
166            default_s3_location: self.default_s3_location,
167            encryption_key_arn: self.encryption_key_arn,
168        })
169    }
170}