AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_command_invocations/_list_command_invocations_input.rs

@@ -0,1 +0,379 @@
           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  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_command_invocations/_list_command_invocations_output.rs

@@ -0,1 +0,273 @@
           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 ListCommandInvocationsOutput {
           6  +
    /// <p>(Optional) A list of all invocations.</p>
           7  +
    pub command_invocations: ::std::option::Option<::std::vec::Vec<crate::types::CommandInvocation>>,
           8  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
           9  +
    pub next_token: ::std::option::Option<::std::string::String>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl ListCommandInvocationsOutput {
          13  +
    /// <p>(Optional) A list of all invocations.</p>
          14  +
    ///
          15  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.command_invocations.is_none()`.
          16  +
    pub fn command_invocations(&self) -> &[crate::types::CommandInvocation] {
          17  +
        self.command_invocations.as_deref().unwrap_or_default()
          18  +
    }
          19  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
          20  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          21  +
        self.next_token.as_deref()
          22  +
    }
          23  +
}
          24  +
static LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_COMMAND_INVOCATIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          25  +
    ::aws_smithy_schema::ShapeId::from_parts(
          26  +
        "com.amazonaws.ssm#CommandInvocationList$member",
          27  +
        "com.amazonaws.ssm",
          28  +
        "CommandInvocationList",
          29  +
    ),
          30  +
    ::aws_smithy_schema::ShapeType::Structure,
          31  +
    "member",
          32  +
    0,
          33  +
);
          34  +
static LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_COMMAND_INVOCATIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          35  +
    ::aws_smithy_schema::ShapeId::from_parts(
          36  +
        "com.amazonaws.ssm.synthetic#ListCommandInvocationsOutput$CommandInvocations",
          37  +
        "com.amazonaws.ssm.synthetic",
          38  +
        "ListCommandInvocationsOutput",
          39  +
    ),
          40  +
    ::aws_smithy_schema::ShapeType::List,
          41  +
    "CommandInvocations",
          42  +
    0,
          43  +
)
          44  +
.with_list_member(&LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_COMMAND_INVOCATIONS_MEMBER);
          45  +
static LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts(
          47  +
        "com.amazonaws.ssm.synthetic#ListCommandInvocationsOutput$NextToken",
          48  +
        "com.amazonaws.ssm.synthetic",
          49  +
        "ListCommandInvocationsOutput",
          50  +
    ),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "NextToken",
          53  +
    1,
          54  +
);
          55  +
static LISTCOMMANDINVOCATIONSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          57  +
    ::aws_smithy_schema::ShapeType::String,
          58  +
    "request_id",
          59  +
    2,
          60  +
)
          61  +
.with_http_header("x-amzn-requestid");
          62  +
static LISTCOMMANDINVOCATIONSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm.synthetic#ListCommandInvocationsOutput",
          65  +
        "com.amazonaws.ssm.synthetic",
          66  +
        "ListCommandInvocationsOutput",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::Structure,
          69  +
    &[
          70  +
        &LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_COMMAND_INVOCATIONS,
          71  +
        &LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_NEXT_TOKEN,
          72  +
        &LISTCOMMANDINVOCATIONSOUTPUT_MEMBER__REQUEST_ID,
          73  +
    ],
          74  +
)
          75  +
.with_original_name("ListCommandInvocationsResult");
          76  +
impl ListCommandInvocationsOutput {
          77  +
    /// The schema for this shape.
          78  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTCOMMANDINVOCATIONSOUTPUT_SCHEMA;
          79  +
}
          80  +
impl ::aws_smithy_schema::serde::SerializableStruct for ListCommandInvocationsOutput {
          81  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          82  +
    fn serialize_members(
          83  +
        &self,
          84  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          85  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          86  +
        if let Some(ref val) = self.command_invocations {
          87  +
            ser.write_list(
          88  +
                &LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_COMMAND_INVOCATIONS,
          89  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          90  +
                    for item in val {
          91  +
                        ser.write_struct(crate::types::CommandInvocation::SCHEMA, item)?;
          92  +
                    }
          93  +
                    Ok(())
          94  +
                },
          95  +
            )?;
          96  +
        }
          97  +
        if let Some(ref val) = self.next_token {
          98  +
            ser.write_string(&LISTCOMMANDINVOCATIONSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
          99  +
        }
         100  +
        Ok(())
         101  +
    }
         102  +
}
         103  +
impl ListCommandInvocationsOutput {
         104  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         105  +
    pub fn deserialize(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         107  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         108  +
        #[allow(unused_variables, unused_mut)]
         109  +
        let mut builder = Self::builder();
         110  +
        #[allow(
         111  +
            unused_variables,
         112  +
            unreachable_code,
         113  +
            clippy::single_match,
         114  +
            clippy::match_single_binding,
         115  +
            clippy::diverging_sub_expression
         116  +
        )]
         117  +
        deserializer.read_struct(&LISTCOMMANDINVOCATIONSOUTPUT_SCHEMA, &mut |member, deser| {
         118  +
            match member.member_index() {
         119  +
                Some(0) => {
         120  +
                    if deser.is_null() {
         121  +
                        deser.read_null()?;
         122  +
                    } else {
         123  +
                        builder.command_invocations = Some({
         124  +
                            let mut container = Vec::new();
         125  +
                            deser.read_list(member, &mut |deser| {
         126  +
                                container.push(crate::types::CommandInvocation::deserialize(deser)?);
         127  +
                                Ok(())
         128  +
                            })?;
         129  +
                            container
         130  +
                        });
         131  +
                    }
         132  +
                }
         133  +
                Some(1) => {
         134  +
                    if deser.is_null() {
         135  +
                        deser.read_null()?;
         136  +
                    } else {
         137  +
                        builder.next_token = Some(deser.read_string(member)?);
         138  +
                    }
         139  +
                }
         140  +
                Some(2) => {
         141  +
                    builder._request_id = Some(deser.read_string(member)?);
         142  +
                }
         143  +
                _ => {}
         144  +
            }
         145  +
            Ok(())
         146  +
        })?;
         147  +
        Ok(builder.build())
         148  +
    }
         149  +
}
         150  +
impl ListCommandInvocationsOutput {
         151  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         152  +
    /// Header-bound members are read directly from headers, avoiding runtime
         153  +
    /// member iteration overhead. Body members are read via the deserializer.
         154  +
    pub fn deserialize_with_response(
         155  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         156  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         157  +
        _status: u16,
         158  +
        _body: &[u8],
         159  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         160  +
        #[allow(unused_variables, unused_mut)]
         161  +
        let mut builder = Self::builder();
         162  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         163  +
            builder._request_id = Some(val.to_string());
         164  +
        }
         165  +
         166  +
        #[allow(
         167  +
            unused_variables,
         168  +
            unreachable_code,
         169  +
            clippy::single_match,
         170  +
            clippy::match_single_binding,
         171  +
            clippy::diverging_sub_expression
         172  +
        )]
         173  +
        deserializer.read_struct(&LISTCOMMANDINVOCATIONSOUTPUT_SCHEMA, &mut |member, deser| {
         174  +
            match member.member_index() {
         175  +
                Some(0) => {
         176  +
                    builder.command_invocations = Some({
         177  +
                        let mut container = Vec::new();
         178  +
                        deser.read_list(member, &mut |deser| {
         179  +
                            container.push(crate::types::CommandInvocation::deserialize(deser)?);
         180  +
                            Ok(())
         181  +
                        })?;
         182  +
                        container
         183  +
                    });
         184  +
                }
         185  +
                Some(1) => {
         186  +
                    builder.next_token = Some(deser.read_string(member)?);
         187  +
                }
         188  +
                _ => {}
         189  +
            }
         190  +
            Ok(())
         191  +
        })?;
         192  +
        Ok(builder.build())
         193  +
    }
         194  +
}
         195  +
impl ::aws_types::request_id::RequestId for ListCommandInvocationsOutput {
         196  +
    fn request_id(&self) -> Option<&str> {
         197  +
        self._request_id.as_deref()
         198  +
    }
         199  +
}
         200  +
impl ListCommandInvocationsOutput {
         201  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         202  +
        self._request_id = request_id;
         203  +
        self
         204  +
    }
         205  +
}
         206  +
impl ListCommandInvocationsOutput {
         207  +
    /// Creates a new builder-style object to manufacture [`ListCommandInvocationsOutput`](crate::operation::list_command_invocations::ListCommandInvocationsOutput).
         208  +
    pub fn builder() -> crate::operation::list_command_invocations::builders::ListCommandInvocationsOutputBuilder {
         209  +
        crate::operation::list_command_invocations::builders::ListCommandInvocationsOutputBuilder::default()
         210  +
    }
         211  +
}
         212  +
         213  +
/// A builder for [`ListCommandInvocationsOutput`](crate::operation::list_command_invocations::ListCommandInvocationsOutput).
         214  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         215  +
#[non_exhaustive]
         216  +
pub struct ListCommandInvocationsOutputBuilder {
         217  +
    pub(crate) command_invocations: ::std::option::Option<::std::vec::Vec<crate::types::CommandInvocation>>,
         218  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         219  +
    _request_id: Option<String>,
         220  +
}
         221  +
impl ListCommandInvocationsOutputBuilder {
         222  +
    /// Appends an item to `command_invocations`.
         223  +
    ///
         224  +
    /// To override the contents of this collection use [`set_command_invocations`](Self::set_command_invocations).
         225  +
    ///
         226  +
    /// <p>(Optional) A list of all invocations.</p>
         227  +
    pub fn command_invocations(mut self, input: crate::types::CommandInvocation) -> Self {
         228  +
        let mut v = self.command_invocations.unwrap_or_default();
         229  +
        v.push(input);
         230  +
        self.command_invocations = ::std::option::Option::Some(v);
         231  +
        self
         232  +
    }
         233  +
    /// <p>(Optional) A list of all invocations.</p>
         234  +
    pub fn set_command_invocations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CommandInvocation>>) -> Self {
         235  +
        self.command_invocations = input;
         236  +
        self
         237  +
    }
         238  +
    /// <p>(Optional) A list of all invocations.</p>
         239  +
    pub fn get_command_invocations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CommandInvocation>> {
         240  +
        &self.command_invocations
         241  +
    }
         242  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
         243  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         244  +
        self.next_token = ::std::option::Option::Some(input.into());
         245  +
        self
         246  +
    }
         247  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
         248  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         249  +
        self.next_token = input;
         250  +
        self
         251  +
    }
         252  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
         253  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         254  +
        &self.next_token
         255  +
    }
         256  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         257  +
        self._request_id = Some(request_id.into());
         258  +
        self
         259  +
    }
         260  +
         261  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         262  +
        self._request_id = request_id;
         263  +
        self
         264  +
    }
         265  +
    /// Consumes the builder and constructs a [`ListCommandInvocationsOutput`](crate::operation::list_command_invocations::ListCommandInvocationsOutput).
         266  +
    pub fn build(self) -> crate::operation::list_command_invocations::ListCommandInvocationsOutput {
         267  +
        crate::operation::list_command_invocations::ListCommandInvocationsOutput {
         268  +
            command_invocations: self.command_invocations,
         269  +
            next_token: self.next_token,
         270  +
            _request_id: self._request_id,
         271  +
        }
         272  +
    }
         273  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_command_invocations/builders.rs

@@ -0,1 +0,206 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::list_command_invocations::_list_command_invocations_input::ListCommandInvocationsInputBuilder;
           3  +
           4  +
pub use crate::operation::list_command_invocations::_list_command_invocations_output::ListCommandInvocationsOutputBuilder;
           5  +
           6  +
impl crate::operation::list_command_invocations::builders::ListCommandInvocationsInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::list_command_invocations::ListCommandInvocationsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_command_invocations::ListCommandInvocationsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_command_invocations();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListCommandInvocations`.
          24  +
///
          25  +
/// <p>An invocation is copy of a command sent to a specific managed node. A command can apply to one or more managed nodes. A command invocation applies to one managed node. For example, if a user runs <code>SendCommand</code> against three managed nodes, then a command invocation is created for each requested managed node ID. <code>ListCommandInvocations</code> provide status about command execution.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListCommandInvocationsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_command_invocations::builders::ListCommandInvocationsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_command_invocations::ListCommandInvocationsOutput,
          35  +
        crate::operation::list_command_invocations::ListCommandInvocationsError,
          36  +
    > for ListCommandInvocationsFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::list_command_invocations::ListCommandInvocationsOutput,
          44  +
            crate::operation::list_command_invocations::ListCommandInvocationsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListCommandInvocationsFluentBuilder {
          51  +
    /// Creates a new `ListCommandInvocationsFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the ListCommandInvocations as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_command_invocations::builders::ListCommandInvocationsInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::list_command_invocations::ListCommandInvocationsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_command_invocations::ListCommandInvocationsError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::list_command_invocations::ListCommandInvocations::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_command_invocations::ListCommandInvocations::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::list_command_invocations::ListCommandInvocationsOutput,
          97  +
        crate::operation::list_command_invocations::ListCommandInvocationsError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// Create a paginator for this request
         112  +
    ///
         113  +
    /// Paginators are used by calling [`send().await`](crate::operation::list_command_invocations::paginator::ListCommandInvocationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::list_command_invocations::paginator::ListCommandInvocationsPaginator {
         115  +
        crate::operation::list_command_invocations::paginator::ListCommandInvocationsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    /// <p>(Optional) The invocations for a specific command ID.</p>
         118  +
    pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.command_id(input.into());
         120  +
        self
         121  +
    }
         122  +
    /// <p>(Optional) The invocations for a specific command ID.</p>
         123  +
    pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         124  +
        self.inner = self.inner.set_command_id(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>(Optional) The invocations for a specific command ID.</p>
         128  +
    pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
         129  +
        self.inner.get_command_id()
         130  +
    }
         131  +
    /// <p>(Optional) The command execution details for a specific managed node ID.</p>
         132  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         133  +
        self.inner = self.inner.instance_id(input.into());
         134  +
        self
         135  +
    }
         136  +
    /// <p>(Optional) The command execution details for a specific managed node ID.</p>
         137  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         138  +
        self.inner = self.inner.set_instance_id(input);
         139  +
        self
         140  +
    }
         141  +
    /// <p>(Optional) The command execution details for a specific managed node ID.</p>
         142  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         143  +
        self.inner.get_instance_id()
         144  +
    }
         145  +
    /// <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>
         146  +
    pub fn max_results(mut self, input: i32) -> Self {
         147  +
        self.inner = self.inner.max_results(input);
         148  +
        self
         149  +
    }
         150  +
    /// <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>
         151  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         152  +
        self.inner = self.inner.set_max_results(input);
         153  +
        self
         154  +
    }
         155  +
    /// <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>
         156  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         157  +
        self.inner.get_max_results()
         158  +
    }
         159  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
         160  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         161  +
        self.inner = self.inner.next_token(input.into());
         162  +
        self
         163  +
    }
         164  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
         165  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         166  +
        self.inner = self.inner.set_next_token(input);
         167  +
        self
         168  +
    }
         169  +
    /// <p>(Optional) The token for the next set of items to return. (You received this token from a previous call.)</p>
         170  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         171  +
        self.inner.get_next_token()
         172  +
    }
         173  +
    ///
         174  +
    /// Appends an item to `Filters`.
         175  +
    ///
         176  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         177  +
    ///
         178  +
    /// <p>(Optional) One or more filters. Use a filter to return a more specific list of results.</p>
         179  +
    pub fn filters(mut self, input: crate::types::CommandFilter) -> Self {
         180  +
        self.inner = self.inner.filters(input);
         181  +
        self
         182  +
    }
         183  +
    /// <p>(Optional) One or more filters. Use a filter to return a more specific list of results.</p>
         184  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CommandFilter>>) -> Self {
         185  +
        self.inner = self.inner.set_filters(input);
         186  +
        self
         187  +
    }
         188  +
    /// <p>(Optional) One or more filters. Use a filter to return a more specific list of results.</p>
         189  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CommandFilter>> {
         190  +
        self.inner.get_filters()
         191  +
    }
         192  +
    /// <p>(Optional) If set this returns the response of the command executions and any command output. The default value is <code>false</code>.</p>
         193  +
    pub fn details(mut self, input: bool) -> Self {
         194  +
        self.inner = self.inner.details(input);
         195  +
        self
         196  +
    }
         197  +
    /// <p>(Optional) If set this returns the response of the command executions and any command output. The default value is <code>false</code>.</p>
         198  +
    pub fn set_details(mut self, input: ::std::option::Option<bool>) -> Self {
         199  +
        self.inner = self.inner.set_details(input);
         200  +
        self
         201  +
    }
         202  +
    /// <p>(Optional) If set this returns the response of the command executions and any command output. The default value is <code>false</code>.</p>
         203  +
    pub fn get_details(&self) -> &::std::option::Option<bool> {
         204  +
        self.inner.get_details()
         205  +
    }
         206  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_command_invocations/paginator.rs

@@ -0,1 +0,149 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`ListCommandInvocations`](crate::operation::list_command_invocations::ListCommandInvocations)
           3  +
pub struct ListCommandInvocationsPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::list_command_invocations::builders::ListCommandInvocationsInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl ListCommandInvocationsPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::list_command_invocations::builders::ListCommandInvocationsInputBuilder,
          14  +
    ) -> Self {
          15  +
        Self {
          16  +
            handle,
          17  +
            builder,
          18  +
            stop_on_duplicate_token: true,
          19  +
        }
          20  +
    }
          21  +
          22  +
    /// Set the page size
          23  +
    ///
          24  +
    /// _Note: this method will override any previously set value for `max_results`_
          25  +
    pub fn page_size(mut self, limit: i32) -> Self {
          26  +
        self.builder.max_results = ::std::option::Option::Some(limit);
          27  +
        self
          28  +
    }
          29  +
          30  +
    /// Create a flattened paginator
          31  +
    ///
          32  +
    /// This paginator automatically flattens results using `command_invocations`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::list_command_invocations::paginator::ListCommandInvocationsPaginatorItems {
          35  +
        crate::operation::list_command_invocations::paginator::ListCommandInvocationsPaginatorItems(self)
          36  +
    }
          37  +
          38  +
    /// Stop paginating when the service returns the same pagination token twice in a row.
          39  +
    ///
          40  +
    /// Defaults to true.
          41  +
    ///
          42  +
    /// For certain operations, it may be useful to continue on duplicate token. For example,
          43  +
    /// if an operation is for tailing a log file in real-time, then continuing may be desired.
          44  +
    /// This option can be set to `false` to accommodate these use cases.
          45  +
    pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self {
          46  +
        self.stop_on_duplicate_token = stop_on_duplicate_token;
          47  +
        self
          48  +
    }
          49  +
          50  +
    /// Create the pagination stream
          51  +
    ///
          52  +
    /// _Note:_ No requests will be dispatched until the stream is used
          53  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
          54  +
    pub fn send(
          55  +
        self,
          56  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
          57  +
        ::std::result::Result<
          58  +
            crate::operation::list_command_invocations::ListCommandInvocationsOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::list_command_invocations::ListCommandInvocationsError,
          61  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          62  +
            >,
          63  +
        >,
          64  +
    > {
          65  +
        // Move individual fields out of self for the borrow checker
          66  +
        let builder = self.builder;
          67  +
        let handle = self.handle;
          68  +
        let runtime_plugins = crate::operation::list_command_invocations::ListCommandInvocations::operation_runtime_plugins(
          69  +
            handle.runtime_plugins.clone(),
          70  +
            &handle.conf,
          71  +
            ::std::option::Option::None,
          72  +
        )
          73  +
        .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          74  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          75  +
            move |tx| {
          76  +
                ::std::boxed::Box::pin(async move {
          77  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          78  +
                    let mut input = match builder
          79  +
                        .build()
          80  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          81  +
                    {
          82  +
                        ::std::result::Result::Ok(input) => input,
          83  +
                        ::std::result::Result::Err(e) => {
          84  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          85  +
                            return;
          86  +
                        }
          87  +
                    };
          88  +
                    loop {
          89  +
                        let resp =
          90  +
                            crate::operation::list_command_invocations::ListCommandInvocations::orchestrate(&runtime_plugins, input.clone()).await;
          91  +
                        // If the input member is None or it was an error
          92  +
                        let done = match resp {
          93  +
                            ::std::result::Result::Ok(ref resp) => {
          94  +
                                let new_token = crate::lens::reflens_list_command_invocations_output_output_next_token(resp);
          95  +
                                // Pagination is exhausted when the next token is an empty string
          96  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          97  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          98  +
                                    true
          99  +
                                } else {
         100  +
                                    input.next_token = new_token.cloned();
         101  +
                                    is_empty
         102  +
                                }
         103  +
                            }
         104  +
                            ::std::result::Result::Err(_) => true,
         105  +
                        };
         106  +
                        if tx.send(resp).await.is_err() {
         107  +
                            // receiving end was dropped
         108  +
                            return;
         109  +
                        }
         110  +
                        if done {
         111  +
                            return;
         112  +
                        }
         113  +
                    }
         114  +
                })
         115  +
            },
         116  +
        ))
         117  +
    }
         118  +
}
         119  +
         120  +
/// Flattened paginator for `ListCommandInvocationsPaginator`
         121  +
///
         122  +
/// This is created with [`.items()`](ListCommandInvocationsPaginator::items)
         123  +
pub struct ListCommandInvocationsPaginatorItems(ListCommandInvocationsPaginator);
         124  +
         125  +
impl ListCommandInvocationsPaginatorItems {
         126  +
    /// Create the pagination stream
         127  +
    ///
         128  +
    /// _Note_: No requests will be dispatched until the stream is used
         129  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         130  +
    ///
         131  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         132  +
    pub fn send(
         133  +
        self,
         134  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         135  +
        ::std::result::Result<
         136  +
            crate::types::CommandInvocation,
         137  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         138  +
                crate::operation::list_command_invocations::ListCommandInvocationsError,
         139  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         140  +
            >,
         141  +
        >,
         142  +
    > {
         143  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         144  +
            crate::lens::lens_list_command_invocations_output_output_command_invocations(page)
         145  +
                .unwrap_or_default()
         146  +
                .into_iter()
         147  +
        })
         148  +
    }
         149  +
}