aws_sdk_m2/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 unique identifier of the runtime environment that you want to update.</p>
7 pub environment_id: ::std::option::Option<::std::string::String>,
8 /// <p>The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.</p>
9 pub desired_capacity: ::std::option::Option<i32>,
10 /// <p>The instance type for the runtime environment to update.</p>
11 pub instance_type: ::std::option::Option<::std::string::String>,
12 /// <p>The version of the runtime engine for the runtime environment.</p>
13 pub engine_version: ::std::option::Option<::std::string::String>,
14 /// <p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>.</p>
15 /// <p>If you do not provide a value, a random system-generated value will be assigned.</p>
16 pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
17 /// <p>Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.</p>
18 pub apply_during_maintenance_window: ::std::option::Option<bool>,
19 /// <p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p>
20 /// <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p>
21 /// <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p>
22 pub force_update: ::std::option::Option<bool>,
23}
24impl UpdateEnvironmentInput {
25 /// <p>The unique identifier of the runtime environment that you want to update.</p>
26 pub fn environment_id(&self) -> ::std::option::Option<&str> {
27 self.environment_id.as_deref()
28 }
29 /// <p>The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.</p>
30 pub fn desired_capacity(&self) -> ::std::option::Option<i32> {
31 self.desired_capacity
32 }
33 /// <p>The instance type for the runtime environment to update.</p>
34 pub fn instance_type(&self) -> ::std::option::Option<&str> {
35 self.instance_type.as_deref()
36 }
37 /// <p>The version of the runtime engine for the runtime environment.</p>
38 pub fn engine_version(&self) -> ::std::option::Option<&str> {
39 self.engine_version.as_deref()
40 }
41 /// <p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>.</p>
42 /// <p>If you do not provide a value, a random system-generated value will be assigned.</p>
43 pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
44 self.preferred_maintenance_window.as_deref()
45 }
46 /// <p>Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.</p>
47 pub fn apply_during_maintenance_window(&self) -> ::std::option::Option<bool> {
48 self.apply_during_maintenance_window
49 }
50 /// <p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p>
51 /// <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p>
52 /// <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p>
53 pub fn force_update(&self) -> ::std::option::Option<bool> {
54 self.force_update
55 }
56}
57impl UpdateEnvironmentInput {
58 /// Creates a new builder-style object to manufacture [`UpdateEnvironmentInput`](crate::operation::update_environment::UpdateEnvironmentInput).
59 pub fn builder() -> crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
60 crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder::default()
61 }
62}
63
64/// A builder for [`UpdateEnvironmentInput`](crate::operation::update_environment::UpdateEnvironmentInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct UpdateEnvironmentInputBuilder {
68 pub(crate) environment_id: ::std::option::Option<::std::string::String>,
69 pub(crate) desired_capacity: ::std::option::Option<i32>,
70 pub(crate) instance_type: ::std::option::Option<::std::string::String>,
71 pub(crate) engine_version: ::std::option::Option<::std::string::String>,
72 pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
73 pub(crate) apply_during_maintenance_window: ::std::option::Option<bool>,
74 pub(crate) force_update: ::std::option::Option<bool>,
75}
76impl UpdateEnvironmentInputBuilder {
77 /// <p>The unique identifier of the runtime environment that you want to update.</p>
78 /// This field is required.
79 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.environment_id = ::std::option::Option::Some(input.into());
81 self
82 }
83 /// <p>The unique identifier of the runtime environment that you want to update.</p>
84 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.environment_id = input;
86 self
87 }
88 /// <p>The unique identifier of the runtime environment that you want to update.</p>
89 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
90 &self.environment_id
91 }
92 /// <p>The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.</p>
93 pub fn desired_capacity(mut self, input: i32) -> Self {
94 self.desired_capacity = ::std::option::Option::Some(input);
95 self
96 }
97 /// <p>The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.</p>
98 pub fn set_desired_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
99 self.desired_capacity = input;
100 self
101 }
102 /// <p>The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.</p>
103 pub fn get_desired_capacity(&self) -> &::std::option::Option<i32> {
104 &self.desired_capacity
105 }
106 /// <p>The instance type for the runtime environment to update.</p>
107 pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.instance_type = ::std::option::Option::Some(input.into());
109 self
110 }
111 /// <p>The instance type for the runtime environment to update.</p>
112 pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.instance_type = input;
114 self
115 }
116 /// <p>The instance type for the runtime environment to update.</p>
117 pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
118 &self.instance_type
119 }
120 /// <p>The version of the runtime engine for the runtime environment.</p>
121 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.engine_version = ::std::option::Option::Some(input.into());
123 self
124 }
125 /// <p>The version of the runtime engine for the runtime environment.</p>
126 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.engine_version = input;
128 self
129 }
130 /// <p>The version of the runtime engine for the runtime environment.</p>
131 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
132 &self.engine_version
133 }
134 /// <p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>.</p>
135 /// <p>If you do not provide a value, a random system-generated value will be assigned.</p>
136 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
138 self
139 }
140 /// <p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>.</p>
141 /// <p>If you do not provide a value, a random system-generated value will be assigned.</p>
142 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.preferred_maintenance_window = input;
144 self
145 }
146 /// <p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>.</p>
147 /// <p>If you do not provide a value, a random system-generated value will be assigned.</p>
148 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
149 &self.preferred_maintenance_window
150 }
151 /// <p>Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.</p>
152 pub fn apply_during_maintenance_window(mut self, input: bool) -> Self {
153 self.apply_during_maintenance_window = ::std::option::Option::Some(input);
154 self
155 }
156 /// <p>Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.</p>
157 pub fn set_apply_during_maintenance_window(mut self, input: ::std::option::Option<bool>) -> Self {
158 self.apply_during_maintenance_window = input;
159 self
160 }
161 /// <p>Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.</p>
162 pub fn get_apply_during_maintenance_window(&self) -> &::std::option::Option<bool> {
163 &self.apply_during_maintenance_window
164 }
165 /// <p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p>
166 /// <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p>
167 /// <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p>
168 pub fn force_update(mut self, input: bool) -> Self {
169 self.force_update = ::std::option::Option::Some(input);
170 self
171 }
172 /// <p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p>
173 /// <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p>
174 /// <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p>
175 pub fn set_force_update(mut self, input: ::std::option::Option<bool>) -> Self {
176 self.force_update = input;
177 self
178 }
179 /// <p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p>
180 /// <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p>
181 /// <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p>
182 pub fn get_force_update(&self) -> &::std::option::Option<bool> {
183 &self.force_update
184 }
185 /// Consumes the builder and constructs a [`UpdateEnvironmentInput`](crate::operation::update_environment::UpdateEnvironmentInput).
186 pub fn build(
187 self,
188 ) -> ::std::result::Result<crate::operation::update_environment::UpdateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
189 ::std::result::Result::Ok(crate::operation::update_environment::UpdateEnvironmentInput {
190 environment_id: self.environment_id,
191 desired_capacity: self.desired_capacity,
192 instance_type: self.instance_type,
193 engine_version: self.engine_version,
194 preferred_maintenance_window: self.preferred_maintenance_window,
195 apply_during_maintenance_window: self.apply_during_maintenance_window,
196 force_update: self.force_update,
197 })
198 }
199}