AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_inventory_entries/_list_inventory_entries_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_inventory_entries/_list_inventory_entries_output.rs

@@ -0,1 +0,501 @@
           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 ListInventoryEntriesOutput {
           6  +
    /// <p>The type of inventory item returned by the request.</p>
           7  +
    pub type_name: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The managed node ID targeted by the request to query inventory information.</p>
           9  +
    pub instance_id: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The inventory schema version used by the managed nodes.</p>
          11  +
    pub schema_version: ::std::option::Option<::std::string::String>,
          12  +
    /// <p>The time that inventory information was collected for the managed nodes.</p>
          13  +
    pub capture_time: ::std::option::Option<::std::string::String>,
          14  +
    /// <p>A list of inventory items on the managed nodes.</p>
          15  +
    pub entries: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
          16  +
    /// <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>
          17  +
    pub next_token: ::std::option::Option<::std::string::String>,
          18  +
    _request_id: Option<String>,
          19  +
}
          20  +
impl ListInventoryEntriesOutput {
          21  +
    /// <p>The type of inventory item returned by the request.</p>
          22  +
    pub fn type_name(&self) -> ::std::option::Option<&str> {
          23  +
        self.type_name.as_deref()
          24  +
    }
          25  +
    /// <p>The managed node ID targeted by the request to query inventory information.</p>
          26  +
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
          27  +
        self.instance_id.as_deref()
          28  +
    }
          29  +
    /// <p>The inventory schema version used by the managed nodes.</p>
          30  +
    pub fn schema_version(&self) -> ::std::option::Option<&str> {
          31  +
        self.schema_version.as_deref()
          32  +
    }
          33  +
    /// <p>The time that inventory information was collected for the managed nodes.</p>
          34  +
    pub fn capture_time(&self) -> ::std::option::Option<&str> {
          35  +
        self.capture_time.as_deref()
          36  +
    }
          37  +
    /// <p>A list of inventory items on the managed nodes.</p>
          38  +
    ///
          39  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.entries.is_none()`.
          40  +
    pub fn entries(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
          41  +
        self.entries.as_deref().unwrap_or_default()
          42  +
    }
          43  +
    /// <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>
          44  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          45  +
        self.next_token.as_deref()
          46  +
    }
          47  +
}
          48  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_TYPE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput$TypeName",
          51  +
        "com.amazonaws.ssm.synthetic",
          52  +
        "ListInventoryEntriesOutput",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::String,
          55  +
    "TypeName",
          56  +
    0,
          57  +
);
          58  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput$InstanceId",
          61  +
        "com.amazonaws.ssm.synthetic",
          62  +
        "ListInventoryEntriesOutput",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::String,
          65  +
    "InstanceId",
          66  +
    1,
          67  +
);
          68  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_SCHEMA_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts(
          70  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput$SchemaVersion",
          71  +
        "com.amazonaws.ssm.synthetic",
          72  +
        "ListInventoryEntriesOutput",
          73  +
    ),
          74  +
    ::aws_smithy_schema::ShapeType::String,
          75  +
    "SchemaVersion",
          76  +
    2,
          77  +
);
          78  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_CAPTURE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts(
          80  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput$CaptureTime",
          81  +
        "com.amazonaws.ssm.synthetic",
          82  +
        "ListInventoryEntriesOutput",
          83  +
    ),
          84  +
    ::aws_smithy_schema::ShapeType::String,
          85  +
    "CaptureTime",
          86  +
    3,
          87  +
);
          88  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          89  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryItemEntry$key", "com.amazonaws.ssm", "InventoryItemEntry"),
          90  +
    ::aws_smithy_schema::ShapeType::String,
          91  +
    "key",
          92  +
    0,
          93  +
);
          94  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          95  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#InventoryItemEntry$value", "com.amazonaws.ssm", "InventoryItemEntry"),
          96  +
    ::aws_smithy_schema::ShapeType::String,
          97  +
    "value",
          98  +
    1,
          99  +
);
         100  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         101  +
    ::aws_smithy_schema::ShapeId::from_parts(
         102  +
        "com.amazonaws.ssm#InventoryItemEntryList$member",
         103  +
        "com.amazonaws.ssm",
         104  +
        "InventoryItemEntryList",
         105  +
    ),
         106  +
    ::aws_smithy_schema::ShapeType::Map,
         107  +
    "member",
         108  +
    0,
         109  +
)
         110  +
.with_map_members(
         111  +
    &LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER_KEY,
         112  +
    &LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER_VALUE,
         113  +
);
         114  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         115  +
    ::aws_smithy_schema::ShapeId::from_parts(
         116  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput$Entries",
         117  +
        "com.amazonaws.ssm.synthetic",
         118  +
        "ListInventoryEntriesOutput",
         119  +
    ),
         120  +
    ::aws_smithy_schema::ShapeType::List,
         121  +
    "Entries",
         122  +
    4,
         123  +
)
         124  +
.with_list_member(&LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER);
         125  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         126  +
    ::aws_smithy_schema::ShapeId::from_parts(
         127  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput$NextToken",
         128  +
        "com.amazonaws.ssm.synthetic",
         129  +
        "ListInventoryEntriesOutput",
         130  +
    ),
         131  +
    ::aws_smithy_schema::ShapeType::String,
         132  +
    "NextToken",
         133  +
    5,
         134  +
);
         135  +
static LISTINVENTORYENTRIESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         136  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
         137  +
    ::aws_smithy_schema::ShapeType::String,
         138  +
    "request_id",
         139  +
    6,
         140  +
)
         141  +
.with_http_header("x-amzn-requestid");
         142  +
static LISTINVENTORYENTRIESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         143  +
    ::aws_smithy_schema::ShapeId::from_parts(
         144  +
        "com.amazonaws.ssm.synthetic#ListInventoryEntriesOutput",
         145  +
        "com.amazonaws.ssm.synthetic",
         146  +
        "ListInventoryEntriesOutput",
         147  +
    ),
         148  +
    ::aws_smithy_schema::ShapeType::Structure,
         149  +
    &[
         150  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER_TYPE_NAME,
         151  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER_INSTANCE_ID,
         152  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER_SCHEMA_VERSION,
         153  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER_CAPTURE_TIME,
         154  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES,
         155  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER_NEXT_TOKEN,
         156  +
        &LISTINVENTORYENTRIESOUTPUT_MEMBER__REQUEST_ID,
         157  +
    ],
         158  +
)
         159  +
.with_original_name("ListInventoryEntriesResult");
         160  +
impl ListInventoryEntriesOutput {
         161  +
    /// The schema for this shape.
         162  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTINVENTORYENTRIESOUTPUT_SCHEMA;
         163  +
}
         164  +
impl ::aws_smithy_schema::serde::SerializableStruct for ListInventoryEntriesOutput {
         165  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         166  +
    fn serialize_members(
         167  +
        &self,
         168  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         169  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         170  +
        if let Some(ref val) = self.type_name {
         171  +
            ser.write_string(&LISTINVENTORYENTRIESOUTPUT_MEMBER_TYPE_NAME, val)?;
         172  +
        }
         173  +
        if let Some(ref val) = self.instance_id {
         174  +
            ser.write_string(&LISTINVENTORYENTRIESOUTPUT_MEMBER_INSTANCE_ID, val)?;
         175  +
        }
         176  +
        if let Some(ref val) = self.schema_version {
         177  +
            ser.write_string(&LISTINVENTORYENTRIESOUTPUT_MEMBER_SCHEMA_VERSION, val)?;
         178  +
        }
         179  +
        if let Some(ref val) = self.capture_time {
         180  +
            ser.write_string(&LISTINVENTORYENTRIESOUTPUT_MEMBER_CAPTURE_TIME, val)?;
         181  +
        }
         182  +
        if let Some(ref val) = self.entries {
         183  +
            ser.write_list(
         184  +
                &LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES,
         185  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         186  +
                    for item in val {
         187  +
                        ser.write_map(
         188  +
                            &LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER,
         189  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         190  +
                                for (key, value) in item {
         191  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         192  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         193  +
                                }
         194  +
                                Ok(())
         195  +
                            },
         196  +
                        )?;
         197  +
                    }
         198  +
                    Ok(())
         199  +
                },
         200  +
            )?;
         201  +
        }
         202  +
        if let Some(ref val) = self.next_token {
         203  +
            ser.write_string(&LISTINVENTORYENTRIESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
         204  +
        }
         205  +
        Ok(())
         206  +
    }
         207  +
}
         208  +
impl ListInventoryEntriesOutput {
         209  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         210  +
    pub fn deserialize(
         211  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         212  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         213  +
        #[allow(unused_variables, unused_mut)]
         214  +
        let mut builder = Self::builder();
         215  +
        #[allow(
         216  +
            unused_variables,
         217  +
            unreachable_code,
         218  +
            clippy::single_match,
         219  +
            clippy::match_single_binding,
         220  +
            clippy::diverging_sub_expression
         221  +
        )]
         222  +
        deserializer.read_struct(&LISTINVENTORYENTRIESOUTPUT_SCHEMA, &mut |member, deser| {
         223  +
            match member.member_index() {
         224  +
                Some(0) => {
         225  +
                    if deser.is_null() {
         226  +
                        deser.read_null()?;
         227  +
                    } else {
         228  +
                        builder.type_name = Some(deser.read_string(member)?);
         229  +
                    }
         230  +
                }
         231  +
                Some(1) => {
         232  +
                    if deser.is_null() {
         233  +
                        deser.read_null()?;
         234  +
                    } else {
         235  +
                        builder.instance_id = Some(deser.read_string(member)?);
         236  +
                    }
         237  +
                }
         238  +
                Some(2) => {
         239  +
                    if deser.is_null() {
         240  +
                        deser.read_null()?;
         241  +
                    } else {
         242  +
                        builder.schema_version = Some(deser.read_string(member)?);
         243  +
                    }
         244  +
                }
         245  +
                Some(3) => {
         246  +
                    if deser.is_null() {
         247  +
                        deser.read_null()?;
         248  +
                    } else {
         249  +
                        builder.capture_time = Some(deser.read_string(member)?);
         250  +
                    }
         251  +
                }
         252  +
                Some(4) => {
         253  +
                    if deser.is_null() {
         254  +
                        deser.read_null()?;
         255  +
                    } else {
         256  +
                        builder.entries = Some({
         257  +
                            let mut container = Vec::new();
         258  +
                            deser.read_list(member, &mut |deser| {
         259  +
                                container.push({
         260  +
                                    let mut map = ::std::collections::HashMap::new();
         261  +
                                    deser.read_map(&LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER, &mut |key, deser| {
         262  +
                                        let value = deser.read_string(&::aws_smithy_schema::prelude::STRING)?;
         263  +
                                        map.insert(key, value);
         264  +
                                        Ok(())
         265  +
                                    })?;
         266  +
                                    map
         267  +
                                });
         268  +
                                Ok(())
         269  +
                            })?;
         270  +
                            container
         271  +
                        });
         272  +
                    }
         273  +
                }
         274  +
                Some(5) => {
         275  +
                    if deser.is_null() {
         276  +
                        deser.read_null()?;
         277  +
                    } else {
         278  +
                        builder.next_token = Some(deser.read_string(member)?);
         279  +
                    }
         280  +
                }
         281  +
                Some(6) => {
         282  +
                    builder._request_id = Some(deser.read_string(member)?);
         283  +
                }
         284  +
                _ => {}
         285  +
            }
         286  +
            Ok(())
         287  +
        })?;
         288  +
        Ok(builder.build())
         289  +
    }
         290  +
}
         291  +
impl ListInventoryEntriesOutput {
         292  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         293  +
    /// Header-bound members are read directly from headers, avoiding runtime
         294  +
    /// member iteration overhead. Body members are read via the deserializer.
         295  +
    pub fn deserialize_with_response(
         296  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         297  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         298  +
        _status: u16,
         299  +
        _body: &[u8],
         300  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         301  +
        #[allow(unused_variables, unused_mut)]
         302  +
        let mut builder = Self::builder();
         303  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         304  +
            builder._request_id = Some(val.to_string());
         305  +
        }
         306  +
         307  +
        #[allow(
         308  +
            unused_variables,
         309  +
            unreachable_code,
         310  +
            clippy::single_match,
         311  +
            clippy::match_single_binding,
         312  +
            clippy::diverging_sub_expression
         313  +
        )]
         314  +
        deserializer.read_struct(&LISTINVENTORYENTRIESOUTPUT_SCHEMA, &mut |member, deser| {
         315  +
            match member.member_index() {
         316  +
                Some(0) => {
         317  +
                    builder.type_name = Some(deser.read_string(member)?);
         318  +
                }
         319  +
                Some(1) => {
         320  +
                    builder.instance_id = Some(deser.read_string(member)?);
         321  +
                }
         322  +
                Some(2) => {
         323  +
                    builder.schema_version = Some(deser.read_string(member)?);
         324  +
                }
         325  +
                Some(3) => {
         326  +
                    builder.capture_time = Some(deser.read_string(member)?);
         327  +
                }
         328  +
                Some(4) => {
         329  +
                    builder.entries = Some({
         330  +
                        let mut container = Vec::new();
         331  +
                        deser.read_list(member, &mut |deser| {
         332  +
                            container.push({
         333  +
                                let mut map = ::std::collections::HashMap::new();
         334  +
                                deser.read_map(&LISTINVENTORYENTRIESOUTPUT_MEMBER_ENTRIES_MEMBER, &mut |key, deser| {
         335  +
                                    let value = deser.read_string(&::aws_smithy_schema::prelude::STRING)?;
         336  +
                                    map.insert(key, value);
         337  +
                                    Ok(())
         338  +
                                })?;
         339  +
                                map
         340  +
                            });
         341  +
                            Ok(())
         342  +
                        })?;
         343  +
                        container
         344  +
                    });
         345  +
                }
         346  +
                Some(5) => {
         347  +
                    builder.next_token = Some(deser.read_string(member)?);
         348  +
                }
         349  +
                _ => {}
         350  +
            }
         351  +
            Ok(())
         352  +
        })?;
         353  +
        Ok(builder.build())
         354  +
    }
         355  +
}
         356  +
impl ::aws_types::request_id::RequestId for ListInventoryEntriesOutput {
         357  +
    fn request_id(&self) -> Option<&str> {
         358  +
        self._request_id.as_deref()
         359  +
    }
         360  +
}
         361  +
impl ListInventoryEntriesOutput {
         362  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         363  +
        self._request_id = request_id;
         364  +
        self
         365  +
    }
         366  +
}
         367  +
impl ListInventoryEntriesOutput {
         368  +
    /// Creates a new builder-style object to manufacture [`ListInventoryEntriesOutput`](crate::operation::list_inventory_entries::ListInventoryEntriesOutput).
         369  +
    pub fn builder() -> crate::operation::list_inventory_entries::builders::ListInventoryEntriesOutputBuilder {
         370  +
        crate::operation::list_inventory_entries::builders::ListInventoryEntriesOutputBuilder::default()
         371  +
    }
         372  +
}
         373  +
         374  +
/// A builder for [`ListInventoryEntriesOutput`](crate::operation::list_inventory_entries::ListInventoryEntriesOutput).
         375  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         376  +
#[non_exhaustive]
         377  +
pub struct ListInventoryEntriesOutputBuilder {
         378  +
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
         379  +
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
         380  +
    pub(crate) schema_version: ::std::option::Option<::std::string::String>,
         381  +
    pub(crate) capture_time: ::std::option::Option<::std::string::String>,
         382  +
    pub(crate) entries: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
         383  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         384  +
    _request_id: Option<String>,
         385  +
}
         386  +
impl ListInventoryEntriesOutputBuilder {
         387  +
    /// <p>The type of inventory item returned by the request.</p>
         388  +
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         389  +
        self.type_name = ::std::option::Option::Some(input.into());
         390  +
        self
         391  +
    }
         392  +
    /// <p>The type of inventory item returned by the request.</p>
         393  +
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         394  +
        self.type_name = input;
         395  +
        self
         396  +
    }
         397  +
    /// <p>The type of inventory item returned by the request.</p>
         398  +
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
         399  +
        &self.type_name
         400  +
    }
         401  +
    /// <p>The managed node ID targeted by the request to query inventory information.</p>
         402  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         403  +
        self.instance_id = ::std::option::Option::Some(input.into());
         404  +
        self
         405  +
    }
         406  +
    /// <p>The managed node ID targeted by the request to query inventory information.</p>
         407  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         408  +
        self.instance_id = input;
         409  +
        self
         410  +
    }
         411  +
    /// <p>The managed node ID targeted by the request to query inventory information.</p>
         412  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         413  +
        &self.instance_id
         414  +
    }
         415  +
    /// <p>The inventory schema version used by the managed nodes.</p>
         416  +
    pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         417  +
        self.schema_version = ::std::option::Option::Some(input.into());
         418  +
        self
         419  +
    }
         420  +
    /// <p>The inventory schema version used by the managed nodes.</p>
         421  +
    pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         422  +
        self.schema_version = input;
         423  +
        self
         424  +
    }
         425  +
    /// <p>The inventory schema version used by the managed nodes.</p>
         426  +
    pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
         427  +
        &self.schema_version
         428  +
    }
         429  +
    /// <p>The time that inventory information was collected for the managed nodes.</p>
         430  +
    pub fn capture_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         431  +
        self.capture_time = ::std::option::Option::Some(input.into());
         432  +
        self
         433  +
    }
         434  +
    /// <p>The time that inventory information was collected for the managed nodes.</p>
         435  +
    pub fn set_capture_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         436  +
        self.capture_time = input;
         437  +
        self
         438  +
    }
         439  +
    /// <p>The time that inventory information was collected for the managed nodes.</p>
         440  +
    pub fn get_capture_time(&self) -> &::std::option::Option<::std::string::String> {
         441  +
        &self.capture_time
         442  +
    }
         443  +
    /// Appends an item to `entries`.
         444  +
    ///
         445  +
    /// To override the contents of this collection use [`set_entries`](Self::set_entries).
         446  +
    ///
         447  +
    /// <p>A list of inventory items on the managed nodes.</p>
         448  +
    pub fn entries(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
         449  +
        let mut v = self.entries.unwrap_or_default();
         450  +
        v.push(input);
         451  +
        self.entries = ::std::option::Option::Some(v);
         452  +
        self
         453  +
    }
         454  +
    /// <p>A list of inventory items on the managed nodes.</p>
         455  +
    pub fn set_entries(
         456  +
        mut self,
         457  +
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
         458  +
    ) -> Self {
         459  +
        self.entries = input;
         460  +
        self
         461  +
    }
         462  +
    /// <p>A list of inventory items on the managed nodes.</p>
         463  +
    pub fn get_entries(&self) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
         464  +
        &self.entries
         465  +
    }
         466  +
    /// <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>
         467  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         468  +
        self.next_token = ::std::option::Option::Some(input.into());
         469  +
        self
         470  +
    }
         471  +
    /// <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>
         472  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         473  +
        self.next_token = input;
         474  +
        self
         475  +
    }
         476  +
    /// <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>
         477  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         478  +
        &self.next_token
         479  +
    }
         480  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         481  +
        self._request_id = Some(request_id.into());
         482  +
        self
         483  +
    }
         484  +
         485  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         486  +
        self._request_id = request_id;
         487  +
        self
         488  +
    }
         489  +
    /// Consumes the builder and constructs a [`ListInventoryEntriesOutput`](crate::operation::list_inventory_entries::ListInventoryEntriesOutput).
         490  +
    pub fn build(self) -> crate::operation::list_inventory_entries::ListInventoryEntriesOutput {
         491  +
        crate::operation::list_inventory_entries::ListInventoryEntriesOutput {
         492  +
            type_name: self.type_name,
         493  +
            instance_id: self.instance_id,
         494  +
            schema_version: self.schema_version,
         495  +
            capture_time: self.capture_time,
         496  +
            entries: self.entries,
         497  +
            next_token: self.next_token,
         498  +
            _request_id: self._request_id,
         499  +
        }
         500  +
    }
         501  +
}

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

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::list_inventory_entries::_list_inventory_entries_input::ListInventoryEntriesInputBuilder;
           3  +
           4  +
pub use crate::operation::list_inventory_entries::_list_inventory_entries_output::ListInventoryEntriesOutputBuilder;
           5  +
           6  +
impl crate::operation::list_inventory_entries::builders::ListInventoryEntriesInputBuilder {
           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_inventory_entries::ListInventoryEntriesOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_inventory_entries::ListInventoryEntriesError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_inventory_entries();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListInventoryEntries`.
          24  +
///
          25  +
/// <p>A list of inventory items returned by the request.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListInventoryEntriesFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_inventory_entries::builders::ListInventoryEntriesInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_inventory_entries::ListInventoryEntriesOutput,
          35  +
        crate::operation::list_inventory_entries::ListInventoryEntriesError,
          36  +
    > for ListInventoryEntriesFluentBuilder
          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_inventory_entries::ListInventoryEntriesOutput,
          44  +
            crate::operation::list_inventory_entries::ListInventoryEntriesError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListInventoryEntriesFluentBuilder {
          51  +
    /// Creates a new `ListInventoryEntriesFluentBuilder`.
          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 ListInventoryEntries as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_inventory_entries::builders::ListInventoryEntriesInputBuilder {
          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_inventory_entries::ListInventoryEntriesOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_inventory_entries::ListInventoryEntriesError,
          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_inventory_entries::ListInventoryEntries::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_inventory_entries::ListInventoryEntries::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_inventory_entries::ListInventoryEntriesOutput,
          97  +
        crate::operation::list_inventory_entries::ListInventoryEntriesError,
          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  +
    /// <p>The managed node ID for which you want inventory information.</p>
         112  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.instance_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The managed node ID for which you want inventory information.</p>
         117  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_instance_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The managed node ID for which you want inventory information.</p>
         122  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_instance_id()
         124  +
    }
         125  +
    /// <p>The type of inventory item for which you want information.</p>
         126  +
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         127  +
        self.inner = self.inner.type_name(input.into());
         128  +
        self
         129  +
    }
         130  +
    /// <p>The type of inventory item for which you want information.</p>
         131  +
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         132  +
        self.inner = self.inner.set_type_name(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>The type of inventory item for which you want information.</p>
         136  +
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
         137  +
        self.inner.get_type_name()
         138  +
    }
         139  +
    ///
         140  +
    /// Appends an item to `Filters`.
         141  +
    ///
         142  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         143  +
    ///
         144  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p>
         145  +
    pub fn filters(mut self, input: crate::types::InventoryFilter) -> Self {
         146  +
        self.inner = self.inner.filters(input);
         147  +
        self
         148  +
    }
         149  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p>
         150  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InventoryFilter>>) -> Self {
         151  +
        self.inner = self.inner.set_filters(input);
         152  +
        self
         153  +
    }
         154  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p>
         155  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InventoryFilter>> {
         156  +
        self.inner.get_filters()
         157  +
    }
         158  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         159  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         160  +
        self.inner = self.inner.next_token(input.into());
         161  +
        self
         162  +
    }
         163  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         164  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         165  +
        self.inner = self.inner.set_next_token(input);
         166  +
        self
         167  +
    }
         168  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         169  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         170  +
        self.inner.get_next_token()
         171  +
    }
         172  +
    /// <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>
         173  +
    pub fn max_results(mut self, input: i32) -> Self {
         174  +
        self.inner = self.inner.max_results(input);
         175  +
        self
         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 set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         179  +
        self.inner = self.inner.set_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 get_max_results(&self) -> &::std::option::Option<i32> {
         184  +
        self.inner.get_max_results()
         185  +
    }
         186  +
}