AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_nodes_summary/_list_nodes_summary_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_nodes_summary/_list_nodes_summary_output.rs

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

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

@@ -0,1 +0,203 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::list_nodes_summary::_list_nodes_summary_input::ListNodesSummaryInputBuilder;
           3  +
           4  +
pub use crate::operation::list_nodes_summary::_list_nodes_summary_output::ListNodesSummaryOutputBuilder;
           5  +
           6  +
impl crate::operation::list_nodes_summary::builders::ListNodesSummaryInputBuilder {
           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_nodes_summary::ListNodesSummaryOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_nodes_summary::ListNodesSummaryError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_nodes_summary();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListNodesSummary`.
          24  +
///
          25  +
/// <p>Generates a summary of managed instance/node metadata based on the filters and aggregators you specify. Results are grouped by the input aggregator you specify.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListNodesSummaryFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_nodes_summary::builders::ListNodesSummaryInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_nodes_summary::ListNodesSummaryOutput,
          35  +
        crate::operation::list_nodes_summary::ListNodesSummaryError,
          36  +
    > for ListNodesSummaryFluentBuilder
          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_nodes_summary::ListNodesSummaryOutput,
          44  +
            crate::operation::list_nodes_summary::ListNodesSummaryError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListNodesSummaryFluentBuilder {
          51  +
    /// Creates a new `ListNodesSummaryFluentBuilder`.
          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 ListNodesSummary as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_nodes_summary::builders::ListNodesSummaryInputBuilder {
          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_nodes_summary::ListNodesSummaryOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_nodes_summary::ListNodesSummaryError,
          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_nodes_summary::ListNodesSummary::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_nodes_summary::ListNodesSummary::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_nodes_summary::ListNodesSummaryOutput,
          97  +
        crate::operation::list_nodes_summary::ListNodesSummaryError,
          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_nodes_summary::paginator::ListNodesSummaryPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::list_nodes_summary::paginator::ListNodesSummaryPaginator {
         115  +
        crate::operation::list_nodes_summary::paginator::ListNodesSummaryPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    /// <p>The name of the Amazon Web Services managed resource data sync to retrieve information about.</p>
         118  +
    /// <p>For cross-account/cross-Region configurations, this parameter is required, and the name of the supported resource data sync is <code>AWS-QuickSetup-ManagedNode</code>.</p>
         119  +
    /// <p>For single account/single-Region configurations, the parameter is not required.</p>
         120  +
    pub fn sync_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         121  +
        self.inner = self.inner.sync_name(input.into());
         122  +
        self
         123  +
    }
         124  +
    /// <p>The name of the Amazon Web Services managed resource data sync to retrieve information about.</p>
         125  +
    /// <p>For cross-account/cross-Region configurations, this parameter is required, and the name of the supported resource data sync is <code>AWS-QuickSetup-ManagedNode</code>.</p>
         126  +
    /// <p>For single account/single-Region configurations, the parameter is not required.</p>
         127  +
    pub fn set_sync_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         128  +
        self.inner = self.inner.set_sync_name(input);
         129  +
        self
         130  +
    }
         131  +
    /// <p>The name of the Amazon Web Services managed resource data sync to retrieve information about.</p>
         132  +
    /// <p>For cross-account/cross-Region configurations, this parameter is required, and the name of the supported resource data sync is <code>AWS-QuickSetup-ManagedNode</code>.</p>
         133  +
    /// <p>For single account/single-Region configurations, the parameter is not required.</p>
         134  +
    pub fn get_sync_name(&self) -> &::std::option::Option<::std::string::String> {
         135  +
        self.inner.get_sync_name()
         136  +
    }
         137  +
    ///
         138  +
    /// Appends an item to `Filters`.
         139  +
    ///
         140  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         141  +
    ///
         142  +
    /// <p>One or more filters. Use a filter to generate a summary that matches your specified filter criteria.</p>
         143  +
    pub fn filters(mut self, input: crate::types::NodeFilter) -> Self {
         144  +
        self.inner = self.inner.filters(input);
         145  +
        self
         146  +
    }
         147  +
    /// <p>One or more filters. Use a filter to generate a summary that matches your specified filter criteria.</p>
         148  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NodeFilter>>) -> Self {
         149  +
        self.inner = self.inner.set_filters(input);
         150  +
        self
         151  +
    }
         152  +
    /// <p>One or more filters. Use a filter to generate a summary that matches your specified filter criteria.</p>
         153  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NodeFilter>> {
         154  +
        self.inner.get_filters()
         155  +
    }
         156  +
    ///
         157  +
    /// Appends an item to `Aggregators`.
         158  +
    ///
         159  +
    /// To override the contents of this collection use [`set_aggregators`](Self::set_aggregators).
         160  +
    ///
         161  +
    /// <p>Specify one or more aggregators to return a count of managed nodes that match that expression. For example, a count of managed nodes by operating system.</p>
         162  +
    pub fn aggregators(mut self, input: crate::types::NodeAggregator) -> Self {
         163  +
        self.inner = self.inner.aggregators(input);
         164  +
        self
         165  +
    }
         166  +
    /// <p>Specify one or more aggregators to return a count of managed nodes that match that expression. For example, a count of managed nodes by operating system.</p>
         167  +
    pub fn set_aggregators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NodeAggregator>>) -> Self {
         168  +
        self.inner = self.inner.set_aggregators(input);
         169  +
        self
         170  +
    }
         171  +
    /// <p>Specify one or more aggregators to return a count of managed nodes that match that expression. For example, a count of managed nodes by operating system.</p>
         172  +
    pub fn get_aggregators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NodeAggregator>> {
         173  +
        self.inner.get_aggregators()
         174  +
    }
         175  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.) The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         176  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         177  +
        self.inner = self.inner.next_token(input.into());
         178  +
        self
         179  +
    }
         180  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.) The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         181  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         182  +
        self.inner = self.inner.set_next_token(input);
         183  +
        self
         184  +
    }
         185  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.) The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         186  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         187  +
        self.inner.get_next_token()
         188  +
    }
         189  +
    /// <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>
         190  +
    pub fn max_results(mut self, input: i32) -> Self {
         191  +
        self.inner = self.inner.max_results(input);
         192  +
        self
         193  +
    }
         194  +
    /// <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>
         195  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         196  +
        self.inner = self.inner.set_max_results(input);
         197  +
        self
         198  +
    }
         199  +
    /// <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>
         200  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         201  +
        self.inner.get_max_results()
         202  +
    }
         203  +
}

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

@@ -0,1 +0,148 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`ListNodesSummary`](crate::operation::list_nodes_summary::ListNodesSummary)
           3  +
pub struct ListNodesSummaryPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::list_nodes_summary::builders::ListNodesSummaryInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl ListNodesSummaryPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::list_nodes_summary::builders::ListNodesSummaryInputBuilder,
          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 `summary`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::list_nodes_summary::paginator::ListNodesSummaryPaginatorItems {
          35  +
        crate::operation::list_nodes_summary::paginator::ListNodesSummaryPaginatorItems(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_nodes_summary::ListNodesSummaryOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::list_nodes_summary::ListNodesSummaryError,
          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_nodes_summary::ListNodesSummary::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 = crate::operation::list_nodes_summary::ListNodesSummary::orchestrate(&runtime_plugins, input.clone()).await;
          90  +
                        // If the input member is None or it was an error
          91  +
                        let done = match resp {
          92  +
                            ::std::result::Result::Ok(ref resp) => {
          93  +
                                let new_token = crate::lens::reflens_list_nodes_summary_output_output_next_token(resp);
          94  +
                                // Pagination is exhausted when the next token is an empty string
          95  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          96  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          97  +
                                    true
          98  +
                                } else {
          99  +
                                    input.next_token = new_token.cloned();
         100  +
                                    is_empty
         101  +
                                }
         102  +
                            }
         103  +
                            ::std::result::Result::Err(_) => true,
         104  +
                        };
         105  +
                        if tx.send(resp).await.is_err() {
         106  +
                            // receiving end was dropped
         107  +
                            return;
         108  +
                        }
         109  +
                        if done {
         110  +
                            return;
         111  +
                        }
         112  +
                    }
         113  +
                })
         114  +
            },
         115  +
        ))
         116  +
    }
         117  +
}
         118  +
         119  +
/// Flattened paginator for `ListNodesSummaryPaginator`
         120  +
///
         121  +
/// This is created with [`.items()`](ListNodesSummaryPaginator::items)
         122  +
pub struct ListNodesSummaryPaginatorItems(ListNodesSummaryPaginator);
         123  +
         124  +
impl ListNodesSummaryPaginatorItems {
         125  +
    /// Create the pagination stream
         126  +
    ///
         127  +
    /// _Note_: No requests will be dispatched until the stream is used
         128  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         129  +
    ///
         130  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         131  +
    pub fn send(
         132  +
        self,
         133  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         134  +
        ::std::result::Result<
         135  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         136  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         137  +
                crate::operation::list_nodes_summary::ListNodesSummaryError,
         138  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         139  +
            >,
         140  +
        >,
         141  +
    > {
         142  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         143  +
            crate::lens::lens_list_nodes_summary_output_output_summary(page)
         144  +
                .unwrap_or_default()
         145  +
                .into_iter()
         146  +
        })
         147  +
    }
         148  +
}