1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>The parameters for task execution.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct MaintenanceWindowTaskInvocationParameters {
|
7 + | /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
|
8 + | pub run_command: ::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters>,
|
9 + | /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
|
10 + | pub automation: ::std::option::Option<crate::types::MaintenanceWindowAutomationParameters>,
|
11 + | /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
|
12 + | pub step_functions: ::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters>,
|
13 + | /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
|
14 + | pub lambda: ::std::option::Option<crate::types::MaintenanceWindowLambdaParameters>,
|
15 + | }
|
16 + | impl MaintenanceWindowTaskInvocationParameters {
|
17 + | /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
|
18 + | pub fn run_command(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowRunCommandParameters> {
|
19 + | self.run_command.as_ref()
|
20 + | }
|
21 + | /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
|
22 + | pub fn automation(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowAutomationParameters> {
|
23 + | self.automation.as_ref()
|
24 + | }
|
25 + | /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
|
26 + | pub fn step_functions(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowStepFunctionsParameters> {
|
27 + | self.step_functions.as_ref()
|
28 + | }
|
29 + | /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
|
30 + | pub fn lambda(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowLambdaParameters> {
|
31 + | self.lambda.as_ref()
|
32 + | }
|
33 + | }
|
34 + | static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_RUN_COMMAND: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
35 + | ::aws_smithy_schema::ShapeId::from_parts(
|
36 + | "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$RunCommand",
|
37 + | "com.amazonaws.ssm",
|
38 + | "MaintenanceWindowTaskInvocationParameters",
|
39 + | ),
|
40 + | ::aws_smithy_schema::ShapeType::Structure,
|
41 + | "RunCommand",
|
42 + | 0,
|
43 + | );
|
44 + | static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_AUTOMATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
45 + | ::aws_smithy_schema::ShapeId::from_parts(
|
46 + | "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$Automation",
|
47 + | "com.amazonaws.ssm",
|
48 + | "MaintenanceWindowTaskInvocationParameters",
|
49 + | ),
|
50 + | ::aws_smithy_schema::ShapeType::Structure,
|
51 + | "Automation",
|
52 + | 1,
|
53 + | );
|
54 + | static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_STEP_FUNCTIONS: ::aws_smithy_schema::Schema<'static> =
|
55 + | ::aws_smithy_schema::Schema::new_member(
|
56 + | ::aws_smithy_schema::ShapeId::from_parts(
|
57 + | "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$StepFunctions",
|
58 + | "com.amazonaws.ssm",
|
59 + | "MaintenanceWindowTaskInvocationParameters",
|
60 + | ),
|
61 + | ::aws_smithy_schema::ShapeType::Structure,
|
62 + | "StepFunctions",
|
63 + | 2,
|
64 + | );
|
65 + | static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_LAMBDA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
66 + | ::aws_smithy_schema::ShapeId::from_parts(
|
67 + | "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$Lambda",
|
68 + | "com.amazonaws.ssm",
|
69 + | "MaintenanceWindowTaskInvocationParameters",
|
70 + | ),
|
71 + | ::aws_smithy_schema::ShapeType::Structure,
|
72 + | "Lambda",
|
73 + | 3,
|
74 + | );
|
75 + | static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
76 + | ::aws_smithy_schema::ShapeId::from_parts(
|
77 + | "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters",
|
78 + | "com.amazonaws.ssm",
|
79 + | "MaintenanceWindowTaskInvocationParameters",
|
80 + | ),
|
81 + | ::aws_smithy_schema::ShapeType::Structure,
|
82 + | &[
|
83 + | &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_RUN_COMMAND,
|
84 + | &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_AUTOMATION,
|
85 + | &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_STEP_FUNCTIONS,
|
86 + | &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_LAMBDA,
|
87 + | ],
|
88 + | );
|
89 + | impl MaintenanceWindowTaskInvocationParameters {
|
90 + | /// The schema for this shape.
|
91 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_SCHEMA;
|
92 + | }
|
93 + | impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowTaskInvocationParameters {
|
94 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
95 + | fn serialize_members(
|
96 + | &self,
|
97 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
98 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
99 + | if let Some(ref val) = self.run_command {
|
100 + | ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_RUN_COMMAND, val)?;
|
101 + | }
|
102 + | if let Some(ref val) = self.automation {
|
103 + | ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_AUTOMATION, val)?;
|
104 + | }
|
105 + | if let Some(ref val) = self.step_functions {
|
106 + | ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_STEP_FUNCTIONS, val)?;
|
107 + | }
|
108 + | if let Some(ref val) = self.lambda {
|
109 + | ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_LAMBDA, val)?;
|
110 + | }
|
111 + | Ok(())
|
112 + | }
|
113 + | }
|
114 + | impl MaintenanceWindowTaskInvocationParameters {
|
115 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
116 + | pub fn deserialize(
|
117 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
118 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
119 + | #[allow(unused_variables, unused_mut)]
|
120 + | let mut builder = Self::builder();
|
121 + | #[allow(
|
122 + | unused_variables,
|
123 + | unreachable_code,
|
124 + | clippy::single_match,
|
125 + | clippy::match_single_binding,
|
126 + | clippy::diverging_sub_expression
|
127 + | )]
|
128 + | deserializer.read_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_SCHEMA, &mut |member, deser| {
|
129 + | match member.member_index() {
|
130 + | Some(0) => {
|
131 + | if deser.is_null() {
|
132 + | deser.read_null()?;
|
133 + | } else {
|
134 + | builder.run_command = Some(crate::types::MaintenanceWindowRunCommandParameters::deserialize(deser)?);
|
135 + | }
|
136 + | }
|
137 + | Some(1) => {
|
138 + | if deser.is_null() {
|
139 + | deser.read_null()?;
|
140 + | } else {
|
141 + | builder.automation = Some(crate::types::MaintenanceWindowAutomationParameters::deserialize(deser)?);
|
142 + | }
|
143 + | }
|
144 + | Some(2) => {
|
145 + | if deser.is_null() {
|
146 + | deser.read_null()?;
|
147 + | } else {
|
148 + | builder.step_functions = Some(crate::types::MaintenanceWindowStepFunctionsParameters::deserialize(deser)?);
|
149 + | }
|
150 + | }
|
151 + | Some(3) => {
|
152 + | if deser.is_null() {
|
153 + | deser.read_null()?;
|
154 + | } else {
|
155 + | builder.lambda = Some(crate::types::MaintenanceWindowLambdaParameters::deserialize(deser)?);
|
156 + | }
|
157 + | }
|
158 + | _ => {}
|
159 + | }
|
160 + | Ok(())
|
161 + | })?;
|
162 + | Ok(builder.build())
|
163 + | }
|
164 + | }
|
165 + | impl MaintenanceWindowTaskInvocationParameters {
|
166 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
167 + | pub fn deserialize_with_response(
|
168 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
169 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
170 + | _status: u16,
|
171 + | _body: &[u8],
|
172 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
173 + | Self::deserialize(deserializer)
|
174 + | }
|
175 + | }
|
176 + | impl MaintenanceWindowTaskInvocationParameters {
|
177 + | /// Creates a new builder-style object to manufacture [`MaintenanceWindowTaskInvocationParameters`](crate::types::MaintenanceWindowTaskInvocationParameters).
|
178 + | pub fn builder() -> crate::types::builders::MaintenanceWindowTaskInvocationParametersBuilder {
|
179 + | crate::types::builders::MaintenanceWindowTaskInvocationParametersBuilder::default()
|
180 + | }
|
181 + | }
|
182 + |
|
183 + | /// A builder for [`MaintenanceWindowTaskInvocationParameters`](crate::types::MaintenanceWindowTaskInvocationParameters).
|
184 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
185 + | #[non_exhaustive]
|
186 + | pub struct MaintenanceWindowTaskInvocationParametersBuilder {
|
187 + | pub(crate) run_command: ::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters>,
|
188 + | pub(crate) automation: ::std::option::Option<crate::types::MaintenanceWindowAutomationParameters>,
|
189 + | pub(crate) step_functions: ::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters>,
|
190 + | pub(crate) lambda: ::std::option::Option<crate::types::MaintenanceWindowLambdaParameters>,
|
191 + | }
|
192 + | impl MaintenanceWindowTaskInvocationParametersBuilder {
|
193 + | /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
|
194 + | pub fn run_command(mut self, input: crate::types::MaintenanceWindowRunCommandParameters) -> Self {
|
195 + | self.run_command = ::std::option::Option::Some(input);
|
196 + | self
|
197 + | }
|
198 + | /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
|
199 + | pub fn set_run_command(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters>) -> Self {
|
200 + | self.run_command = input;
|
201 + | self
|
202 + | }
|
203 + | /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
|
204 + | pub fn get_run_command(&self) -> &::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters> {
|
205 + | &self.run_command
|
206 + | }
|
207 + | /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
|
208 + | pub fn automation(mut self, input: crate::types::MaintenanceWindowAutomationParameters) -> Self {
|
209 + | self.automation = ::std::option::Option::Some(input);
|
210 + | self
|
211 + | }
|
212 + | /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
|
213 + | pub fn set_automation(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowAutomationParameters>) -> Self {
|
214 + | self.automation = input;
|
215 + | self
|
216 + | }
|
217 + | /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
|
218 + | pub fn get_automation(&self) -> &::std::option::Option<crate::types::MaintenanceWindowAutomationParameters> {
|
219 + | &self.automation
|
220 + | }
|
221 + | /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
|
222 + | pub fn step_functions(mut self, input: crate::types::MaintenanceWindowStepFunctionsParameters) -> Self {
|
223 + | self.step_functions = ::std::option::Option::Some(input);
|
224 + | self
|
225 + | }
|
226 + | /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
|
227 + | pub fn set_step_functions(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters>) -> Self {
|
228 + | self.step_functions = input;
|
229 + | self
|
230 + | }
|
231 + | /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
|
232 + | pub fn get_step_functions(&self) -> &::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters> {
|
233 + | &self.step_functions
|
234 + | }
|
235 + | /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
|
236 + | pub fn lambda(mut self, input: crate::types::MaintenanceWindowLambdaParameters) -> Self {
|
237 + | self.lambda = ::std::option::Option::Some(input);
|
238 + | self
|
239 + | }
|
240 + | /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
|
241 + | pub fn set_lambda(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowLambdaParameters>) -> Self {
|
242 + | self.lambda = input;
|
243 + | self
|
244 + | }
|
245 + | /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
|
246 + | pub fn get_lambda(&self) -> &::std::option::Option<crate::types::MaintenanceWindowLambdaParameters> {
|
247 + | &self.lambda
|
248 + | }
|
249 + | /// Consumes the builder and constructs a [`MaintenanceWindowTaskInvocationParameters`](crate::types::MaintenanceWindowTaskInvocationParameters).
|
250 + | pub fn build(self) -> crate::types::MaintenanceWindowTaskInvocationParameters {
|
251 + | crate::types::MaintenanceWindowTaskInvocationParameters {
|
252 + | run_command: self.run_command,
|
253 + | automation: self.automation,
|
254 + | step_functions: self.step_functions,
|
255 + | lambda: self.lambda,
|
256 + | }
|
257 + | }
|
258 + | }
|