aws_sdk_emr/operation/update_studio/
_update_studio_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateStudioInput {
6 pub studio_id: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 pub default_s3_location: ::std::option::Option<::std::string::String>,
16 pub encryption_key_arn: ::std::option::Option<::std::string::String>,
18}
19impl UpdateStudioInput {
20 pub fn studio_id(&self) -> ::std::option::Option<&str> {
22 self.studio_id.as_deref()
23 }
24 pub fn name(&self) -> ::std::option::Option<&str> {
26 self.name.as_deref()
27 }
28 pub fn description(&self) -> ::std::option::Option<&str> {
30 self.description.as_deref()
31 }
32 pub fn subnet_ids(&self) -> &[::std::string::String] {
36 self.subnet_ids.as_deref().unwrap_or_default()
37 }
38 pub fn default_s3_location(&self) -> ::std::option::Option<&str> {
40 self.default_s3_location.as_deref()
41 }
42 pub fn encryption_key_arn(&self) -> ::std::option::Option<&str> {
44 self.encryption_key_arn.as_deref()
45 }
46}
47impl UpdateStudioInput {
48 pub fn builder() -> crate::operation::update_studio::builders::UpdateStudioInputBuilder {
50 crate::operation::update_studio::builders::UpdateStudioInputBuilder::default()
51 }
52}
53
54#[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 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 pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.studio_id = input;
75 self
76 }
77 pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.studio_id
80 }
81 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.name = input;
89 self
90 }
91 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.name
94 }
95 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.description = input;
103 self
104 }
105 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
107 &self.description
108 }
109 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 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 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
127 &self.subnet_ids
128 }
129 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 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 pub fn get_default_s3_location(&self) -> &::std::option::Option<::std::string::String> {
141 &self.default_s3_location
142 }
143 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 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 pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
155 &self.encryption_key_arn
156 }
157 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}