AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/describe_association_execution_targets/_describe_association_execution_targets_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/describe_association_execution_targets/_describe_association_execution_targets_output.rs

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

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

@@ -0,1 +0,205 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_association_execution_targets::_describe_association_execution_targets_input::DescribeAssociationExecutionTargetsInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_association_execution_targets::_describe_association_execution_targets_output::DescribeAssociationExecutionTargetsOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_association_execution_targets::builders::DescribeAssociationExecutionTargetsInputBuilder {
           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::describe_association_execution_targets::DescribeAssociationExecutionTargetsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_association_execution_targets();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeAssociationExecutionTargets`.
          24  +
///
          25  +
/// <p>Views information about a specific execution of a specific association.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DescribeAssociationExecutionTargetsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::describe_association_execution_targets::builders::DescribeAssociationExecutionTargetsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsOutput,
          35  +
        crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
          36  +
    > for DescribeAssociationExecutionTargetsFluentBuilder
          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::describe_association_execution_targets::DescribeAssociationExecutionTargetsOutput,
          44  +
            crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DescribeAssociationExecutionTargetsFluentBuilder {
          51  +
    /// Creates a new `DescribeAssociationExecutionTargetsFluentBuilder`.
          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 DescribeAssociationExecutionTargets as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::describe_association_execution_targets::builders::DescribeAssociationExecutionTargetsInputBuilder {
          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::describe_association_execution_targets::DescribeAssociationExecutionTargetsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
          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 =
          85  +
            crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargets::operation_runtime_plugins(
          86  +
                self.handle.runtime_plugins.clone(),
          87  +
                &self.handle.conf,
          88  +
                self.config_override,
          89  +
            );
          90  +
        crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargets::orchestrate(&runtime_plugins, input).await
          91  +
    }
          92  +
          93  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          94  +
    pub fn customize(
          95  +
        self,
          96  +
    ) -> crate::client::customize::CustomizableOperation<
          97  +
        crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsOutput,
          98  +
        crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
          99  +
        Self,
         100  +
    > {
         101  +
        crate::client::customize::CustomizableOperation::new(self)
         102  +
    }
         103  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         104  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         105  +
        self
         106  +
    }
         107  +
         108  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         109  +
        self.config_override = config_override;
         110  +
        self
         111  +
    }
         112  +
    /// Create a paginator for this request
         113  +
    ///
         114  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_association_execution_targets::paginator::DescribeAssociationExecutionTargetsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         115  +
    pub fn into_paginator(self) -> crate::operation::describe_association_execution_targets::paginator::DescribeAssociationExecutionTargetsPaginator {
         116  +
        crate::operation::describe_association_execution_targets::paginator::DescribeAssociationExecutionTargetsPaginator::new(
         117  +
            self.handle,
         118  +
            self.inner,
         119  +
        )
         120  +
    }
         121  +
    /// <p>The association ID that includes the execution for which you want to view details.</p>
         122  +
    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         123  +
        self.inner = self.inner.association_id(input.into());
         124  +
        self
         125  +
    }
         126  +
    /// <p>The association ID that includes the execution for which you want to view details.</p>
         127  +
    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         128  +
        self.inner = self.inner.set_association_id(input);
         129  +
        self
         130  +
    }
         131  +
    /// <p>The association ID that includes the execution for which you want to view details.</p>
         132  +
    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
         133  +
        self.inner.get_association_id()
         134  +
    }
         135  +
    /// <p>The execution ID for which you want to view details.</p>
         136  +
    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         137  +
        self.inner = self.inner.execution_id(input.into());
         138  +
        self
         139  +
    }
         140  +
    /// <p>The execution ID for which you want to view details.</p>
         141  +
    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         142  +
        self.inner = self.inner.set_execution_id(input);
         143  +
        self
         144  +
    }
         145  +
    /// <p>The execution ID for which you want to view details.</p>
         146  +
    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
         147  +
        self.inner.get_execution_id()
         148  +
    }
         149  +
    ///
         150  +
    /// Appends an item to `Filters`.
         151  +
    ///
         152  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         153  +
    ///
         154  +
    /// <p>Filters for the request. You can specify the following filters and values.</p>
         155  +
    /// <p>Status (EQUAL)</p>
         156  +
    /// <p>ResourceId (EQUAL)</p>
         157  +
    /// <p>ResourceType (EQUAL)</p>
         158  +
    pub fn filters(mut self, input: crate::types::AssociationExecutionTargetsFilter) -> Self {
         159  +
        self.inner = self.inner.filters(input);
         160  +
        self
         161  +
    }
         162  +
    /// <p>Filters for the request. You can specify the following filters and values.</p>
         163  +
    /// <p>Status (EQUAL)</p>
         164  +
    /// <p>ResourceId (EQUAL)</p>
         165  +
    /// <p>ResourceType (EQUAL)</p>
         166  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssociationExecutionTargetsFilter>>) -> Self {
         167  +
        self.inner = self.inner.set_filters(input);
         168  +
        self
         169  +
    }
         170  +
    /// <p>Filters for the request. You can specify the following filters and values.</p>
         171  +
    /// <p>Status (EQUAL)</p>
         172  +
    /// <p>ResourceId (EQUAL)</p>
         173  +
    /// <p>ResourceType (EQUAL)</p>
         174  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociationExecutionTargetsFilter>> {
         175  +
        self.inner.get_filters()
         176  +
    }
         177  +
    /// <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>
         178  +
    pub fn max_results(mut self, input: i32) -> Self {
         179  +
        self.inner = self.inner.max_results(input);
         180  +
        self
         181  +
    }
         182  +
    /// <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>
         183  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         184  +
        self.inner = self.inner.set_max_results(input);
         185  +
        self
         186  +
    }
         187  +
    /// <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>
         188  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         189  +
        self.inner.get_max_results()
         190  +
    }
         191  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         192  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         193  +
        self.inner = self.inner.next_token(input.into());
         194  +
        self
         195  +
    }
         196  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         197  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         198  +
        self.inner = self.inner.set_next_token(input);
         199  +
        self
         200  +
    }
         201  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         202  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         203  +
        self.inner.get_next_token()
         204  +
    }
         205  +
}

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

@@ -0,1 +0,153 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribeAssociationExecutionTargets`](crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargets)
           3  +
pub struct DescribeAssociationExecutionTargetsPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_association_execution_targets::builders::DescribeAssociationExecutionTargetsInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribeAssociationExecutionTargetsPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::describe_association_execution_targets::builders::DescribeAssociationExecutionTargetsInputBuilder,
          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 `association_execution_targets`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_association_execution_targets::paginator::DescribeAssociationExecutionTargetsPaginatorItems {
          35  +
        crate::operation::describe_association_execution_targets::paginator::DescribeAssociationExecutionTargetsPaginatorItems(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::describe_association_execution_targets::DescribeAssociationExecutionTargetsOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
          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 =
          69  +
            crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargets::operation_runtime_plugins(
          70  +
                handle.runtime_plugins.clone(),
          71  +
                &handle.conf,
          72  +
                ::std::option::Option::None,
          73  +
            )
          74  +
            .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          75  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          76  +
            move |tx| {
          77  +
                ::std::boxed::Box::pin(async move {
          78  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          79  +
                    let mut input = match builder
          80  +
                        .build()
          81  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          82  +
                    {
          83  +
                        ::std::result::Result::Ok(input) => input,
          84  +
                        ::std::result::Result::Err(e) => {
          85  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          86  +
                            return;
          87  +
                        }
          88  +
                    };
          89  +
                    loop {
          90  +
                        let resp = crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargets::orchestrate(
          91  +
                            &runtime_plugins,
          92  +
                            input.clone(),
          93  +
                        )
          94  +
                        .await;
          95  +
                        // If the input member is None or it was an error
          96  +
                        let done = match resp {
          97  +
                            ::std::result::Result::Ok(ref resp) => {
          98  +
                                let new_token = crate::lens::reflens_describe_association_execution_targets_output_output_next_token(resp);
          99  +
                                // Pagination is exhausted when the next token is an empty string
         100  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
         101  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
         102  +
                                    true
         103  +
                                } else {
         104  +
                                    input.next_token = new_token.cloned();
         105  +
                                    is_empty
         106  +
                                }
         107  +
                            }
         108  +
                            ::std::result::Result::Err(_) => true,
         109  +
                        };
         110  +
                        if tx.send(resp).await.is_err() {
         111  +
                            // receiving end was dropped
         112  +
                            return;
         113  +
                        }
         114  +
                        if done {
         115  +
                            return;
         116  +
                        }
         117  +
                    }
         118  +
                })
         119  +
            },
         120  +
        ))
         121  +
    }
         122  +
}
         123  +
         124  +
/// Flattened paginator for `DescribeAssociationExecutionTargetsPaginator`
         125  +
///
         126  +
/// This is created with [`.items()`](DescribeAssociationExecutionTargetsPaginator::items)
         127  +
pub struct DescribeAssociationExecutionTargetsPaginatorItems(DescribeAssociationExecutionTargetsPaginator);
         128  +
         129  +
impl DescribeAssociationExecutionTargetsPaginatorItems {
         130  +
    /// Create the pagination stream
         131  +
    ///
         132  +
    /// _Note_: No requests will be dispatched until the stream is used
         133  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         134  +
    ///
         135  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         136  +
    pub fn send(
         137  +
        self,
         138  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         139  +
        ::std::result::Result<
         140  +
            crate::types::AssociationExecutionTarget,
         141  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         142  +
                crate::operation::describe_association_execution_targets::DescribeAssociationExecutionTargetsError,
         143  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         144  +
            >,
         145  +
        >,
         146  +
    > {
         147  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         148  +
            crate::lens::lens_describe_association_execution_targets_output_output_association_execution_targets(page)
         149  +
                .unwrap_or_default()
         150  +
                .into_iter()
         151  +
        })
         152  +
    }
         153  +
}