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