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 ListComplianceItemsInput {
|
6 + | /// <p>One or more compliance filters. Use a filter to return a more specific list of results.</p>
|
7 + | pub filters: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceStringFilter>>,
|
8 + | /// <p>The ID for the resources from which to get compliance information. Currently, you can only specify one resource ID.</p>
|
9 + | pub resource_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
10 + | /// <p>The type of resource from which to get compliance information. Currently, the only supported resource type is <code>ManagedInstance</code>.</p>
|
11 + | pub resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
12 + | /// <p>A token to start the list. Use this token to get the next set of results.</p>
|
13 + | pub next_token: ::std::option::Option<::std::string::String>,
|
14 + | /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
|
15 + | pub max_results: ::std::option::Option<i32>,
|
16 + | }
|
17 + | impl ListComplianceItemsInput {
|
18 + | /// <p>One or more compliance filters. Use a filter to return a more specific list of results.</p>
|
19 + | ///
|
20 + | /// 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()`.
|
21 + | pub fn filters(&self) -> &[crate::types::ComplianceStringFilter] {
|
22 + | self.filters.as_deref().unwrap_or_default()
|
23 + | }
|
24 + | /// <p>The ID for the resources from which to get compliance information. Currently, you can only specify one resource ID.</p>
|
25 + | ///
|
26 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_ids.is_none()`.
|
27 + | pub fn resource_ids(&self) -> &[::std::string::String] {
|
28 + | self.resource_ids.as_deref().unwrap_or_default()
|
29 + | }
|
30 + | /// <p>The type of resource from which to get compliance information. Currently, the only supported resource type is <code>ManagedInstance</code>.</p>
|
31 + | ///
|
32 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_types.is_none()`.
|
33 + | pub fn resource_types(&self) -> &[::std::string::String] {
|
34 + | self.resource_types.as_deref().unwrap_or_default()
|
35 + | }
|
36 + | /// <p>A token to start the list. Use this token to get the next set of results.</p>
|
37 + | pub fn next_token(&self) -> ::std::option::Option<&str> {
|
38 + | self.next_token.as_deref()
|
39 + | }
|
40 + | /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
|
41 + | pub fn max_results(&self) -> ::std::option::Option<i32> {
|
42 + | self.max_results
|
43 + | }
|
44 + | }
|
45 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_FILTERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
46 + | ::aws_smithy_schema::ShapeId::from_parts(
|
47 + | "com.amazonaws.ssm#ComplianceStringFilterList$member",
|
48 + | "com.amazonaws.ssm",
|
49 + | "ComplianceStringFilterList",
|
50 + | ),
|
51 + | ::aws_smithy_schema::ShapeType::Structure,
|
52 + | "member",
|
53 + | 0,
|
54 + | )
|
55 + | .with_xml_name("ComplianceFilter");
|
56 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
57 + | ::aws_smithy_schema::ShapeId::from_parts(
|
58 + | "com.amazonaws.ssm.synthetic#ListComplianceItemsInput$Filters",
|
59 + | "com.amazonaws.ssm.synthetic",
|
60 + | "ListComplianceItemsInput",
|
61 + | ),
|
62 + | ::aws_smithy_schema::ShapeType::List,
|
63 + | "Filters",
|
64 + | 0,
|
65 + | )
|
66 + | .with_list_member(&LISTCOMPLIANCEITEMSINPUT_MEMBER_FILTERS_MEMBER);
|
67 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_IDS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
68 + | ::aws_smithy_schema::ShapeId::from_parts(
|
69 + | "com.amazonaws.ssm#ComplianceResourceIdList$member",
|
70 + | "com.amazonaws.ssm",
|
71 + | "ComplianceResourceIdList",
|
72 + | ),
|
73 + | ::aws_smithy_schema::ShapeType::String,
|
74 + | "member",
|
75 + | 0,
|
76 + | );
|
77 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_IDS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
78 + | ::aws_smithy_schema::ShapeId::from_parts(
|
79 + | "com.amazonaws.ssm.synthetic#ListComplianceItemsInput$ResourceIds",
|
80 + | "com.amazonaws.ssm.synthetic",
|
81 + | "ListComplianceItemsInput",
|
82 + | ),
|
83 + | ::aws_smithy_schema::ShapeType::List,
|
84 + | "ResourceIds",
|
85 + | 1,
|
86 + | )
|
87 + | .with_list_member(&LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_IDS_MEMBER);
|
88 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
89 + | ::aws_smithy_schema::ShapeId::from_parts(
|
90 + | "com.amazonaws.ssm#ComplianceResourceTypeList$member",
|
91 + | "com.amazonaws.ssm",
|
92 + | "ComplianceResourceTypeList",
|
93 + | ),
|
94 + | ::aws_smithy_schema::ShapeType::String,
|
95 + | "member",
|
96 + | 0,
|
97 + | );
|
98 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
99 + | ::aws_smithy_schema::ShapeId::from_parts(
|
100 + | "com.amazonaws.ssm.synthetic#ListComplianceItemsInput$ResourceTypes",
|
101 + | "com.amazonaws.ssm.synthetic",
|
102 + | "ListComplianceItemsInput",
|
103 + | ),
|
104 + | ::aws_smithy_schema::ShapeType::List,
|
105 + | "ResourceTypes",
|
106 + | 2,
|
107 + | )
|
108 + | .with_list_member(&LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPES_MEMBER);
|
109 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
110 + | ::aws_smithy_schema::ShapeId::from_parts(
|
111 + | "com.amazonaws.ssm.synthetic#ListComplianceItemsInput$NextToken",
|
112 + | "com.amazonaws.ssm.synthetic",
|
113 + | "ListComplianceItemsInput",
|
114 + | ),
|
115 + | ::aws_smithy_schema::ShapeType::String,
|
116 + | "NextToken",
|
117 + | 3,
|
118 + | );
|
119 + | static LISTCOMPLIANCEITEMSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
120 + | ::aws_smithy_schema::ShapeId::from_parts(
|
121 + | "com.amazonaws.ssm.synthetic#ListComplianceItemsInput$MaxResults",
|
122 + | "com.amazonaws.ssm.synthetic",
|
123 + | "ListComplianceItemsInput",
|
124 + | ),
|
125 + | ::aws_smithy_schema::ShapeType::Integer,
|
126 + | "MaxResults",
|
127 + | 4,
|
128 + | );
|
129 + | static LISTCOMPLIANCEITEMSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
130 + | ::aws_smithy_schema::ShapeId::from_parts(
|
131 + | "com.amazonaws.ssm.synthetic#ListComplianceItemsInput",
|
132 + | "com.amazonaws.ssm.synthetic",
|
133 + | "ListComplianceItemsInput",
|
134 + | ),
|
135 + | ::aws_smithy_schema::ShapeType::Structure,
|
136 + | &[
|
137 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_FILTERS,
|
138 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_IDS,
|
139 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPES,
|
140 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_NEXT_TOKEN,
|
141 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_MAX_RESULTS,
|
142 + | ],
|
143 + | )
|
144 + | .with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
|
145 + | .with_original_name("ListComplianceItemsRequest");
|
146 + | impl ListComplianceItemsInput {
|
147 + | /// The schema for this shape.
|
148 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTCOMPLIANCEITEMSINPUT_SCHEMA;
|
149 + | }
|
150 + | impl ::aws_smithy_schema::serde::SerializableStruct for ListComplianceItemsInput {
|
151 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
152 + | fn serialize_members(
|
153 + | &self,
|
154 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
155 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
156 + | if let Some(ref val) = self.filters {
|
157 + | ser.write_list(
|
158 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_FILTERS,
|
159 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
160 + | for item in val {
|
161 + | ser.write_struct(crate::types::ComplianceStringFilter::SCHEMA, item)?;
|
162 + | }
|
163 + | Ok(())
|
164 + | },
|
165 + | )?;
|
166 + | }
|
167 + | if let Some(ref val) = self.resource_ids {
|
168 + | ser.write_list(
|
169 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_IDS,
|
170 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
171 + | for item in val {
|
172 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
173 + | }
|
174 + | Ok(())
|
175 + | },
|
176 + | )?;
|
177 + | }
|
178 + | if let Some(ref val) = self.resource_types {
|
179 + | ser.write_list(
|
180 + | &LISTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPES,
|
181 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
182 + | for item in val {
|
183 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
184 + | }
|
185 + | Ok(())
|
186 + | },
|
187 + | )?;
|
188 + | }
|
189 + | if let Some(ref val) = self.next_token {
|
190 + | ser.write_string(&LISTCOMPLIANCEITEMSINPUT_MEMBER_NEXT_TOKEN, val)?;
|
191 + | }
|
192 + | if let Some(ref val) = self.max_results {
|
193 + | ser.write_integer(&LISTCOMPLIANCEITEMSINPUT_MEMBER_MAX_RESULTS, *val)?;
|
194 + | }
|
195 + | Ok(())
|
196 + | }
|
197 + | }
|
198 + | impl ListComplianceItemsInput {
|
199 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
200 + | pub fn deserialize(
|
201 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
202 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
203 + | #[allow(unused_variables, unused_mut)]
|
204 + | let mut builder = Self::builder();
|
205 + | #[allow(
|
206 + | unused_variables,
|
207 + | unreachable_code,
|
208 + | clippy::single_match,
|
209 + | clippy::match_single_binding,
|
210 + | clippy::diverging_sub_expression
|
211 + | )]
|
212 + | deserializer.read_struct(&LISTCOMPLIANCEITEMSINPUT_SCHEMA, &mut |member, deser| {
|
213 + | match member.member_index() {
|
214 + | Some(0) => {
|
215 + | if deser.is_null() {
|
216 + | deser.read_null()?;
|
217 + | } else {
|
218 + | builder.filters = Some({
|
219 + | let mut container = Vec::new();
|
220 + | deser.read_list(member, &mut |deser| {
|
221 + | container.push(crate::types::ComplianceStringFilter::deserialize(deser)?);
|
222 + | Ok(())
|
223 + | })?;
|
224 + | container
|
225 + | });
|
226 + | }
|
227 + | }
|
228 + | Some(1) => {
|
229 + | if deser.is_null() {
|
230 + | deser.read_null()?;
|
231 + | } else {
|
232 + | builder.resource_ids = Some(deser.read_string_list(member)?);
|
233 + | }
|
234 + | }
|
235 + | Some(2) => {
|
236 + | if deser.is_null() {
|
237 + | deser.read_null()?;
|
238 + | } else {
|
239 + | builder.resource_types = Some(deser.read_string_list(member)?);
|
240 + | }
|
241 + | }
|
242 + | Some(3) => {
|
243 + | if deser.is_null() {
|
244 + | deser.read_null()?;
|
245 + | } else {
|
246 + | builder.next_token = Some(deser.read_string(member)?);
|
247 + | }
|
248 + | }
|
249 + | Some(4) => {
|
250 + | if deser.is_null() {
|
251 + | deser.read_null()?;
|
252 + | } else {
|
253 + | builder.max_results = Some(deser.read_integer(member)?);
|
254 + | }
|
255 + | }
|
256 + | _ => {}
|
257 + | }
|
258 + | Ok(())
|
259 + | })?;
|
260 + | builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
|
261 + | }
|
262 + | }
|
263 + | impl ListComplianceItemsInput {
|
264 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
265 + | pub fn deserialize_with_response(
|
266 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
267 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
268 + | _status: u16,
|
269 + | _body: &[u8],
|
270 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
271 + | Self::deserialize(deserializer)
|
272 + | }
|
273 + | }
|
274 + | impl ListComplianceItemsInput {
|
275 + | /// Creates a new builder-style object to manufacture [`ListComplianceItemsInput`](crate::operation::list_compliance_items::ListComplianceItemsInput).
|
276 + | pub fn builder() -> crate::operation::list_compliance_items::builders::ListComplianceItemsInputBuilder {
|
277 + | crate::operation::list_compliance_items::builders::ListComplianceItemsInputBuilder::default()
|
278 + | }
|
279 + | }
|
280 + |
|
281 + | /// A builder for [`ListComplianceItemsInput`](crate::operation::list_compliance_items::ListComplianceItemsInput).
|
282 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
283 + | #[non_exhaustive]
|
284 + | pub struct ListComplianceItemsInputBuilder {
|
285 + | pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceStringFilter>>,
|
286 + | pub(crate) resource_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
287 + | pub(crate) resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
288 + | pub(crate) next_token: ::std::option::Option<::std::string::String>,
|
289 + | pub(crate) max_results: ::std::option::Option<i32>,
|
290 + | }
|
291 + | impl ListComplianceItemsInputBuilder {
|
292 + | /// Appends an item to `filters`.
|
293 + | ///
|
294 + | /// To override the contents of this collection use [`set_filters`](Self::set_filters).
|
295 + | ///
|
296 + | /// <p>One or more compliance filters. Use a filter to return a more specific list of results.</p>
|
297 + | pub fn filters(mut self, input: crate::types::ComplianceStringFilter) -> Self {
|
298 + | let mut v = self.filters.unwrap_or_default();
|
299 + | v.push(input);
|
300 + | self.filters = ::std::option::Option::Some(v);
|
301 + | self
|
302 + | }
|
303 + | /// <p>One or more compliance filters. Use a filter to return a more specific list of results.</p>
|
304 + | pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceStringFilter>>) -> Self {
|
305 + | self.filters = input;
|
306 + | self
|
307 + | }
|
308 + | /// <p>One or more compliance filters. Use a filter to return a more specific list of results.</p>
|
309 + | pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComplianceStringFilter>> {
|
310 + | &self.filters
|
311 + | }
|
312 + | /// Appends an item to `resource_ids`.
|
313 + | ///
|
314 + | /// To override the contents of this collection use [`set_resource_ids`](Self::set_resource_ids).
|
315 + | ///
|
316 + | /// <p>The ID for the resources from which to get compliance information. Currently, you can only specify one resource ID.</p>
|
317 + | pub fn resource_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
318 + | let mut v = self.resource_ids.unwrap_or_default();
|
319 + | v.push(input.into());
|
320 + | self.resource_ids = ::std::option::Option::Some(v);
|
321 + | self
|
322 + | }
|
323 + | /// <p>The ID for the resources from which to get compliance information. Currently, you can only specify one resource ID.</p>
|
324 + | pub fn set_resource_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
325 + | self.resource_ids = input;
|
326 + | self
|
327 + | }
|
328 + | /// <p>The ID for the resources from which to get compliance information. Currently, you can only specify one resource ID.</p>
|
329 + | pub fn get_resource_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
330 + | &self.resource_ids
|
331 + | }
|
332 + | /// Appends an item to `resource_types`.
|
333 + | ///
|
334 + | /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
|
335 + | ///
|
336 + | /// <p>The type of resource from which to get compliance information. Currently, the only supported resource type is <code>ManagedInstance</code>.</p>
|
337 + | pub fn resource_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
338 + | let mut v = self.resource_types.unwrap_or_default();
|
339 + | v.push(input.into());
|
340 + | self.resource_types = ::std::option::Option::Some(v);
|
341 + | self
|
342 + | }
|
343 + | /// <p>The type of resource from which to get compliance information. Currently, the only supported resource type is <code>ManagedInstance</code>.</p>
|
344 + | pub fn set_resource_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
345 + | self.resource_types = input;
|
346 + | self
|
347 + | }
|
348 + | /// <p>The type of resource from which to get compliance information. Currently, the only supported resource type is <code>ManagedInstance</code>.</p>
|
349 + | pub fn get_resource_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
350 + | &self.resource_types
|
351 + | }
|
352 + | /// <p>A token to start the list. Use this token to get the next set of results.</p>
|
353 + | pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
354 + | self.next_token = ::std::option::Option::Some(input.into());
|
355 + | self
|
356 + | }
|
357 + | /// <p>A token to start the list. Use this token to get the next set of results.</p>
|
358 + | pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
359 + | self.next_token = input;
|
360 + | self
|
361 + | }
|
362 + | /// <p>A token to start the list. Use this token to get the next set of results.</p>
|
363 + | pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
|
364 + | &self.next_token
|
365 + | }
|
366 + | /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
|
367 + | pub fn max_results(mut self, input: i32) -> Self {
|
368 + | self.max_results = ::std::option::Option::Some(input);
|
369 + | self
|
370 + | }
|
371 + | /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
|
372 + | pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
|
373 + | self.max_results = input;
|
374 + | self
|
375 + | }
|
376 + | /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
|
377 + | pub fn get_max_results(&self) -> &::std::option::Option<i32> {
|
378 + | &self.max_results
|
379 + | }
|
380 + | /// Consumes the builder and constructs a [`ListComplianceItemsInput`](crate::operation::list_compliance_items::ListComplianceItemsInput).
|
381 + | pub fn build(
|
382 + | self,
|
383 + | ) -> ::std::result::Result<crate::operation::list_compliance_items::ListComplianceItemsInput, ::aws_smithy_types::error::operation::BuildError>
|
384 + | {
|
385 + | ::std::result::Result::Ok(crate::operation::list_compliance_items::ListComplianceItemsInput {
|
386 + | filters: self.filters,
|
387 + | resource_ids: self.resource_ids,
|
388 + | resource_types: self.resource_types,
|
389 + | next_token: self.next_token,
|
390 + | max_results: self.max_results,
|
391 + | })
|
392 + | }
|
393 + | }
|