aws_sdk_appconfig/operation/start_deployment/
_start_deployment_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)]
5pub struct StartDeploymentInput {
6    /// <p>The application ID.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The environment ID.</p>
9    pub environment_id: ::std::option::Option<::std::string::String>,
10    /// <p>The deployment strategy ID.</p>
11    pub deployment_strategy_id: ::std::option::Option<::std::string::String>,
12    /// <p>The configuration profile ID.</p>
13    pub configuration_profile_id: ::std::option::Option<::std::string::String>,
14    /// <p>The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.</p>
15    pub configuration_version: ::std::option::Option<::std::string::String>,
16    /// <p>A description of the deployment.</p>
17    pub description: ::std::option::Option<::std::string::String>,
18    /// <p>Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>
19    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20    /// <p>The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.</p>
21    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
22    /// <p>A map of dynamic extension parameter names to values to pass to associated extensions with <code>PRE_START_DEPLOYMENT</code> actions.</p>
23    pub dynamic_extension_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24}
25impl StartDeploymentInput {
26    /// <p>The application ID.</p>
27    pub fn application_id(&self) -> ::std::option::Option<&str> {
28        self.application_id.as_deref()
29    }
30    /// <p>The environment ID.</p>
31    pub fn environment_id(&self) -> ::std::option::Option<&str> {
32        self.environment_id.as_deref()
33    }
34    /// <p>The deployment strategy ID.</p>
35    pub fn deployment_strategy_id(&self) -> ::std::option::Option<&str> {
36        self.deployment_strategy_id.as_deref()
37    }
38    /// <p>The configuration profile ID.</p>
39    pub fn configuration_profile_id(&self) -> ::std::option::Option<&str> {
40        self.configuration_profile_id.as_deref()
41    }
42    /// <p>The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.</p>
43    pub fn configuration_version(&self) -> ::std::option::Option<&str> {
44        self.configuration_version.as_deref()
45    }
46    /// <p>A description of the deployment.</p>
47    pub fn description(&self) -> ::std::option::Option<&str> {
48        self.description.as_deref()
49    }
50    /// <p>Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>
51    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
52        self.tags.as_ref()
53    }
54    /// <p>The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.</p>
55    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
56        self.kms_key_identifier.as_deref()
57    }
58    /// <p>A map of dynamic extension parameter names to values to pass to associated extensions with <code>PRE_START_DEPLOYMENT</code> actions.</p>
59    pub fn dynamic_extension_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
60        self.dynamic_extension_parameters.as_ref()
61    }
62}
63impl ::std::fmt::Debug for StartDeploymentInput {
64    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
65        let mut formatter = f.debug_struct("StartDeploymentInput");
66        formatter.field("application_id", &self.application_id);
67        formatter.field("environment_id", &self.environment_id);
68        formatter.field("deployment_strategy_id", &self.deployment_strategy_id);
69        formatter.field("configuration_profile_id", &self.configuration_profile_id);
70        formatter.field("configuration_version", &self.configuration_version);
71        formatter.field("description", &self.description);
72        formatter.field("tags", &self.tags);
73        formatter.field("kms_key_identifier", &self.kms_key_identifier);
74        formatter.field("dynamic_extension_parameters", &"*** Sensitive Data Redacted ***");
75        formatter.finish()
76    }
77}
78impl StartDeploymentInput {
79    /// Creates a new builder-style object to manufacture [`StartDeploymentInput`](crate::operation::start_deployment::StartDeploymentInput).
80    pub fn builder() -> crate::operation::start_deployment::builders::StartDeploymentInputBuilder {
81        crate::operation::start_deployment::builders::StartDeploymentInputBuilder::default()
82    }
83}
84
85/// A builder for [`StartDeploymentInput`](crate::operation::start_deployment::StartDeploymentInput).
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
87#[non_exhaustive]
88pub struct StartDeploymentInputBuilder {
89    pub(crate) application_id: ::std::option::Option<::std::string::String>,
90    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
91    pub(crate) deployment_strategy_id: ::std::option::Option<::std::string::String>,
92    pub(crate) configuration_profile_id: ::std::option::Option<::std::string::String>,
93    pub(crate) configuration_version: ::std::option::Option<::std::string::String>,
94    pub(crate) description: ::std::option::Option<::std::string::String>,
95    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
96    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
97    pub(crate) dynamic_extension_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
98}
99impl StartDeploymentInputBuilder {
100    /// <p>The application ID.</p>
101    /// This field is required.
102    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.application_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The application ID.</p>
107    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.application_id = input;
109        self
110    }
111    /// <p>The application ID.</p>
112    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.application_id
114    }
115    /// <p>The environment ID.</p>
116    /// This field is required.
117    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.environment_id = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The environment ID.</p>
122    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.environment_id = input;
124        self
125    }
126    /// <p>The environment ID.</p>
127    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
128        &self.environment_id
129    }
130    /// <p>The deployment strategy ID.</p>
131    /// This field is required.
132    pub fn deployment_strategy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.deployment_strategy_id = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>The deployment strategy ID.</p>
137    pub fn set_deployment_strategy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.deployment_strategy_id = input;
139        self
140    }
141    /// <p>The deployment strategy ID.</p>
142    pub fn get_deployment_strategy_id(&self) -> &::std::option::Option<::std::string::String> {
143        &self.deployment_strategy_id
144    }
145    /// <p>The configuration profile ID.</p>
146    /// This field is required.
147    pub fn configuration_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.configuration_profile_id = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>The configuration profile ID.</p>
152    pub fn set_configuration_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.configuration_profile_id = input;
154        self
155    }
156    /// <p>The configuration profile ID.</p>
157    pub fn get_configuration_profile_id(&self) -> &::std::option::Option<::std::string::String> {
158        &self.configuration_profile_id
159    }
160    /// <p>The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.</p>
161    /// This field is required.
162    pub fn configuration_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.configuration_version = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <p>The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.</p>
167    pub fn set_configuration_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.configuration_version = input;
169        self
170    }
171    /// <p>The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.</p>
172    pub fn get_configuration_version(&self) -> &::std::option::Option<::std::string::String> {
173        &self.configuration_version
174    }
175    /// <p>A description of the deployment.</p>
176    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.description = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>A description of the deployment.</p>
181    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.description = input;
183        self
184    }
185    /// <p>A description of the deployment.</p>
186    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
187        &self.description
188    }
189    /// Adds a key-value pair to `tags`.
190    ///
191    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
192    ///
193    /// <p>Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>
194    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
195        let mut hash_map = self.tags.unwrap_or_default();
196        hash_map.insert(k.into(), v.into());
197        self.tags = ::std::option::Option::Some(hash_map);
198        self
199    }
200    /// <p>Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>
201    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
202        self.tags = input;
203        self
204    }
205    /// <p>Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>
206    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
207        &self.tags
208    }
209    /// <p>The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.</p>
210    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.kms_key_identifier = ::std::option::Option::Some(input.into());
212        self
213    }
214    /// <p>The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.</p>
215    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216        self.kms_key_identifier = input;
217        self
218    }
219    /// <p>The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.</p>
220    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
221        &self.kms_key_identifier
222    }
223    /// Adds a key-value pair to `dynamic_extension_parameters`.
224    ///
225    /// To override the contents of this collection use [`set_dynamic_extension_parameters`](Self::set_dynamic_extension_parameters).
226    ///
227    /// <p>A map of dynamic extension parameter names to values to pass to associated extensions with <code>PRE_START_DEPLOYMENT</code> actions.</p>
228    pub fn dynamic_extension_parameters(
229        mut self,
230        k: impl ::std::convert::Into<::std::string::String>,
231        v: impl ::std::convert::Into<::std::string::String>,
232    ) -> Self {
233        let mut hash_map = self.dynamic_extension_parameters.unwrap_or_default();
234        hash_map.insert(k.into(), v.into());
235        self.dynamic_extension_parameters = ::std::option::Option::Some(hash_map);
236        self
237    }
238    /// <p>A map of dynamic extension parameter names to values to pass to associated extensions with <code>PRE_START_DEPLOYMENT</code> actions.</p>
239    pub fn set_dynamic_extension_parameters(
240        mut self,
241        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
242    ) -> Self {
243        self.dynamic_extension_parameters = input;
244        self
245    }
246    /// <p>A map of dynamic extension parameter names to values to pass to associated extensions with <code>PRE_START_DEPLOYMENT</code> actions.</p>
247    pub fn get_dynamic_extension_parameters(
248        &self,
249    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
250        &self.dynamic_extension_parameters
251    }
252    /// Consumes the builder and constructs a [`StartDeploymentInput`](crate::operation::start_deployment::StartDeploymentInput).
253    pub fn build(
254        self,
255    ) -> ::std::result::Result<crate::operation::start_deployment::StartDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
256        ::std::result::Result::Ok(crate::operation::start_deployment::StartDeploymentInput {
257            application_id: self.application_id,
258            environment_id: self.environment_id,
259            deployment_strategy_id: self.deployment_strategy_id,
260            configuration_profile_id: self.configuration_profile_id,
261            configuration_version: self.configuration_version,
262            description: self.description,
263            tags: self.tags,
264            kms_key_identifier: self.kms_key_identifier,
265            dynamic_extension_parameters: self.dynamic_extension_parameters,
266        })
267    }
268}
269impl ::std::fmt::Debug for StartDeploymentInputBuilder {
270    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
271        let mut formatter = f.debug_struct("StartDeploymentInputBuilder");
272        formatter.field("application_id", &self.application_id);
273        formatter.field("environment_id", &self.environment_id);
274        formatter.field("deployment_strategy_id", &self.deployment_strategy_id);
275        formatter.field("configuration_profile_id", &self.configuration_profile_id);
276        formatter.field("configuration_version", &self.configuration_version);
277        formatter.field("description", &self.description);
278        formatter.field("tags", &self.tags);
279        formatter.field("kms_key_identifier", &self.kms_key_identifier);
280        formatter.field("dynamic_extension_parameters", &"*** Sensitive Data Redacted ***");
281        formatter.finish()
282    }
283}