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)]
|
5 + | pub struct DescribeInstancePatchesInput {
|
6 + | /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
|
7 + | pub instance_id: ::std::option::Option<::std::string::String>,
|
8 + | /// <p>Each element in the array is a structure containing a key-value pair.</p>
|
9 + | /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
|
10 + | /// <ul>
|
11 + | /// <li>
|
12 + | /// <p><b> <code>Classification</code> </b></p>
|
13 + | /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
|
14 + | /// <li>
|
15 + | /// <p><b> <code>KBId</code> </b></p>
|
16 + | /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
|
17 + | /// <li>
|
18 + | /// <p><b> <code>Severity</code> </b></p>
|
19 + | /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
|
20 + | /// <li>
|
21 + | /// <p><b> <code>State</code> </b></p>
|
22 + | /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
|
23 + | /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
|
24 + | /// </ul>
|
25 + | pub filters: ::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>>,
|
26 + | /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
|
27 + | pub next_token: ::std::option::Option<::std::string::String>,
|
28 + | /// <p>The maximum number of patches to return (per page).</p>
|
29 + | pub max_results: ::std::option::Option<i32>,
|
30 + | }
|
31 + | impl DescribeInstancePatchesInput {
|
32 + | /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
|
33 + | pub fn instance_id(&self) -> ::std::option::Option<&str> {
|
34 + | self.instance_id.as_deref()
|
35 + | }
|
36 + | /// <p>Each element in the array is a structure containing a key-value pair.</p>
|
37 + | /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
|
38 + | /// <ul>
|
39 + | /// <li>
|
40 + | /// <p><b> <code>Classification</code> </b></p>
|
41 + | /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
|
42 + | /// <li>
|
43 + | /// <p><b> <code>KBId</code> </b></p>
|
44 + | /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
|
45 + | /// <li>
|
46 + | /// <p><b> <code>Severity</code> </b></p>
|
47 + | /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
|
48 + | /// <li>
|
49 + | /// <p><b> <code>State</code> </b></p>
|
50 + | /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
|
51 + | /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
|
52 + | /// </ul>
|
53 + | ///
|
54 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
|
55 + | pub fn filters(&self) -> &[crate::types::PatchOrchestratorFilter] {
|
56 + | self.filters.as_deref().unwrap_or_default()
|
57 + | }
|
58 + | /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
|
59 + | pub fn next_token(&self) -> ::std::option::Option<&str> {
|
60 + | self.next_token.as_deref()
|
61 + | }
|
62 + | /// <p>The maximum number of patches to return (per page).</p>
|
63 + | pub fn max_results(&self) -> ::std::option::Option<i32> {
|
64 + | self.max_results
|
65 + | }
|
66 + | }
|
67 + | static DESCRIBEINSTANCEPATCHESINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
68 + | ::aws_smithy_schema::ShapeId::from_parts(
|
69 + | "com.amazonaws.ssm.synthetic#DescribeInstancePatchesInput$InstanceId",
|
70 + | "com.amazonaws.ssm.synthetic",
|
71 + | "DescribeInstancePatchesInput",
|
72 + | ),
|
73 + | ::aws_smithy_schema::ShapeType::String,
|
74 + | "InstanceId",
|
75 + | 0,
|
76 + | );
|
77 + | static DESCRIBEINSTANCEPATCHESINPUT_MEMBER_FILTERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
78 + | ::aws_smithy_schema::ShapeId::from_parts(
|
79 + | "com.amazonaws.ssm#PatchOrchestratorFilterList$member",
|
80 + | "com.amazonaws.ssm",
|
81 + | "PatchOrchestratorFilterList",
|
82 + | ),
|
83 + | ::aws_smithy_schema::ShapeType::Structure,
|
84 + | "member",
|
85 + | 0,
|
86 + | );
|
87 + | static DESCRIBEINSTANCEPATCHESINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
88 + | ::aws_smithy_schema::ShapeId::from_parts(
|
89 + | "com.amazonaws.ssm.synthetic#DescribeInstancePatchesInput$Filters",
|
90 + | "com.amazonaws.ssm.synthetic",
|
91 + | "DescribeInstancePatchesInput",
|
92 + | ),
|
93 + | ::aws_smithy_schema::ShapeType::List,
|
94 + | "Filters",
|
95 + | 1,
|
96 + | )
|
97 + | .with_list_member(&DESCRIBEINSTANCEPATCHESINPUT_MEMBER_FILTERS_MEMBER);
|
98 + | static DESCRIBEINSTANCEPATCHESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
99 + | ::aws_smithy_schema::ShapeId::from_parts(
|
100 + | "com.amazonaws.ssm.synthetic#DescribeInstancePatchesInput$NextToken",
|
101 + | "com.amazonaws.ssm.synthetic",
|
102 + | "DescribeInstancePatchesInput",
|
103 + | ),
|
104 + | ::aws_smithy_schema::ShapeType::String,
|
105 + | "NextToken",
|
106 + | 2,
|
107 + | );
|
108 + | static DESCRIBEINSTANCEPATCHESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
109 + | ::aws_smithy_schema::ShapeId::from_parts(
|
110 + | "com.amazonaws.ssm.synthetic#DescribeInstancePatchesInput$MaxResults",
|
111 + | "com.amazonaws.ssm.synthetic",
|
112 + | "DescribeInstancePatchesInput",
|
113 + | ),
|
114 + | ::aws_smithy_schema::ShapeType::Integer,
|
115 + | "MaxResults",
|
116 + | 3,
|
117 + | );
|
118 + | static DESCRIBEINSTANCEPATCHESINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
119 + | ::aws_smithy_schema::ShapeId::from_parts(
|
120 + | "com.amazonaws.ssm.synthetic#DescribeInstancePatchesInput",
|
121 + | "com.amazonaws.ssm.synthetic",
|
122 + | "DescribeInstancePatchesInput",
|
123 + | ),
|
124 + | ::aws_smithy_schema::ShapeType::Structure,
|
125 + | &[
|
126 + | &DESCRIBEINSTANCEPATCHESINPUT_MEMBER_INSTANCE_ID,
|
127 + | &DESCRIBEINSTANCEPATCHESINPUT_MEMBER_FILTERS,
|
128 + | &DESCRIBEINSTANCEPATCHESINPUT_MEMBER_NEXT_TOKEN,
|
129 + | &DESCRIBEINSTANCEPATCHESINPUT_MEMBER_MAX_RESULTS,
|
130 + | ],
|
131 + | )
|
132 + | .with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
|
133 + | .with_original_name("DescribeInstancePatchesRequest");
|
134 + | impl DescribeInstancePatchesInput {
|
135 + | /// The schema for this shape.
|
136 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEINSTANCEPATCHESINPUT_SCHEMA;
|
137 + | }
|
138 + | impl ::aws_smithy_schema::serde::SerializableStruct for DescribeInstancePatchesInput {
|
139 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
140 + | fn serialize_members(
|
141 + | &self,
|
142 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
143 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
144 + | if let Some(ref val) = self.instance_id {
|
145 + | ser.write_string(&DESCRIBEINSTANCEPATCHESINPUT_MEMBER_INSTANCE_ID, val)?;
|
146 + | }
|
147 + | if let Some(ref val) = self.filters {
|
148 + | ser.write_list(
|
149 + | &DESCRIBEINSTANCEPATCHESINPUT_MEMBER_FILTERS,
|
150 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
151 + | for item in val {
|
152 + | ser.write_struct(crate::types::PatchOrchestratorFilter::SCHEMA, item)?;
|
153 + | }
|
154 + | Ok(())
|
155 + | },
|
156 + | )?;
|
157 + | }
|
158 + | if let Some(ref val) = self.next_token {
|
159 + | ser.write_string(&DESCRIBEINSTANCEPATCHESINPUT_MEMBER_NEXT_TOKEN, val)?;
|
160 + | }
|
161 + | if let Some(ref val) = self.max_results {
|
162 + | ser.write_integer(&DESCRIBEINSTANCEPATCHESINPUT_MEMBER_MAX_RESULTS, *val)?;
|
163 + | }
|
164 + | Ok(())
|
165 + | }
|
166 + | }
|
167 + | impl DescribeInstancePatchesInput {
|
168 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
169 + | pub fn deserialize(
|
170 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
171 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
172 + | #[allow(unused_variables, unused_mut)]
|
173 + | let mut builder = Self::builder();
|
174 + | #[allow(
|
175 + | unused_variables,
|
176 + | unreachable_code,
|
177 + | clippy::single_match,
|
178 + | clippy::match_single_binding,
|
179 + | clippy::diverging_sub_expression
|
180 + | )]
|
181 + | deserializer.read_struct(&DESCRIBEINSTANCEPATCHESINPUT_SCHEMA, &mut |member, deser| {
|
182 + | match member.member_index() {
|
183 + | Some(0) => {
|
184 + | if deser.is_null() {
|
185 + | deser.read_null()?;
|
186 + | } else {
|
187 + | builder.instance_id = Some(deser.read_string(member)?);
|
188 + | }
|
189 + | }
|
190 + | Some(1) => {
|
191 + | if deser.is_null() {
|
192 + | deser.read_null()?;
|
193 + | } else {
|
194 + | builder.filters = Some({
|
195 + | let mut container = Vec::new();
|
196 + | deser.read_list(member, &mut |deser| {
|
197 + | container.push(crate::types::PatchOrchestratorFilter::deserialize(deser)?);
|
198 + | Ok(())
|
199 + | })?;
|
200 + | container
|
201 + | });
|
202 + | }
|
203 + | }
|
204 + | Some(2) => {
|
205 + | if deser.is_null() {
|
206 + | deser.read_null()?;
|
207 + | } else {
|
208 + | builder.next_token = Some(deser.read_string(member)?);
|
209 + | }
|
210 + | }
|
211 + | Some(3) => {
|
212 + | if deser.is_null() {
|
213 + | deser.read_null()?;
|
214 + | } else {
|
215 + | builder.max_results = Some(deser.read_integer(member)?);
|
216 + | }
|
217 + | }
|
218 + | _ => {}
|
219 + | }
|
220 + | Ok(())
|
221 + | })?;
|
222 + | builder.instance_id = builder.instance_id.or(Some(String::new()));
|
223 + | builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
|
224 + | }
|
225 + | }
|
226 + | impl DescribeInstancePatchesInput {
|
227 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
228 + | pub fn deserialize_with_response(
|
229 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
230 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
231 + | _status: u16,
|
232 + | _body: &[u8],
|
233 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
234 + | Self::deserialize(deserializer)
|
235 + | }
|
236 + | }
|
237 + | impl DescribeInstancePatchesInput {
|
238 + | /// Creates a new builder-style object to manufacture [`DescribeInstancePatchesInput`](crate::operation::describe_instance_patches::DescribeInstancePatchesInput).
|
239 + | pub fn builder() -> crate::operation::describe_instance_patches::builders::DescribeInstancePatchesInputBuilder {
|
240 + | crate::operation::describe_instance_patches::builders::DescribeInstancePatchesInputBuilder::default()
|
241 + | }
|
242 + | }
|
243 + |
|
244 + | /// A builder for [`DescribeInstancePatchesInput`](crate::operation::describe_instance_patches::DescribeInstancePatchesInput).
|
245 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
246 + | #[non_exhaustive]
|
247 + | pub struct DescribeInstancePatchesInputBuilder {
|
248 + | pub(crate) instance_id: ::std::option::Option<::std::string::String>,
|
249 + | pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>>,
|
250 + | pub(crate) next_token: ::std::option::Option<::std::string::String>,
|
251 + | pub(crate) max_results: ::std::option::Option<i32>,
|
252 + | }
|
253 + | impl DescribeInstancePatchesInputBuilder {
|
254 + | /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
|
255 + | /// This field is required.
|
256 + | pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
257 + | self.instance_id = ::std::option::Option::Some(input.into());
|
258 + | self
|
259 + | }
|
260 + | /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
|
261 + | pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
262 + | self.instance_id = input;
|
263 + | self
|
264 + | }
|
265 + | /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
|
266 + | pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
|
267 + | &self.instance_id
|
268 + | }
|
269 + | /// Appends an item to `filters`.
|
270 + | ///
|
271 + | /// To override the contents of this collection use [`set_filters`](Self::set_filters).
|
272 + | ///
|
273 + | /// <p>Each element in the array is a structure containing a key-value pair.</p>
|
274 + | /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
|
275 + | /// <ul>
|
276 + | /// <li>
|
277 + | /// <p><b> <code>Classification</code> </b></p>
|
278 + | /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
|
279 + | /// <li>
|
280 + | /// <p><b> <code>KBId</code> </b></p>
|
281 + | /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
|
282 + | /// <li>
|
283 + | /// <p><b> <code>Severity</code> </b></p>
|
284 + | /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
|
285 + | /// <li>
|
286 + | /// <p><b> <code>State</code> </b></p>
|
287 + | /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
|
288 + | /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
|
289 + | /// </ul>
|
290 + | pub fn filters(mut self, input: crate::types::PatchOrchestratorFilter) -> Self {
|
291 + | let mut v = self.filters.unwrap_or_default();
|
292 + | v.push(input);
|
293 + | self.filters = ::std::option::Option::Some(v);
|
294 + | self
|
295 + | }
|
296 + | /// <p>Each element in the array is a structure containing a key-value pair.</p>
|
297 + | /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
|
298 + | /// <ul>
|
299 + | /// <li>
|
300 + | /// <p><b> <code>Classification</code> </b></p>
|
301 + | /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
|
302 + | /// <li>
|
303 + | /// <p><b> <code>KBId</code> </b></p>
|
304 + | /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
|
305 + | /// <li>
|
306 + | /// <p><b> <code>Severity</code> </b></p>
|
307 + | /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
|
308 + | /// <li>
|
309 + | /// <p><b> <code>State</code> </b></p>
|
310 + | /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
|
311 + | /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
|
312 + | /// </ul>
|
313 + | pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>>) -> Self {
|
314 + | self.filters = input;
|
315 + | self
|
316 + | }
|
317 + | /// <p>Each element in the array is a structure containing a key-value pair.</p>
|
318 + | /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
|
319 + | /// <ul>
|
320 + | /// <li>
|
321 + | /// <p><b> <code>Classification</code> </b></p>
|
322 + | /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
|
323 + | /// <li>
|
324 + | /// <p><b> <code>KBId</code> </b></p>
|
325 + | /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
|
326 + | /// <li>
|
327 + | /// <p><b> <code>Severity</code> </b></p>
|
328 + | /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
|
329 + | /// <li>
|
330 + | /// <p><b> <code>State</code> </b></p>
|
331 + | /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
|
332 + | /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
|
333 + | /// </ul>
|
334 + | pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>> {
|
335 + | &self.filters
|
336 + | }
|
337 + | /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
|
338 + | pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
339 + | self.next_token = ::std::option::Option::Some(input.into());
|
340 + | self
|
341 + | }
|
342 + | /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
|
343 + | pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
344 + | self.next_token = input;
|
345 + | self
|
346 + | }
|
347 + | /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
|
348 + | pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
|
349 + | &self.next_token
|
350 + | }
|
351 + | /// <p>The maximum number of patches to return (per page).</p>
|
352 + | pub fn max_results(mut self, input: i32) -> Self {
|
353 + | self.max_results = ::std::option::Option::Some(input);
|
354 + | self
|
355 + | }
|
356 + | /// <p>The maximum number of patches to return (per page).</p>
|
357 + | pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
|
358 + | self.max_results = input;
|
359 + | self
|
360 + | }
|
361 + | /// <p>The maximum number of patches to return (per page).</p>
|
362 + | pub fn get_max_results(&self) -> &::std::option::Option<i32> {
|
363 + | &self.max_results
|
364 + | }
|
365 + | /// Consumes the builder and constructs a [`DescribeInstancePatchesInput`](crate::operation::describe_instance_patches::DescribeInstancePatchesInput).
|
366 + | pub fn build(
|
367 + | self,
|
368 + | ) -> ::std::result::Result<
|
369 + | crate::operation::describe_instance_patches::DescribeInstancePatchesInput,
|
370 + | ::aws_smithy_types::error::operation::BuildError,
|
371 + | > {
|
372 + | ::std::result::Result::Ok(crate::operation::describe_instance_patches::DescribeInstancePatchesInput {
|
373 + | instance_id: self.instance_id,
|
374 + | filters: self.filters,
|
375 + | next_token: self.next_token,
|
376 + | max_results: self.max_results,
|
377 + | })
|
378 + | }
|
379 + | }
|