aws_sdk_finspace/operation/update_environment/
_update_environment_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateEnvironmentInput {
6 pub environment_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 federation_mode: ::std::option::Option<crate::types::FederationMode>,
20 pub federation_parameters: ::std::option::Option<crate::types::FederationParameters>,
22}
23impl UpdateEnvironmentInput {
24 pub fn environment_id(&self) -> ::std::option::Option<&str> {
26 self.environment_id.as_deref()
27 }
28 pub fn name(&self) -> ::std::option::Option<&str> {
30 self.name.as_deref()
31 }
32 pub fn description(&self) -> ::std::option::Option<&str> {
34 self.description.as_deref()
35 }
36 pub fn federation_mode(&self) -> ::std::option::Option<&crate::types::FederationMode> {
44 self.federation_mode.as_ref()
45 }
46 pub fn federation_parameters(&self) -> ::std::option::Option<&crate::types::FederationParameters> {
48 self.federation_parameters.as_ref()
49 }
50}
51impl UpdateEnvironmentInput {
52 pub fn builder() -> crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
54 crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder::default()
55 }
56}
57
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdateEnvironmentInputBuilder {
62 pub(crate) environment_id: ::std::option::Option<::std::string::String>,
63 pub(crate) name: ::std::option::Option<::std::string::String>,
64 pub(crate) description: ::std::option::Option<::std::string::String>,
65 pub(crate) federation_mode: ::std::option::Option<crate::types::FederationMode>,
66 pub(crate) federation_parameters: ::std::option::Option<crate::types::FederationParameters>,
67}
68impl UpdateEnvironmentInputBuilder {
69 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.environment_id = ::std::option::Option::Some(input.into());
73 self
74 }
75 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.environment_id = input;
78 self
79 }
80 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
82 &self.environment_id
83 }
84 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.name = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.name = input;
92 self
93 }
94 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
96 &self.name
97 }
98 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.description = ::std::option::Option::Some(input.into());
101 self
102 }
103 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.description = input;
106 self
107 }
108 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
110 &self.description
111 }
112 pub fn federation_mode(mut self, input: crate::types::FederationMode) -> Self {
120 self.federation_mode = ::std::option::Option::Some(input);
121 self
122 }
123 pub fn set_federation_mode(mut self, input: ::std::option::Option<crate::types::FederationMode>) -> Self {
131 self.federation_mode = input;
132 self
133 }
134 pub fn get_federation_mode(&self) -> &::std::option::Option<crate::types::FederationMode> {
142 &self.federation_mode
143 }
144 pub fn federation_parameters(mut self, input: crate::types::FederationParameters) -> Self {
146 self.federation_parameters = ::std::option::Option::Some(input);
147 self
148 }
149 pub fn set_federation_parameters(mut self, input: ::std::option::Option<crate::types::FederationParameters>) -> Self {
151 self.federation_parameters = input;
152 self
153 }
154 pub fn get_federation_parameters(&self) -> &::std::option::Option<crate::types::FederationParameters> {
156 &self.federation_parameters
157 }
158 pub fn build(
160 self,
161 ) -> ::std::result::Result<crate::operation::update_environment::UpdateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
162 ::std::result::Result::Ok(crate::operation::update_environment::UpdateEnvironmentInput {
163 environment_id: self.environment_id,
164 name: self.name,
165 description: self.description,
166 federation_mode: self.federation_mode,
167 federation_parameters: self.federation_parameters,
168 })
169 }
170}