aws_sdk_datazone/operation/update_environment/
_update_environment_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 UpdateEnvironmentInput {
6    /// <p>The identifier of the domain in which the environment is to be updated.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the environment that is to be updated.</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The name to be updated as part of the <code>UpdateEnvironment</code> action.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description to be updated as part of the <code>UpdateEnvironment</code> action.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The glossary terms to be updated as part of the <code>UpdateEnvironment</code> action.</p>
15    pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
17    pub blueprint_version: ::std::option::Option<::std::string::String>,
18    /// <p>The user parameters of the environment.</p>
19    pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>,
20}
21impl UpdateEnvironmentInput {
22    /// <p>The identifier of the domain in which the environment is to be updated.</p>
23    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
24        self.domain_identifier.as_deref()
25    }
26    /// <p>The identifier of the environment that is to be updated.</p>
27    pub fn identifier(&self) -> ::std::option::Option<&str> {
28        self.identifier.as_deref()
29    }
30    /// <p>The name to be updated as part of the <code>UpdateEnvironment</code> action.</p>
31    pub fn name(&self) -> ::std::option::Option<&str> {
32        self.name.as_deref()
33    }
34    /// <p>The description to be updated as part of the <code>UpdateEnvironment</code> action.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The glossary terms to be updated as part of the <code>UpdateEnvironment</code> action.</p>
39    ///
40    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.glossary_terms.is_none()`.
41    pub fn glossary_terms(&self) -> &[::std::string::String] {
42        self.glossary_terms.as_deref().unwrap_or_default()
43    }
44    /// <p>The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
45    pub fn blueprint_version(&self) -> ::std::option::Option<&str> {
46        self.blueprint_version.as_deref()
47    }
48    /// <p>The user parameters of the environment.</p>
49    ///
50    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_parameters.is_none()`.
51    pub fn user_parameters(&self) -> &[crate::types::EnvironmentParameter] {
52        self.user_parameters.as_deref().unwrap_or_default()
53    }
54}
55impl UpdateEnvironmentInput {
56    /// Creates a new builder-style object to manufacture [`UpdateEnvironmentInput`](crate::operation::update_environment::UpdateEnvironmentInput).
57    pub fn builder() -> crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
58        crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder::default()
59    }
60}
61
62/// A builder for [`UpdateEnvironmentInput`](crate::operation::update_environment::UpdateEnvironmentInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct UpdateEnvironmentInputBuilder {
66    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
67    pub(crate) identifier: ::std::option::Option<::std::string::String>,
68    pub(crate) name: ::std::option::Option<::std::string::String>,
69    pub(crate) description: ::std::option::Option<::std::string::String>,
70    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
71    pub(crate) blueprint_version: ::std::option::Option<::std::string::String>,
72    pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>,
73}
74impl UpdateEnvironmentInputBuilder {
75    /// <p>The identifier of the domain in which the environment is to be updated.</p>
76    /// This field is required.
77    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.domain_identifier = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The identifier of the domain in which the environment is to be updated.</p>
82    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.domain_identifier = input;
84        self
85    }
86    /// <p>The identifier of the domain in which the environment is to be updated.</p>
87    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
88        &self.domain_identifier
89    }
90    /// <p>The identifier of the environment that is to be updated.</p>
91    /// This field is required.
92    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.identifier = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The identifier of the environment that is to be updated.</p>
97    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.identifier = input;
99        self
100    }
101    /// <p>The identifier of the environment that is to be updated.</p>
102    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
103        &self.identifier
104    }
105    /// <p>The name to be updated as part of the <code>UpdateEnvironment</code> action.</p>
106    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.name = ::std::option::Option::Some(input.into());
108        self
109    }
110    /// <p>The name to be updated as part of the <code>UpdateEnvironment</code> action.</p>
111    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.name = input;
113        self
114    }
115    /// <p>The name to be updated as part of the <code>UpdateEnvironment</code> action.</p>
116    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
117        &self.name
118    }
119    /// <p>The description to be updated as part of the <code>UpdateEnvironment</code> action.</p>
120    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.description = ::std::option::Option::Some(input.into());
122        self
123    }
124    /// <p>The description to be updated as part of the <code>UpdateEnvironment</code> action.</p>
125    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.description = input;
127        self
128    }
129    /// <p>The description to be updated as part of the <code>UpdateEnvironment</code> action.</p>
130    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
131        &self.description
132    }
133    /// Appends an item to `glossary_terms`.
134    ///
135    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
136    ///
137    /// <p>The glossary terms to be updated as part of the <code>UpdateEnvironment</code> action.</p>
138    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        let mut v = self.glossary_terms.unwrap_or_default();
140        v.push(input.into());
141        self.glossary_terms = ::std::option::Option::Some(v);
142        self
143    }
144    /// <p>The glossary terms to be updated as part of the <code>UpdateEnvironment</code> action.</p>
145    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
146        self.glossary_terms = input;
147        self
148    }
149    /// <p>The glossary terms to be updated as part of the <code>UpdateEnvironment</code> action.</p>
150    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
151        &self.glossary_terms
152    }
153    /// <p>The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
154    pub fn blueprint_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.blueprint_version = ::std::option::Option::Some(input.into());
156        self
157    }
158    /// <p>The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
159    pub fn set_blueprint_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.blueprint_version = input;
161        self
162    }
163    /// <p>The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
164    pub fn get_blueprint_version(&self) -> &::std::option::Option<::std::string::String> {
165        &self.blueprint_version
166    }
167    /// Appends an item to `user_parameters`.
168    ///
169    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
170    ///
171    /// <p>The user parameters of the environment.</p>
172    pub fn user_parameters(mut self, input: crate::types::EnvironmentParameter) -> Self {
173        let mut v = self.user_parameters.unwrap_or_default();
174        v.push(input);
175        self.user_parameters = ::std::option::Option::Some(v);
176        self
177    }
178    /// <p>The user parameters of the environment.</p>
179    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>) -> Self {
180        self.user_parameters = input;
181        self
182    }
183    /// <p>The user parameters of the environment.</p>
184    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>> {
185        &self.user_parameters
186    }
187    /// Consumes the builder and constructs a [`UpdateEnvironmentInput`](crate::operation::update_environment::UpdateEnvironmentInput).
188    pub fn build(
189        self,
190    ) -> ::std::result::Result<crate::operation::update_environment::UpdateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
191        ::std::result::Result::Ok(crate::operation::update_environment::UpdateEnvironmentInput {
192            domain_identifier: self.domain_identifier,
193            identifier: self.identifier,
194            name: self.name,
195            description: self.description,
196            glossary_terms: self.glossary_terms,
197            blueprint_version: self.blueprint_version,
198            user_parameters: self.user_parameters,
199        })
200    }
201}