AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_session_filter.rs

@@ -0,1 +0,307 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Describes a filter for Session Manager information.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct SessionFilter {
           7  +
    /// <p>The name of the filter.</p>
           8  +
    pub key: crate::types::SessionFilterKey,
           9  +
    /// <p>The filter value. Valid values for each filter key are as follows:</p>
          10  +
    /// <ul>
          11  +
    /// <li>
          12  +
    /// <p>InvokedAfter: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and later.</p></li>
          13  +
    /// <li>
          14  +
    /// <p>InvokedBefore: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started before August 29, 2024.</p></li>
          15  +
    /// <li>
          16  +
    /// <p>Target: Specify a managed node to which session connections have been made.</p></li>
          17  +
    /// <li>
          18  +
    /// <p>Owner: Specify an Amazon Web Services user to see a list of sessions started by that user.</p></li>
          19  +
    /// <li>
          20  +
    /// <p>Status: Specify a valid session status to see a list of all sessions with that status. Status values you can specify include:</p>
          21  +
    /// <ul>
          22  +
    /// <li>
          23  +
    /// <p>Connected</p></li>
          24  +
    /// <li>
          25  +
    /// <p>Connecting</p></li>
          26  +
    /// <li>
          27  +
    /// <p>Disconnected</p></li>
          28  +
    /// <li>
          29  +
    /// <p>Terminated</p></li>
          30  +
    /// <li>
          31  +
    /// <p>Terminating</p></li>
          32  +
    /// <li>
          33  +
    /// <p>Failed</p></li>
          34  +
    /// </ul></li>
          35  +
    /// <li>
          36  +
    /// <p>SessionId: Specify a session ID to return details about the session.</p></li>
          37  +
    /// </ul>
          38  +
    pub value: ::std::string::String,
          39  +
}
          40  +
impl SessionFilter {
          41  +
    /// <p>The name of the filter.</p>
          42  +
    pub fn key(&self) -> &crate::types::SessionFilterKey {
          43  +
        &self.key
          44  +
    }
          45  +
    /// <p>The filter value. Valid values for each filter key are as follows:</p>
          46  +
    /// <ul>
          47  +
    /// <li>
          48  +
    /// <p>InvokedAfter: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and later.</p></li>
          49  +
    /// <li>
          50  +
    /// <p>InvokedBefore: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started before August 29, 2024.</p></li>
          51  +
    /// <li>
          52  +
    /// <p>Target: Specify a managed node to which session connections have been made.</p></li>
          53  +
    /// <li>
          54  +
    /// <p>Owner: Specify an Amazon Web Services user to see a list of sessions started by that user.</p></li>
          55  +
    /// <li>
          56  +
    /// <p>Status: Specify a valid session status to see a list of all sessions with that status. Status values you can specify include:</p>
          57  +
    /// <ul>
          58  +
    /// <li>
          59  +
    /// <p>Connected</p></li>
          60  +
    /// <li>
          61  +
    /// <p>Connecting</p></li>
          62  +
    /// <li>
          63  +
    /// <p>Disconnected</p></li>
          64  +
    /// <li>
          65  +
    /// <p>Terminated</p></li>
          66  +
    /// <li>
          67  +
    /// <p>Terminating</p></li>
          68  +
    /// <li>
          69  +
    /// <p>Failed</p></li>
          70  +
    /// </ul></li>
          71  +
    /// <li>
          72  +
    /// <p>SessionId: Specify a session ID to return details about the session.</p></li>
          73  +
    /// </ul>
          74  +
    pub fn value(&self) -> &str {
          75  +
        use std::ops::Deref;
          76  +
        self.value.deref()
          77  +
    }
          78  +
}
          79  +
static SESSIONFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          80  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SessionFilter$key", "com.amazonaws.ssm", "SessionFilter"),
          81  +
    ::aws_smithy_schema::ShapeType::String,
          82  +
    "key",
          83  +
    0,
          84  +
);
          85  +
static SESSIONFILTER_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          86  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SessionFilter$value", "com.amazonaws.ssm", "SessionFilter"),
          87  +
    ::aws_smithy_schema::ShapeType::String,
          88  +
    "value",
          89  +
    1,
          90  +
);
          91  +
static SESSIONFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          92  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SessionFilter", "com.amazonaws.ssm", "SessionFilter"),
          93  +
    ::aws_smithy_schema::ShapeType::Structure,
          94  +
    &[&SESSIONFILTER_MEMBER_KEY, &SESSIONFILTER_MEMBER_VALUE],
          95  +
);
          96  +
impl SessionFilter {
          97  +
    /// The schema for this shape.
          98  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SESSIONFILTER_SCHEMA;
          99  +
}
         100  +
impl ::aws_smithy_schema::serde::SerializableStruct for SessionFilter {
         101  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         102  +
    fn serialize_members(
         103  +
        &self,
         104  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         105  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         106  +
        {
         107  +
            let val = &self.key;
         108  +
            ser.write_string(&SESSIONFILTER_MEMBER_KEY, val.as_str())?;
         109  +
        }
         110  +
        {
         111  +
            let val = &self.value;
         112  +
            ser.write_string(&SESSIONFILTER_MEMBER_VALUE, val)?;
         113  +
        }
         114  +
        Ok(())
         115  +
    }
         116  +
}
         117  +
impl SessionFilter {
         118  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         119  +
    pub fn deserialize(
         120  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         121  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         122  +
        #[allow(unused_variables, unused_mut)]
         123  +
        let mut builder = Self::builder();
         124  +
        #[allow(
         125  +
            unused_variables,
         126  +
            unreachable_code,
         127  +
            clippy::single_match,
         128  +
            clippy::match_single_binding,
         129  +
            clippy::diverging_sub_expression
         130  +
        )]
         131  +
        deserializer.read_struct(&SESSIONFILTER_SCHEMA, &mut |member, deser| {
         132  +
            match member.member_index() {
         133  +
                Some(0) => {
         134  +
                    builder.key = Some(crate::types::SessionFilterKey::from(deser.read_string(member)?.as_str()));
         135  +
                }
         136  +
                Some(1) => {
         137  +
                    builder.value = Some(deser.read_string(member)?);
         138  +
                }
         139  +
                _ => {}
         140  +
            }
         141  +
            Ok(())
         142  +
        })?;
         143  +
        builder.value = builder.value.or(Some(String::new()));
         144  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         145  +
    }
         146  +
}
         147  +
impl SessionFilter {
         148  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         149  +
    pub fn deserialize_with_response(
         150  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         151  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         152  +
        _status: u16,
         153  +
        _body: &[u8],
         154  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         155  +
        Self::deserialize(deserializer)
         156  +
    }
         157  +
}
         158  +
impl SessionFilter {
         159  +
    /// Creates a new builder-style object to manufacture [`SessionFilter`](crate::types::SessionFilter).
         160  +
    pub fn builder() -> crate::types::builders::SessionFilterBuilder {
         161  +
        crate::types::builders::SessionFilterBuilder::default()
         162  +
    }
         163  +
}
         164  +
         165  +
/// A builder for [`SessionFilter`](crate::types::SessionFilter).
         166  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         167  +
#[non_exhaustive]
         168  +
pub struct SessionFilterBuilder {
         169  +
    pub(crate) key: ::std::option::Option<crate::types::SessionFilterKey>,
         170  +
    pub(crate) value: ::std::option::Option<::std::string::String>,
         171  +
}
         172  +
impl SessionFilterBuilder {
         173  +
    /// <p>The name of the filter.</p>
         174  +
    /// This field is required.
         175  +
    pub fn key(mut self, input: crate::types::SessionFilterKey) -> Self {
         176  +
        self.key = ::std::option::Option::Some(input);
         177  +
        self
         178  +
    }
         179  +
    /// <p>The name of the filter.</p>
         180  +
    pub fn set_key(mut self, input: ::std::option::Option<crate::types::SessionFilterKey>) -> Self {
         181  +
        self.key = input;
         182  +
        self
         183  +
    }
         184  +
    /// <p>The name of the filter.</p>
         185  +
    pub fn get_key(&self) -> &::std::option::Option<crate::types::SessionFilterKey> {
         186  +
        &self.key
         187  +
    }
         188  +
    /// <p>The filter value. Valid values for each filter key are as follows:</p>
         189  +
    /// <ul>
         190  +
    /// <li>
         191  +
    /// <p>InvokedAfter: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and later.</p></li>
         192  +
    /// <li>
         193  +
    /// <p>InvokedBefore: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started before August 29, 2024.</p></li>
         194  +
    /// <li>
         195  +
    /// <p>Target: Specify a managed node to which session connections have been made.</p></li>
         196  +
    /// <li>
         197  +
    /// <p>Owner: Specify an Amazon Web Services user to see a list of sessions started by that user.</p></li>
         198  +
    /// <li>
         199  +
    /// <p>Status: Specify a valid session status to see a list of all sessions with that status. Status values you can specify include:</p>
         200  +
    /// <ul>
         201  +
    /// <li>
         202  +
    /// <p>Connected</p></li>
         203  +
    /// <li>
         204  +
    /// <p>Connecting</p></li>
         205  +
    /// <li>
         206  +
    /// <p>Disconnected</p></li>
         207  +
    /// <li>
         208  +
    /// <p>Terminated</p></li>
         209  +
    /// <li>
         210  +
    /// <p>Terminating</p></li>
         211  +
    /// <li>
         212  +
    /// <p>Failed</p></li>
         213  +
    /// </ul></li>
         214  +
    /// <li>
         215  +
    /// <p>SessionId: Specify a session ID to return details about the session.</p></li>
         216  +
    /// </ul>
         217  +
    /// This field is required.
         218  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         219  +
        self.value = ::std::option::Option::Some(input.into());
         220  +
        self
         221  +
    }
         222  +
    /// <p>The filter value. Valid values for each filter key are as follows:</p>
         223  +
    /// <ul>
         224  +
    /// <li>
         225  +
    /// <p>InvokedAfter: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and later.</p></li>
         226  +
    /// <li>
         227  +
    /// <p>InvokedBefore: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started before August 29, 2024.</p></li>
         228  +
    /// <li>
         229  +
    /// <p>Target: Specify a managed node to which session connections have been made.</p></li>
         230  +
    /// <li>
         231  +
    /// <p>Owner: Specify an Amazon Web Services user to see a list of sessions started by that user.</p></li>
         232  +
    /// <li>
         233  +
    /// <p>Status: Specify a valid session status to see a list of all sessions with that status. Status values you can specify include:</p>
         234  +
    /// <ul>
         235  +
    /// <li>
         236  +
    /// <p>Connected</p></li>
         237  +
    /// <li>
         238  +
    /// <p>Connecting</p></li>
         239  +
    /// <li>
         240  +
    /// <p>Disconnected</p></li>
         241  +
    /// <li>
         242  +
    /// <p>Terminated</p></li>
         243  +
    /// <li>
         244  +
    /// <p>Terminating</p></li>
         245  +
    /// <li>
         246  +
    /// <p>Failed</p></li>
         247  +
    /// </ul></li>
         248  +
    /// <li>
         249  +
    /// <p>SessionId: Specify a session ID to return details about the session.</p></li>
         250  +
    /// </ul>
         251  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         252  +
        self.value = input;
         253  +
        self
         254  +
    }
         255  +
    /// <p>The filter value. Valid values for each filter key are as follows:</p>
         256  +
    /// <ul>
         257  +
    /// <li>
         258  +
    /// <p>InvokedAfter: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and later.</p></li>
         259  +
    /// <li>
         260  +
    /// <p>InvokedBefore: Specify a timestamp to limit your results. For example, specify 2024-08-29T00:00:00Z to see sessions that started before August 29, 2024.</p></li>
         261  +
    /// <li>
         262  +
    /// <p>Target: Specify a managed node to which session connections have been made.</p></li>
         263  +
    /// <li>
         264  +
    /// <p>Owner: Specify an Amazon Web Services user to see a list of sessions started by that user.</p></li>
         265  +
    /// <li>
         266  +
    /// <p>Status: Specify a valid session status to see a list of all sessions with that status. Status values you can specify include:</p>
         267  +
    /// <ul>
         268  +
    /// <li>
         269  +
    /// <p>Connected</p></li>
         270  +
    /// <li>
         271  +
    /// <p>Connecting</p></li>
         272  +
    /// <li>
         273  +
    /// <p>Disconnected</p></li>
         274  +
    /// <li>
         275  +
    /// <p>Terminated</p></li>
         276  +
    /// <li>
         277  +
    /// <p>Terminating</p></li>
         278  +
    /// <li>
         279  +
    /// <p>Failed</p></li>
         280  +
    /// </ul></li>
         281  +
    /// <li>
         282  +
    /// <p>SessionId: Specify a session ID to return details about the session.</p></li>
         283  +
    /// </ul>
         284  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         285  +
        &self.value
         286  +
    }
         287  +
    /// Consumes the builder and constructs a [`SessionFilter`](crate::types::SessionFilter).
         288  +
    /// This method will fail if any of the following fields are not set:
         289  +
    /// - [`key`](crate::types::builders::SessionFilterBuilder::key)
         290  +
    /// - [`value`](crate::types::builders::SessionFilterBuilder::value)
         291  +
    pub fn build(self) -> ::std::result::Result<crate::types::SessionFilter, ::aws_smithy_types::error::operation::BuildError> {
         292  +
        ::std::result::Result::Ok(crate::types::SessionFilter {
         293  +
            key: self.key.ok_or_else(|| {
         294  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         295  +
                    "key",
         296  +
                    "key was not specified but it is required when building SessionFilter",
         297  +
                )
         298  +
            })?,
         299  +
            value: self.value.ok_or_else(|| {
         300  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         301  +
                    "value",
         302  +
                    "value was not specified but it is required when building SessionFilter",
         303  +
                )
         304  +
            })?,
         305  +
        })
         306  +
    }
         307  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_session_filter_key.rs

@@ -0,1 +0,138 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `SessionFilterKey`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let sessionfilterkey = unimplemented!();
          14  +
/// match sessionfilterkey {
          15  +
///     SessionFilterKey::AccessType => { /* ... */ },
          16  +
///     SessionFilterKey::InvokedAfter => { /* ... */ },
          17  +
///     SessionFilterKey::InvokedBefore => { /* ... */ },
          18  +
///     SessionFilterKey::Owner => { /* ... */ },
          19  +
///     SessionFilterKey::SessionId => { /* ... */ },
          20  +
///     SessionFilterKey::Status => { /* ... */ },
          21  +
///     SessionFilterKey::TargetId => { /* ... */ },
          22  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          23  +
///     _ => { /* ... */ },
          24  +
/// }
          25  +
/// ```
          26  +
/// The above code demonstrates that when `sessionfilterkey` represents
          27  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          28  +
/// even though the enum does not contain a variant `SessionFilterKey::NewFeature`
          29  +
/// in the current version of SDK. The reason is that the variable `other`,
          30  +
/// created by the `@` operator, is bound to
          31  +
/// `SessionFilterKey::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          32  +
/// and calling `as_str` on it yields `"NewFeature"`.
          33  +
/// This match expression is forward-compatible when executed with a newer
          34  +
/// version of SDK where the variant `SessionFilterKey::NewFeature` is defined.
          35  +
/// Specifically, when `sessionfilterkey` represents `NewFeature`,
          36  +
/// the execution path will hit the second last match arm as before by virtue of
          37  +
/// calling `as_str` on `SessionFilterKey::NewFeature` also yielding `"NewFeature"`.
          38  +
///
          39  +
/// Explicitly matching on the `Unknown` variant should
          40  +
/// be avoided for two reasons:
          41  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          42  +
/// - It might inadvertently shadow other intended match arms.
          43  +
///
          44  +
#[allow(missing_docs)] // documentation missing in model
          45  +
#[non_exhaustive]
          46  +
#[derive(
          47  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          48  +
)]
          49  +
pub enum SessionFilterKey {
          50  +
    #[allow(missing_docs)] // documentation missing in model
          51  +
    AccessType,
          52  +
    #[allow(missing_docs)] // documentation missing in model
          53  +
    InvokedAfter,
          54  +
    #[allow(missing_docs)] // documentation missing in model
          55  +
    InvokedBefore,
          56  +
    #[allow(missing_docs)] // documentation missing in model
          57  +
    Owner,
          58  +
    #[allow(missing_docs)] // documentation missing in model
          59  +
    SessionId,
          60  +
    #[allow(missing_docs)] // documentation missing in model
          61  +
    Status,
          62  +
    #[allow(missing_docs)] // documentation missing in model
          63  +
    TargetId,
          64  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          65  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          66  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          67  +
}
          68  +
impl ::std::convert::From<&str> for SessionFilterKey {
          69  +
    fn from(s: &str) -> Self {
          70  +
        match s {
          71  +
            "AccessType" => SessionFilterKey::AccessType,
          72  +
            "InvokedAfter" => SessionFilterKey::InvokedAfter,
          73  +
            "InvokedBefore" => SessionFilterKey::InvokedBefore,
          74  +
            "Owner" => SessionFilterKey::Owner,
          75  +
            "SessionId" => SessionFilterKey::SessionId,
          76  +
            "Status" => SessionFilterKey::Status,
          77  +
            "Target" => SessionFilterKey::TargetId,
          78  +
            other => SessionFilterKey::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          79  +
        }
          80  +
    }
          81  +
}
          82  +
impl ::std::str::FromStr for SessionFilterKey {
          83  +
    type Err = ::std::convert::Infallible;
          84  +
          85  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          86  +
        ::std::result::Result::Ok(SessionFilterKey::from(s))
          87  +
    }
          88  +
}
          89  +
impl SessionFilterKey {
          90  +
    /// Returns the `&str` value of the enum member.
          91  +
    pub fn as_str(&self) -> &str {
          92  +
        match self {
          93  +
            SessionFilterKey::AccessType => "AccessType",
          94  +
            SessionFilterKey::InvokedAfter => "InvokedAfter",
          95  +
            SessionFilterKey::InvokedBefore => "InvokedBefore",
          96  +
            SessionFilterKey::Owner => "Owner",
          97  +
            SessionFilterKey::SessionId => "SessionId",
          98  +
            SessionFilterKey::Status => "Status",
          99  +
            SessionFilterKey::TargetId => "Target",
         100  +
            SessionFilterKey::Unknown(value) => value.as_str(),
         101  +
        }
         102  +
    }
         103  +
    /// Returns all the `&str` representations of the enum members.
         104  +
    pub const fn values() -> &'static [&'static str] {
         105  +
        &["AccessType", "InvokedAfter", "InvokedBefore", "Owner", "SessionId", "Status", "Target"]
         106  +
    }
         107  +
}
         108  +
impl ::std::convert::AsRef<str> for SessionFilterKey {
         109  +
    fn as_ref(&self) -> &str {
         110  +
        self.as_str()
         111  +
    }
         112  +
}
         113  +
impl SessionFilterKey {
         114  +
    /// Parses the enum value while disallowing unknown variants.
         115  +
    ///
         116  +
    /// Unknown variants will result in an error.
         117  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
         118  +
        match Self::from(value) {
         119  +
            #[allow(deprecated)]
         120  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
         121  +
            known => Ok(known),
         122  +
        }
         123  +
    }
         124  +
}
         125  +
impl ::std::fmt::Display for SessionFilterKey {
         126  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         127  +
        match self {
         128  +
            SessionFilterKey::AccessType => write!(f, "AccessType"),
         129  +
            SessionFilterKey::InvokedAfter => write!(f, "InvokedAfter"),
         130  +
            SessionFilterKey::InvokedBefore => write!(f, "InvokedBefore"),
         131  +
            SessionFilterKey::Owner => write!(f, "Owner"),
         132  +
            SessionFilterKey::SessionId => write!(f, "SessionId"),
         133  +
            SessionFilterKey::Status => write!(f, "Status"),
         134  +
            SessionFilterKey::TargetId => write!(f, "Target"),
         135  +
            SessionFilterKey::Unknown(value) => write!(f, "{value}"),
         136  +
        }
         137  +
    }
         138  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_session_manager_output_url.rs

@@ -0,1 +0,171 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Reserved for future use.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct SessionManagerOutputUrl {
           7  +
    /// <p>Reserved for future use.</p>
           8  +
    pub s3_output_url: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>Reserved for future use.</p>
          10  +
    pub cloud_watch_output_url: ::std::option::Option<::std::string::String>,
          11  +
}
          12  +
impl SessionManagerOutputUrl {
          13  +
    /// <p>Reserved for future use.</p>
          14  +
    pub fn s3_output_url(&self) -> ::std::option::Option<&str> {
          15  +
        self.s3_output_url.as_deref()
          16  +
    }
          17  +
    /// <p>Reserved for future use.</p>
          18  +
    pub fn cloud_watch_output_url(&self) -> ::std::option::Option<&str> {
          19  +
        self.cloud_watch_output_url.as_deref()
          20  +
    }
          21  +
}
          22  +
static SESSIONMANAGEROUTPUTURL_MEMBER_S3_OUTPUT_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm#SessionManagerOutputUrl$S3OutputUrl",
          25  +
        "com.amazonaws.ssm",
          26  +
        "SessionManagerOutputUrl",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "S3OutputUrl",
          30  +
    0,
          31  +
);
          32  +
static SESSIONMANAGEROUTPUTURL_MEMBER_CLOUD_WATCH_OUTPUT_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm#SessionManagerOutputUrl$CloudWatchOutputUrl",
          35  +
        "com.amazonaws.ssm",
          36  +
        "SessionManagerOutputUrl",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "CloudWatchOutputUrl",
          40  +
    1,
          41  +
);
          42  +
static SESSIONMANAGEROUTPUTURL_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts(
          44  +
        "com.amazonaws.ssm#SessionManagerOutputUrl",
          45  +
        "com.amazonaws.ssm",
          46  +
        "SessionManagerOutputUrl",
          47  +
    ),
          48  +
    ::aws_smithy_schema::ShapeType::Structure,
          49  +
    &[
          50  +
        &SESSIONMANAGEROUTPUTURL_MEMBER_S3_OUTPUT_URL,
          51  +
        &SESSIONMANAGEROUTPUTURL_MEMBER_CLOUD_WATCH_OUTPUT_URL,
          52  +
    ],
          53  +
);
          54  +
impl SessionManagerOutputUrl {
          55  +
    /// The schema for this shape.
          56  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SESSIONMANAGEROUTPUTURL_SCHEMA;
          57  +
}
          58  +
impl ::aws_smithy_schema::serde::SerializableStruct for SessionManagerOutputUrl {
          59  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          60  +
    fn serialize_members(
          61  +
        &self,
          62  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          63  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          64  +
        if let Some(ref val) = self.s3_output_url {
          65  +
            ser.write_string(&SESSIONMANAGEROUTPUTURL_MEMBER_S3_OUTPUT_URL, val)?;
          66  +
        }
          67  +
        if let Some(ref val) = self.cloud_watch_output_url {
          68  +
            ser.write_string(&SESSIONMANAGEROUTPUTURL_MEMBER_CLOUD_WATCH_OUTPUT_URL, val)?;
          69  +
        }
          70  +
        Ok(())
          71  +
    }
          72  +
}
          73  +
impl SessionManagerOutputUrl {
          74  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          78  +
        #[allow(unused_variables, unused_mut)]
          79  +
        let mut builder = Self::builder();
          80  +
        #[allow(
          81  +
            unused_variables,
          82  +
            unreachable_code,
          83  +
            clippy::single_match,
          84  +
            clippy::match_single_binding,
          85  +
            clippy::diverging_sub_expression
          86  +
        )]
          87  +
        deserializer.read_struct(&SESSIONMANAGEROUTPUTURL_SCHEMA, &mut |member, deser| {
          88  +
            match member.member_index() {
          89  +
                Some(0) => {
          90  +
                    if deser.is_null() {
          91  +
                        deser.read_null()?;
          92  +
                    } else {
          93  +
                        builder.s3_output_url = Some(deser.read_string(member)?);
          94  +
                    }
          95  +
                }
          96  +
                Some(1) => {
          97  +
                    if deser.is_null() {
          98  +
                        deser.read_null()?;
          99  +
                    } else {
         100  +
                        builder.cloud_watch_output_url = Some(deser.read_string(member)?);
         101  +
                    }
         102  +
                }
         103  +
                _ => {}
         104  +
            }
         105  +
            Ok(())
         106  +
        })?;
         107  +
        Ok(builder.build())
         108  +
    }
         109  +
}
         110  +
impl SessionManagerOutputUrl {
         111  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         112  +
    pub fn deserialize_with_response(
         113  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         114  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         115  +
        _status: u16,
         116  +
        _body: &[u8],
         117  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         118  +
        Self::deserialize(deserializer)
         119  +
    }
         120  +
}
         121  +
impl SessionManagerOutputUrl {
         122  +
    /// Creates a new builder-style object to manufacture [`SessionManagerOutputUrl`](crate::types::SessionManagerOutputUrl).
         123  +
    pub fn builder() -> crate::types::builders::SessionManagerOutputUrlBuilder {
         124  +
        crate::types::builders::SessionManagerOutputUrlBuilder::default()
         125  +
    }
         126  +
}
         127  +
         128  +
/// A builder for [`SessionManagerOutputUrl`](crate::types::SessionManagerOutputUrl).
         129  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         130  +
#[non_exhaustive]
         131  +
pub struct SessionManagerOutputUrlBuilder {
         132  +
    pub(crate) s3_output_url: ::std::option::Option<::std::string::String>,
         133  +
    pub(crate) cloud_watch_output_url: ::std::option::Option<::std::string::String>,
         134  +
}
         135  +
impl SessionManagerOutputUrlBuilder {
         136  +
    /// <p>Reserved for future use.</p>
         137  +
    pub fn s3_output_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         138  +
        self.s3_output_url = ::std::option::Option::Some(input.into());
         139  +
        self
         140  +
    }
         141  +
    /// <p>Reserved for future use.</p>
         142  +
    pub fn set_s3_output_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         143  +
        self.s3_output_url = input;
         144  +
        self
         145  +
    }
         146  +
    /// <p>Reserved for future use.</p>
         147  +
    pub fn get_s3_output_url(&self) -> &::std::option::Option<::std::string::String> {
         148  +
        &self.s3_output_url
         149  +
    }
         150  +
    /// <p>Reserved for future use.</p>
         151  +
    pub fn cloud_watch_output_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         152  +
        self.cloud_watch_output_url = ::std::option::Option::Some(input.into());
         153  +
        self
         154  +
    }
         155  +
    /// <p>Reserved for future use.</p>
         156  +
    pub fn set_cloud_watch_output_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         157  +
        self.cloud_watch_output_url = input;
         158  +
        self
         159  +
    }
         160  +
    /// <p>Reserved for future use.</p>
         161  +
    pub fn get_cloud_watch_output_url(&self) -> &::std::option::Option<::std::string::String> {
         162  +
        &self.cloud_watch_output_url
         163  +
    }
         164  +
    /// Consumes the builder and constructs a [`SessionManagerOutputUrl`](crate::types::SessionManagerOutputUrl).
         165  +
    pub fn build(self) -> crate::types::SessionManagerOutputUrl {
         166  +
        crate::types::SessionManagerOutputUrl {
         167  +
            s3_output_url: self.s3_output_url,
         168  +
            cloud_watch_output_url: self.cloud_watch_output_url,
         169  +
        }
         170  +
    }
         171  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_session_state.rs

@@ -0,1 +0,108 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `SessionState`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let sessionstate = unimplemented!();
          14  +
/// match sessionstate {
          15  +
///     SessionState::Active => { /* ... */ },
          16  +
///     SessionState::History => { /* ... */ },
          17  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          18  +
///     _ => { /* ... */ },
          19  +
/// }
          20  +
/// ```
          21  +
/// The above code demonstrates that when `sessionstate` represents
          22  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          23  +
/// even though the enum does not contain a variant `SessionState::NewFeature`
          24  +
/// in the current version of SDK. The reason is that the variable `other`,
          25  +
/// created by the `@` operator, is bound to
          26  +
/// `SessionState::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          27  +
/// and calling `as_str` on it yields `"NewFeature"`.
          28  +
/// This match expression is forward-compatible when executed with a newer
          29  +
/// version of SDK where the variant `SessionState::NewFeature` is defined.
          30  +
/// Specifically, when `sessionstate` represents `NewFeature`,
          31  +
/// the execution path will hit the second last match arm as before by virtue of
          32  +
/// calling `as_str` on `SessionState::NewFeature` also yielding `"NewFeature"`.
          33  +
///
          34  +
/// Explicitly matching on the `Unknown` variant should
          35  +
/// be avoided for two reasons:
          36  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          37  +
/// - It might inadvertently shadow other intended match arms.
          38  +
///
          39  +
#[allow(missing_docs)] // documentation missing in model
          40  +
#[non_exhaustive]
          41  +
#[derive(
          42  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          43  +
)]
          44  +
pub enum SessionState {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    Active,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    History,
          49  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          50  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          51  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          52  +
}
          53  +
impl ::std::convert::From<&str> for SessionState {
          54  +
    fn from(s: &str) -> Self {
          55  +
        match s {
          56  +
            "Active" => SessionState::Active,
          57  +
            "History" => SessionState::History,
          58  +
            other => SessionState::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          59  +
        }
          60  +
    }
          61  +
}
          62  +
impl ::std::str::FromStr for SessionState {
          63  +
    type Err = ::std::convert::Infallible;
          64  +
          65  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          66  +
        ::std::result::Result::Ok(SessionState::from(s))
          67  +
    }
          68  +
}
          69  +
impl SessionState {
          70  +
    /// Returns the `&str` value of the enum member.
          71  +
    pub fn as_str(&self) -> &str {
          72  +
        match self {
          73  +
            SessionState::Active => "Active",
          74  +
            SessionState::History => "History",
          75  +
            SessionState::Unknown(value) => value.as_str(),
          76  +
        }
          77  +
    }
          78  +
    /// Returns all the `&str` representations of the enum members.
          79  +
    pub const fn values() -> &'static [&'static str] {
          80  +
        &["Active", "History"]
          81  +
    }
          82  +
}
          83  +
impl ::std::convert::AsRef<str> for SessionState {
          84  +
    fn as_ref(&self) -> &str {
          85  +
        self.as_str()
          86  +
    }
          87  +
}
          88  +
impl SessionState {
          89  +
    /// Parses the enum value while disallowing unknown variants.
          90  +
    ///
          91  +
    /// Unknown variants will result in an error.
          92  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
          93  +
        match Self::from(value) {
          94  +
            #[allow(deprecated)]
          95  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
          96  +
            known => Ok(known),
          97  +
        }
          98  +
    }
          99  +
}
         100  +
impl ::std::fmt::Display for SessionState {
         101  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         102  +
        match self {
         103  +
            SessionState::Active => write!(f, "Active"),
         104  +
            SessionState::History => write!(f, "History"),
         105  +
            SessionState::Unknown(value) => write!(f, "{value}"),
         106  +
        }
         107  +
    }
         108  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_session_status.rs

@@ -0,1 +0,132 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `SessionStatus`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let sessionstatus = unimplemented!();
          14  +
/// match sessionstatus {
          15  +
///     SessionStatus::Connected => { /* ... */ },
          16  +
///     SessionStatus::Connecting => { /* ... */ },
          17  +
///     SessionStatus::Disconnected => { /* ... */ },
          18  +
///     SessionStatus::Failed => { /* ... */ },
          19  +
///     SessionStatus::Terminated => { /* ... */ },
          20  +
///     SessionStatus::Terminating => { /* ... */ },
          21  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          22  +
///     _ => { /* ... */ },
          23  +
/// }
          24  +
/// ```
          25  +
/// The above code demonstrates that when `sessionstatus` represents
          26  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          27  +
/// even though the enum does not contain a variant `SessionStatus::NewFeature`
          28  +
/// in the current version of SDK. The reason is that the variable `other`,
          29  +
/// created by the `@` operator, is bound to
          30  +
/// `SessionStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          31  +
/// and calling `as_str` on it yields `"NewFeature"`.
          32  +
/// This match expression is forward-compatible when executed with a newer
          33  +
/// version of SDK where the variant `SessionStatus::NewFeature` is defined.
          34  +
/// Specifically, when `sessionstatus` represents `NewFeature`,
          35  +
/// the execution path will hit the second last match arm as before by virtue of
          36  +
/// calling `as_str` on `SessionStatus::NewFeature` also yielding `"NewFeature"`.
          37  +
///
          38  +
/// Explicitly matching on the `Unknown` variant should
          39  +
/// be avoided for two reasons:
          40  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          41  +
/// - It might inadvertently shadow other intended match arms.
          42  +
///
          43  +
#[allow(missing_docs)] // documentation missing in model
          44  +
#[non_exhaustive]
          45  +
#[derive(
          46  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          47  +
)]
          48  +
pub enum SessionStatus {
          49  +
    #[allow(missing_docs)] // documentation missing in model
          50  +
    Connected,
          51  +
    #[allow(missing_docs)] // documentation missing in model
          52  +
    Connecting,
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    Disconnected,
          55  +
    #[allow(missing_docs)] // documentation missing in model
          56  +
    Failed,
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    Terminated,
          59  +
    #[allow(missing_docs)] // documentation missing in model
          60  +
    Terminating,
          61  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          62  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          63  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          64  +
}
          65  +
impl ::std::convert::From<&str> for SessionStatus {
          66  +
    fn from(s: &str) -> Self {
          67  +
        match s {
          68  +
            "Connected" => SessionStatus::Connected,
          69  +
            "Connecting" => SessionStatus::Connecting,
          70  +
            "Disconnected" => SessionStatus::Disconnected,
          71  +
            "Failed" => SessionStatus::Failed,
          72  +
            "Terminated" => SessionStatus::Terminated,
          73  +
            "Terminating" => SessionStatus::Terminating,
          74  +
            other => SessionStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          75  +
        }
          76  +
    }
          77  +
}
          78  +
impl ::std::str::FromStr for SessionStatus {
          79  +
    type Err = ::std::convert::Infallible;
          80  +
          81  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          82  +
        ::std::result::Result::Ok(SessionStatus::from(s))
          83  +
    }
          84  +
}
          85  +
impl SessionStatus {
          86  +
    /// Returns the `&str` value of the enum member.
          87  +
    pub fn as_str(&self) -> &str {
          88  +
        match self {
          89  +
            SessionStatus::Connected => "Connected",
          90  +
            SessionStatus::Connecting => "Connecting",
          91  +
            SessionStatus::Disconnected => "Disconnected",
          92  +
            SessionStatus::Failed => "Failed",
          93  +
            SessionStatus::Terminated => "Terminated",
          94  +
            SessionStatus::Terminating => "Terminating",
          95  +
            SessionStatus::Unknown(value) => value.as_str(),
          96  +
        }
          97  +
    }
          98  +
    /// Returns all the `&str` representations of the enum members.
          99  +
    pub const fn values() -> &'static [&'static str] {
         100  +
        &["Connected", "Connecting", "Disconnected", "Failed", "Terminated", "Terminating"]
         101  +
    }
         102  +
}
         103  +
impl ::std::convert::AsRef<str> for SessionStatus {
         104  +
    fn as_ref(&self) -> &str {
         105  +
        self.as_str()
         106  +
    }
         107  +
}
         108  +
impl SessionStatus {
         109  +
    /// Parses the enum value while disallowing unknown variants.
         110  +
    ///
         111  +
    /// Unknown variants will result in an error.
         112  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
         113  +
        match Self::from(value) {
         114  +
            #[allow(deprecated)]
         115  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
         116  +
            known => Ok(known),
         117  +
        }
         118  +
    }
         119  +
}
         120  +
impl ::std::fmt::Display for SessionStatus {
         121  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         122  +
        match self {
         123  +
            SessionStatus::Connected => write!(f, "Connected"),
         124  +
            SessionStatus::Connecting => write!(f, "Connecting"),
         125  +
            SessionStatus::Disconnected => write!(f, "Disconnected"),
         126  +
            SessionStatus::Failed => write!(f, "Failed"),
         127  +
            SessionStatus::Terminated => write!(f, "Terminated"),
         128  +
            SessionStatus::Terminating => write!(f, "Terminating"),
         129  +
            SessionStatus::Unknown(value) => write!(f, "{value}"),
         130  +
        }
         131  +
    }
         132  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_severity_summary.rs

@@ -0,1 +0,305 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The number of managed nodes found for each patch severity level defined in the request filter.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct SeveritySummary {
           7  +
    /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
           8  +
    pub critical_count: i32,
           9  +
    /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
          10  +
    pub high_count: i32,
          11  +
    /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
          12  +
    pub medium_count: i32,
          13  +
    /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
          14  +
    pub low_count: i32,
          15  +
    /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
          16  +
    pub informational_count: i32,
          17  +
    /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
          18  +
    pub unspecified_count: i32,
          19  +
}
          20  +
impl SeveritySummary {
          21  +
    /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
          22  +
    pub fn critical_count(&self) -> i32 {
          23  +
        self.critical_count
          24  +
    }
          25  +
    /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
          26  +
    pub fn high_count(&self) -> i32 {
          27  +
        self.high_count
          28  +
    }
          29  +
    /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
          30  +
    pub fn medium_count(&self) -> i32 {
          31  +
        self.medium_count
          32  +
    }
          33  +
    /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
          34  +
    pub fn low_count(&self) -> i32 {
          35  +
        self.low_count
          36  +
    }
          37  +
    /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
          38  +
    pub fn informational_count(&self) -> i32 {
          39  +
        self.informational_count
          40  +
    }
          41  +
    /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
          42  +
    pub fn unspecified_count(&self) -> i32 {
          43  +
        self.unspecified_count
          44  +
    }
          45  +
}
          46  +
static SEVERITYSUMMARY_MEMBER_CRITICAL_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$CriticalCount", "com.amazonaws.ssm", "SeveritySummary"),
          48  +
    ::aws_smithy_schema::ShapeType::Integer,
          49  +
    "CriticalCount",
          50  +
    0,
          51  +
);
          52  +
static SEVERITYSUMMARY_MEMBER_HIGH_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$HighCount", "com.amazonaws.ssm", "SeveritySummary"),
          54  +
    ::aws_smithy_schema::ShapeType::Integer,
          55  +
    "HighCount",
          56  +
    1,
          57  +
);
          58  +
static SEVERITYSUMMARY_MEMBER_MEDIUM_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$MediumCount", "com.amazonaws.ssm", "SeveritySummary"),
          60  +
    ::aws_smithy_schema::ShapeType::Integer,
          61  +
    "MediumCount",
          62  +
    2,
          63  +
);
          64  +
static SEVERITYSUMMARY_MEMBER_LOW_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          65  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary$LowCount", "com.amazonaws.ssm", "SeveritySummary"),
          66  +
    ::aws_smithy_schema::ShapeType::Integer,
          67  +
    "LowCount",
          68  +
    3,
          69  +
);
          70  +
static SEVERITYSUMMARY_MEMBER_INFORMATIONAL_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          71  +
    ::aws_smithy_schema::ShapeId::from_parts(
          72  +
        "com.amazonaws.ssm#SeveritySummary$InformationalCount",
          73  +
        "com.amazonaws.ssm",
          74  +
        "SeveritySummary",
          75  +
    ),
          76  +
    ::aws_smithy_schema::ShapeType::Integer,
          77  +
    "InformationalCount",
          78  +
    4,
          79  +
);
          80  +
static SEVERITYSUMMARY_MEMBER_UNSPECIFIED_COUNT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts(
          82  +
        "com.amazonaws.ssm#SeveritySummary$UnspecifiedCount",
          83  +
        "com.amazonaws.ssm",
          84  +
        "SeveritySummary",
          85  +
    ),
          86  +
    ::aws_smithy_schema::ShapeType::Integer,
          87  +
    "UnspecifiedCount",
          88  +
    5,
          89  +
);
          90  +
static SEVERITYSUMMARY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          91  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#SeveritySummary", "com.amazonaws.ssm", "SeveritySummary"),
          92  +
    ::aws_smithy_schema::ShapeType::Structure,
          93  +
    &[
          94  +
        &SEVERITYSUMMARY_MEMBER_CRITICAL_COUNT,
          95  +
        &SEVERITYSUMMARY_MEMBER_HIGH_COUNT,
          96  +
        &SEVERITYSUMMARY_MEMBER_MEDIUM_COUNT,
          97  +
        &SEVERITYSUMMARY_MEMBER_LOW_COUNT,
          98  +
        &SEVERITYSUMMARY_MEMBER_INFORMATIONAL_COUNT,
          99  +
        &SEVERITYSUMMARY_MEMBER_UNSPECIFIED_COUNT,
         100  +
    ],
         101  +
);
         102  +
impl SeveritySummary {
         103  +
    /// The schema for this shape.
         104  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &SEVERITYSUMMARY_SCHEMA;
         105  +
}
         106  +
impl ::aws_smithy_schema::serde::SerializableStruct for SeveritySummary {
         107  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         108  +
    fn serialize_members(
         109  +
        &self,
         110  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         111  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         112  +
        {
         113  +
            let val = &self.critical_count;
         114  +
            ser.write_integer(&SEVERITYSUMMARY_MEMBER_CRITICAL_COUNT, *val)?;
         115  +
        }
         116  +
        {
         117  +
            let val = &self.high_count;
         118  +
            ser.write_integer(&SEVERITYSUMMARY_MEMBER_HIGH_COUNT, *val)?;
         119  +
        }
         120  +
        {
         121  +
            let val = &self.medium_count;
         122  +
            ser.write_integer(&SEVERITYSUMMARY_MEMBER_MEDIUM_COUNT, *val)?;
         123  +
        }
         124  +
        {
         125  +
            let val = &self.low_count;
         126  +
            ser.write_integer(&SEVERITYSUMMARY_MEMBER_LOW_COUNT, *val)?;
         127  +
        }
         128  +
        {
         129  +
            let val = &self.informational_count;
         130  +
            ser.write_integer(&SEVERITYSUMMARY_MEMBER_INFORMATIONAL_COUNT, *val)?;
         131  +
        }
         132  +
        {
         133  +
            let val = &self.unspecified_count;
         134  +
            ser.write_integer(&SEVERITYSUMMARY_MEMBER_UNSPECIFIED_COUNT, *val)?;
         135  +
        }
         136  +
        Ok(())
         137  +
    }
         138  +
}
         139  +
impl SeveritySummary {
         140  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         141  +
    pub fn deserialize(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         144  +
        #[allow(unused_variables, unused_mut)]
         145  +
        let mut builder = Self::builder();
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&SEVERITYSUMMARY_SCHEMA, &mut |member, deser| {
         154  +
            match member.member_index() {
         155  +
                Some(0) => {
         156  +
                    builder.critical_count = Some(deser.read_integer(member)?);
         157  +
                }
         158  +
                Some(1) => {
         159  +
                    builder.high_count = Some(deser.read_integer(member)?);
         160  +
                }
         161  +
                Some(2) => {
         162  +
                    builder.medium_count = Some(deser.read_integer(member)?);
         163  +
                }
         164  +
                Some(3) => {
         165  +
                    builder.low_count = Some(deser.read_integer(member)?);
         166  +
                }
         167  +
                Some(4) => {
         168  +
                    builder.informational_count = Some(deser.read_integer(member)?);
         169  +
                }
         170  +
                Some(5) => {
         171  +
                    builder.unspecified_count = Some(deser.read_integer(member)?);
         172  +
                }
         173  +
                _ => {}
         174  +
            }
         175  +
            Ok(())
         176  +
        })?;
         177  +
        Ok(builder.build())
         178  +
    }
         179  +
}
         180  +
impl SeveritySummary {
         181  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         182  +
    pub fn deserialize_with_response(
         183  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         184  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         185  +
        _status: u16,
         186  +
        _body: &[u8],
         187  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         188  +
        Self::deserialize(deserializer)
         189  +
    }
         190  +
}
         191  +
impl SeveritySummary {
         192  +
    /// Creates a new builder-style object to manufacture [`SeveritySummary`](crate::types::SeveritySummary).
         193  +
    pub fn builder() -> crate::types::builders::SeveritySummaryBuilder {
         194  +
        crate::types::builders::SeveritySummaryBuilder::default()
         195  +
    }
         196  +
}
         197  +
         198  +
/// A builder for [`SeveritySummary`](crate::types::SeveritySummary).
         199  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         200  +
#[non_exhaustive]
         201  +
pub struct SeveritySummaryBuilder {
         202  +
    pub(crate) critical_count: ::std::option::Option<i32>,
         203  +
    pub(crate) high_count: ::std::option::Option<i32>,
         204  +
    pub(crate) medium_count: ::std::option::Option<i32>,
         205  +
    pub(crate) low_count: ::std::option::Option<i32>,
         206  +
    pub(crate) informational_count: ::std::option::Option<i32>,
         207  +
    pub(crate) unspecified_count: ::std::option::Option<i32>,
         208  +
}
         209  +
impl SeveritySummaryBuilder {
         210  +
    /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
         211  +
    pub fn critical_count(mut self, input: i32) -> Self {
         212  +
        self.critical_count = ::std::option::Option::Some(input);
         213  +
        self
         214  +
    }
         215  +
    /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
         216  +
    pub fn set_critical_count(mut self, input: ::std::option::Option<i32>) -> Self {
         217  +
        self.critical_count = input;
         218  +
        self
         219  +
    }
         220  +
    /// <p>The total number of resources or compliance items that have a severity level of <code>Critical</code>. Critical severity is determined by the organization that published the compliance items.</p>
         221  +
    pub fn get_critical_count(&self) -> &::std::option::Option<i32> {
         222  +
        &self.critical_count
         223  +
    }
         224  +
    /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
         225  +
    pub fn high_count(mut self, input: i32) -> Self {
         226  +
        self.high_count = ::std::option::Option::Some(input);
         227  +
        self
         228  +
    }
         229  +
    /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
         230  +
    pub fn set_high_count(mut self, input: ::std::option::Option<i32>) -> Self {
         231  +
        self.high_count = input;
         232  +
        self
         233  +
    }
         234  +
    /// <p>The total number of resources or compliance items that have a severity level of high. High severity is determined by the organization that published the compliance items.</p>
         235  +
    pub fn get_high_count(&self) -> &::std::option::Option<i32> {
         236  +
        &self.high_count
         237  +
    }
         238  +
    /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
         239  +
    pub fn medium_count(mut self, input: i32) -> Self {
         240  +
        self.medium_count = ::std::option::Option::Some(input);
         241  +
        self
         242  +
    }
         243  +
    /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
         244  +
    pub fn set_medium_count(mut self, input: ::std::option::Option<i32>) -> Self {
         245  +
        self.medium_count = input;
         246  +
        self
         247  +
    }
         248  +
    /// <p>The total number of resources or compliance items that have a severity level of medium. Medium severity is determined by the organization that published the compliance items.</p>
         249  +
    pub fn get_medium_count(&self) -> &::std::option::Option<i32> {
         250  +
        &self.medium_count
         251  +
    }
         252  +
    /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
         253  +
    pub fn low_count(mut self, input: i32) -> Self {
         254  +
        self.low_count = ::std::option::Option::Some(input);
         255  +
        self
         256  +
    }
         257  +
    /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
         258  +
    pub fn set_low_count(mut self, input: ::std::option::Option<i32>) -> Self {
         259  +
        self.low_count = input;
         260  +
        self
         261  +
    }
         262  +
    /// <p>The total number of resources or compliance items that have a severity level of low. Low severity is determined by the organization that published the compliance items.</p>
         263  +
    pub fn get_low_count(&self) -> &::std::option::Option<i32> {
         264  +
        &self.low_count
         265  +
    }
         266  +
    /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
         267  +
    pub fn informational_count(mut self, input: i32) -> Self {
         268  +
        self.informational_count = ::std::option::Option::Some(input);
         269  +
        self
         270  +
    }
         271  +
    /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
         272  +
    pub fn set_informational_count(mut self, input: ::std::option::Option<i32>) -> Self {
         273  +
        self.informational_count = input;
         274  +
        self
         275  +
    }
         276  +
    /// <p>The total number of resources or compliance items that have a severity level of informational. Informational severity is determined by the organization that published the compliance items.</p>
         277  +
    pub fn get_informational_count(&self) -> &::std::option::Option<i32> {
         278  +
        &self.informational_count
         279  +
    }
         280  +
    /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
         281  +
    pub fn unspecified_count(mut self, input: i32) -> Self {
         282  +
        self.unspecified_count = ::std::option::Option::Some(input);
         283  +
        self
         284  +
    }
         285  +
    /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
         286  +
    pub fn set_unspecified_count(mut self, input: ::std::option::Option<i32>) -> Self {
         287  +
        self.unspecified_count = input;
         288  +
        self
         289  +
    }
         290  +
    /// <p>The total number of resources or compliance items that have a severity level of unspecified. Unspecified severity is determined by the organization that published the compliance items.</p>
         291  +
    pub fn get_unspecified_count(&self) -> &::std::option::Option<i32> {
         292  +
        &self.unspecified_count
         293  +
    }
         294  +
    /// Consumes the builder and constructs a [`SeveritySummary`](crate::types::SeveritySummary).
         295  +
    pub fn build(self) -> crate::types::SeveritySummary {
         296  +
        crate::types::SeveritySummary {
         297  +
            critical_count: self.critical_count.unwrap_or_default(),
         298  +
            high_count: self.high_count.unwrap_or_default(),
         299  +
            medium_count: self.medium_count.unwrap_or_default(),
         300  +
            low_count: self.low_count.unwrap_or_default(),
         301  +
            informational_count: self.informational_count.unwrap_or_default(),
         302  +
            unspecified_count: self.unspecified_count.unwrap_or_default(),
         303  +
        }
         304  +
    }
         305  +
}