AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_patch_action.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 `PatchAction`, 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 patchaction = unimplemented!();
          14  +
/// match patchaction {
          15  +
///     PatchAction::AllowAsDependency => { /* ... */ },
          16  +
///     PatchAction::Block => { /* ... */ },
          17  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          18  +
///     _ => { /* ... */ },
          19  +
/// }
          20  +
/// ```
          21  +
/// The above code demonstrates that when `patchaction` represents
          22  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          23  +
/// even though the enum does not contain a variant `PatchAction::NewFeature`
          24  +
/// in the current version of SDK. The reason is that the variable `other`,
          25  +
/// created by the `@` operator, is bound to
          26  +
/// `PatchAction::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 `PatchAction::NewFeature` is defined.
          30  +
/// Specifically, when `patchaction` represents `NewFeature`,
          31  +
/// the execution path will hit the second last match arm as before by virtue of
          32  +
/// calling `as_str` on `PatchAction::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 PatchAction {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    AllowAsDependency,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    Block,
          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 PatchAction {
          54  +
    fn from(s: &str) -> Self {
          55  +
        match s {
          56  +
            "ALLOW_AS_DEPENDENCY" => PatchAction::AllowAsDependency,
          57  +
            "BLOCK" => PatchAction::Block,
          58  +
            other => PatchAction::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          59  +
        }
          60  +
    }
          61  +
}
          62  +
impl ::std::str::FromStr for PatchAction {
          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(PatchAction::from(s))
          67  +
    }
          68  +
}
          69  +
impl PatchAction {
          70  +
    /// Returns the `&str` value of the enum member.
          71  +
    pub fn as_str(&self) -> &str {
          72  +
        match self {
          73  +
            PatchAction::AllowAsDependency => "ALLOW_AS_DEPENDENCY",
          74  +
            PatchAction::Block => "BLOCK",
          75  +
            PatchAction::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  +
        &["ALLOW_AS_DEPENDENCY", "BLOCK"]
          81  +
    }
          82  +
}
          83  +
impl ::std::convert::AsRef<str> for PatchAction {
          84  +
    fn as_ref(&self) -> &str {
          85  +
        self.as_str()
          86  +
    }
          87  +
}
          88  +
impl PatchAction {
          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 PatchAction {
         101  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         102  +
        match self {
         103  +
            PatchAction::AllowAsDependency => write!(f, "ALLOW_AS_DEPENDENCY"),
         104  +
            PatchAction::Block => write!(f, "BLOCK"),
         105  +
            PatchAction::Unknown(value) => write!(f, "{value}"),
         106  +
        }
         107  +
    }
         108  +
}

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

@@ -0,1 +0,293 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Defines the basic information about a patch baseline.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct PatchBaselineIdentity {
           7  +
    /// <p>The ID of the patch baseline.</p>
           8  +
    pub baseline_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The name of the patch baseline.</p>
          10  +
    pub baseline_name: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>Defines the operating system the patch baseline applies to. The default value is <code>WINDOWS</code>.</p>
          12  +
    pub operating_system: ::std::option::Option<crate::types::OperatingSystem>,
          13  +
    /// <p>The description of the patch baseline.</p>
          14  +
    pub baseline_description: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>Indicates whether this is the default baseline. Amazon Web Services Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.</p>
          16  +
    pub default_baseline: bool,
          17  +
}
          18  +
impl PatchBaselineIdentity {
          19  +
    /// <p>The ID of the patch baseline.</p>
          20  +
    pub fn baseline_id(&self) -> ::std::option::Option<&str> {
          21  +
        self.baseline_id.as_deref()
          22  +
    }
          23  +
    /// <p>The name of the patch baseline.</p>
          24  +
    pub fn baseline_name(&self) -> ::std::option::Option<&str> {
          25  +
        self.baseline_name.as_deref()
          26  +
    }
          27  +
    /// <p>Defines the operating system the patch baseline applies to. The default value is <code>WINDOWS</code>.</p>
          28  +
    pub fn operating_system(&self) -> ::std::option::Option<&crate::types::OperatingSystem> {
          29  +
        self.operating_system.as_ref()
          30  +
    }
          31  +
    /// <p>The description of the patch baseline.</p>
          32  +
    pub fn baseline_description(&self) -> ::std::option::Option<&str> {
          33  +
        self.baseline_description.as_deref()
          34  +
    }
          35  +
    /// <p>Indicates whether this is the default baseline. Amazon Web Services Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.</p>
          36  +
    pub fn default_baseline(&self) -> bool {
          37  +
        self.default_baseline
          38  +
    }
          39  +
}
          40  +
static PATCHBASELINEIDENTITY_MEMBER_BASELINE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm#PatchBaselineIdentity$BaselineId",
          43  +
        "com.amazonaws.ssm",
          44  +
        "PatchBaselineIdentity",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::String,
          47  +
    "BaselineId",
          48  +
    0,
          49  +
);
          50  +
static PATCHBASELINEIDENTITY_MEMBER_BASELINE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          51  +
    ::aws_smithy_schema::ShapeId::from_parts(
          52  +
        "com.amazonaws.ssm#PatchBaselineIdentity$BaselineName",
          53  +
        "com.amazonaws.ssm",
          54  +
        "PatchBaselineIdentity",
          55  +
    ),
          56  +
    ::aws_smithy_schema::ShapeType::String,
          57  +
    "BaselineName",
          58  +
    1,
          59  +
);
          60  +
static PATCHBASELINEIDENTITY_MEMBER_OPERATING_SYSTEM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          61  +
    ::aws_smithy_schema::ShapeId::from_parts(
          62  +
        "com.amazonaws.ssm#PatchBaselineIdentity$OperatingSystem",
          63  +
        "com.amazonaws.ssm",
          64  +
        "PatchBaselineIdentity",
          65  +
    ),
          66  +
    ::aws_smithy_schema::ShapeType::String,
          67  +
    "OperatingSystem",
          68  +
    2,
          69  +
);
          70  +
static PATCHBASELINEIDENTITY_MEMBER_BASELINE_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          71  +
    ::aws_smithy_schema::ShapeId::from_parts(
          72  +
        "com.amazonaws.ssm#PatchBaselineIdentity$BaselineDescription",
          73  +
        "com.amazonaws.ssm",
          74  +
        "PatchBaselineIdentity",
          75  +
    ),
          76  +
    ::aws_smithy_schema::ShapeType::String,
          77  +
    "BaselineDescription",
          78  +
    3,
          79  +
);
          80  +
static PATCHBASELINEIDENTITY_MEMBER_DEFAULT_BASELINE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts(
          82  +
        "com.amazonaws.ssm#PatchBaselineIdentity$DefaultBaseline",
          83  +
        "com.amazonaws.ssm",
          84  +
        "PatchBaselineIdentity",
          85  +
    ),
          86  +
    ::aws_smithy_schema::ShapeType::Boolean,
          87  +
    "DefaultBaseline",
          88  +
    4,
          89  +
);
          90  +
static PATCHBASELINEIDENTITY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          91  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchBaselineIdentity", "com.amazonaws.ssm", "PatchBaselineIdentity"),
          92  +
    ::aws_smithy_schema::ShapeType::Structure,
          93  +
    &[
          94  +
        &PATCHBASELINEIDENTITY_MEMBER_BASELINE_ID,
          95  +
        &PATCHBASELINEIDENTITY_MEMBER_BASELINE_NAME,
          96  +
        &PATCHBASELINEIDENTITY_MEMBER_OPERATING_SYSTEM,
          97  +
        &PATCHBASELINEIDENTITY_MEMBER_BASELINE_DESCRIPTION,
          98  +
        &PATCHBASELINEIDENTITY_MEMBER_DEFAULT_BASELINE,
          99  +
    ],
         100  +
);
         101  +
impl PatchBaselineIdentity {
         102  +
    /// The schema for this shape.
         103  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PATCHBASELINEIDENTITY_SCHEMA;
         104  +
}
         105  +
impl ::aws_smithy_schema::serde::SerializableStruct for PatchBaselineIdentity {
         106  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         107  +
    fn serialize_members(
         108  +
        &self,
         109  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         110  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         111  +
        if let Some(ref val) = self.baseline_id {
         112  +
            ser.write_string(&PATCHBASELINEIDENTITY_MEMBER_BASELINE_ID, val)?;
         113  +
        }
         114  +
        if let Some(ref val) = self.baseline_name {
         115  +
            ser.write_string(&PATCHBASELINEIDENTITY_MEMBER_BASELINE_NAME, val)?;
         116  +
        }
         117  +
        if let Some(ref val) = self.operating_system {
         118  +
            ser.write_string(&PATCHBASELINEIDENTITY_MEMBER_OPERATING_SYSTEM, val.as_str())?;
         119  +
        }
         120  +
        if let Some(ref val) = self.baseline_description {
         121  +
            ser.write_string(&PATCHBASELINEIDENTITY_MEMBER_BASELINE_DESCRIPTION, val)?;
         122  +
        }
         123  +
        {
         124  +
            let val = &self.default_baseline;
         125  +
            ser.write_boolean(&PATCHBASELINEIDENTITY_MEMBER_DEFAULT_BASELINE, *val)?;
         126  +
        }
         127  +
        Ok(())
         128  +
    }
         129  +
}
         130  +
impl PatchBaselineIdentity {
         131  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         132  +
    pub fn deserialize(
         133  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         134  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         135  +
        #[allow(unused_variables, unused_mut)]
         136  +
        let mut builder = Self::builder();
         137  +
        #[allow(
         138  +
            unused_variables,
         139  +
            unreachable_code,
         140  +
            clippy::single_match,
         141  +
            clippy::match_single_binding,
         142  +
            clippy::diverging_sub_expression
         143  +
        )]
         144  +
        deserializer.read_struct(&PATCHBASELINEIDENTITY_SCHEMA, &mut |member, deser| {
         145  +
            match member.member_index() {
         146  +
                Some(0) => {
         147  +
                    if deser.is_null() {
         148  +
                        deser.read_null()?;
         149  +
                    } else {
         150  +
                        builder.baseline_id = Some(deser.read_string(member)?);
         151  +
                    }
         152  +
                }
         153  +
                Some(1) => {
         154  +
                    if deser.is_null() {
         155  +
                        deser.read_null()?;
         156  +
                    } else {
         157  +
                        builder.baseline_name = Some(deser.read_string(member)?);
         158  +
                    }
         159  +
                }
         160  +
                Some(2) => {
         161  +
                    if deser.is_null() {
         162  +
                        deser.read_null()?;
         163  +
                    } else {
         164  +
                        builder.operating_system = Some(crate::types::OperatingSystem::from(deser.read_string(member)?.as_str()));
         165  +
                    }
         166  +
                }
         167  +
                Some(3) => {
         168  +
                    if deser.is_null() {
         169  +
                        deser.read_null()?;
         170  +
                    } else {
         171  +
                        builder.baseline_description = Some(deser.read_string(member)?);
         172  +
                    }
         173  +
                }
         174  +
                Some(4) => {
         175  +
                    builder.default_baseline = Some(deser.read_boolean(member)?);
         176  +
                }
         177  +
                _ => {}
         178  +
            }
         179  +
            Ok(())
         180  +
        })?;
         181  +
        Ok(builder.build())
         182  +
    }
         183  +
}
         184  +
impl PatchBaselineIdentity {
         185  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         186  +
    pub fn deserialize_with_response(
         187  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         188  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         189  +
        _status: u16,
         190  +
        _body: &[u8],
         191  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         192  +
        Self::deserialize(deserializer)
         193  +
    }
         194  +
}
         195  +
impl PatchBaselineIdentity {
         196  +
    /// Creates a new builder-style object to manufacture [`PatchBaselineIdentity`](crate::types::PatchBaselineIdentity).
         197  +
    pub fn builder() -> crate::types::builders::PatchBaselineIdentityBuilder {
         198  +
        crate::types::builders::PatchBaselineIdentityBuilder::default()
         199  +
    }
         200  +
}
         201  +
         202  +
/// A builder for [`PatchBaselineIdentity`](crate::types::PatchBaselineIdentity).
         203  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         204  +
#[non_exhaustive]
         205  +
pub struct PatchBaselineIdentityBuilder {
         206  +
    pub(crate) baseline_id: ::std::option::Option<::std::string::String>,
         207  +
    pub(crate) baseline_name: ::std::option::Option<::std::string::String>,
         208  +
    pub(crate) operating_system: ::std::option::Option<crate::types::OperatingSystem>,
         209  +
    pub(crate) baseline_description: ::std::option::Option<::std::string::String>,
         210  +
    pub(crate) default_baseline: ::std::option::Option<bool>,
         211  +
}
         212  +
impl PatchBaselineIdentityBuilder {
         213  +
    /// <p>The ID of the patch baseline.</p>
         214  +
    pub fn baseline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         215  +
        self.baseline_id = ::std::option::Option::Some(input.into());
         216  +
        self
         217  +
    }
         218  +
    /// <p>The ID of the patch baseline.</p>
         219  +
    pub fn set_baseline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         220  +
        self.baseline_id = input;
         221  +
        self
         222  +
    }
         223  +
    /// <p>The ID of the patch baseline.</p>
         224  +
    pub fn get_baseline_id(&self) -> &::std::option::Option<::std::string::String> {
         225  +
        &self.baseline_id
         226  +
    }
         227  +
    /// <p>The name of the patch baseline.</p>
         228  +
    pub fn baseline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         229  +
        self.baseline_name = ::std::option::Option::Some(input.into());
         230  +
        self
         231  +
    }
         232  +
    /// <p>The name of the patch baseline.</p>
         233  +
    pub fn set_baseline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         234  +
        self.baseline_name = input;
         235  +
        self
         236  +
    }
         237  +
    /// <p>The name of the patch baseline.</p>
         238  +
    pub fn get_baseline_name(&self) -> &::std::option::Option<::std::string::String> {
         239  +
        &self.baseline_name
         240  +
    }
         241  +
    /// <p>Defines the operating system the patch baseline applies to. The default value is <code>WINDOWS</code>.</p>
         242  +
    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
         243  +
        self.operating_system = ::std::option::Option::Some(input);
         244  +
        self
         245  +
    }
         246  +
    /// <p>Defines the operating system the patch baseline applies to. The default value is <code>WINDOWS</code>.</p>
         247  +
    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
         248  +
        self.operating_system = input;
         249  +
        self
         250  +
    }
         251  +
    /// <p>Defines the operating system the patch baseline applies to. The default value is <code>WINDOWS</code>.</p>
         252  +
    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
         253  +
        &self.operating_system
         254  +
    }
         255  +
    /// <p>The description of the patch baseline.</p>
         256  +
    pub fn baseline_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         257  +
        self.baseline_description = ::std::option::Option::Some(input.into());
         258  +
        self
         259  +
    }
         260  +
    /// <p>The description of the patch baseline.</p>
         261  +
    pub fn set_baseline_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         262  +
        self.baseline_description = input;
         263  +
        self
         264  +
    }
         265  +
    /// <p>The description of the patch baseline.</p>
         266  +
    pub fn get_baseline_description(&self) -> &::std::option::Option<::std::string::String> {
         267  +
        &self.baseline_description
         268  +
    }
         269  +
    /// <p>Indicates whether this is the default baseline. Amazon Web Services Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.</p>
         270  +
    pub fn default_baseline(mut self, input: bool) -> Self {
         271  +
        self.default_baseline = ::std::option::Option::Some(input);
         272  +
        self
         273  +
    }
         274  +
    /// <p>Indicates whether this is the default baseline. Amazon Web Services Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.</p>
         275  +
    pub fn set_default_baseline(mut self, input: ::std::option::Option<bool>) -> Self {
         276  +
        self.default_baseline = input;
         277  +
        self
         278  +
    }
         279  +
    /// <p>Indicates whether this is the default baseline. Amazon Web Services Systems Manager supports creating multiple default patch baselines. For example, you can create a default patch baseline for each operating system.</p>
         280  +
    pub fn get_default_baseline(&self) -> &::std::option::Option<bool> {
         281  +
        &self.default_baseline
         282  +
    }
         283  +
    /// Consumes the builder and constructs a [`PatchBaselineIdentity`](crate::types::PatchBaselineIdentity).
         284  +
    pub fn build(self) -> crate::types::PatchBaselineIdentity {
         285  +
        crate::types::PatchBaselineIdentity {
         286  +
            baseline_id: self.baseline_id,
         287  +
            baseline_name: self.baseline_name,
         288  +
            operating_system: self.operating_system,
         289  +
            baseline_description: self.baseline_description,
         290  +
            default_baseline: self.default_baseline.unwrap_or_default(),
         291  +
        }
         292  +
    }
         293  +
}

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

@@ -0,1 +0,415 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the state of a patch on a particular managed node as it relates to the patch baseline used to patch the node.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct PatchComplianceData {
           7  +
    /// <p>The title of the patch.</p>
           8  +
    pub title: ::std::string::String,
           9  +
    /// <p>The operating system-specific ID of the patch.</p>
          10  +
    pub kb_id: ::std::string::String,
          11  +
    /// <p>The classification of the patch, such as <code>SecurityUpdates</code>, <code>Updates</code>, and <code>CriticalUpdates</code>.</p>
          12  +
    pub classification: ::std::string::String,
          13  +
    /// <p>The severity of the patch such as <code>Critical</code>, <code>Important</code>, and <code>Moderate</code>.</p>
          14  +
    pub severity: ::std::string::String,
          15  +
    /// <p>The state of the patch on the managed node, such as INSTALLED or FAILED.</p>
          16  +
    /// <p>For descriptions of each patch state, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch">About patch compliance</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          17  +
    pub state: crate::types::PatchComplianceDataState,
          18  +
    /// <p>The date/time the patch was installed on the managed node. Not all operating systems provide this level of information.</p>
          19  +
    pub installed_time: ::aws_smithy_types::DateTime,
          20  +
    /// <p>The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by the patch.</p><note>
          21  +
    /// <p>Currently, CVE ID values are reported only for patches with a status of <code>Missing</code> or <code>Failed</code>.</p>
          22  +
    /// </note>
          23  +
    pub cve_ids: ::std::option::Option<::std::string::String>,
          24  +
}
          25  +
impl PatchComplianceData {
          26  +
    /// <p>The title of the patch.</p>
          27  +
    pub fn title(&self) -> &str {
          28  +
        use std::ops::Deref;
          29  +
        self.title.deref()
          30  +
    }
          31  +
    /// <p>The operating system-specific ID of the patch.</p>
          32  +
    pub fn kb_id(&self) -> &str {
          33  +
        use std::ops::Deref;
          34  +
        self.kb_id.deref()
          35  +
    }
          36  +
    /// <p>The classification of the patch, such as <code>SecurityUpdates</code>, <code>Updates</code>, and <code>CriticalUpdates</code>.</p>
          37  +
    pub fn classification(&self) -> &str {
          38  +
        use std::ops::Deref;
          39  +
        self.classification.deref()
          40  +
    }
          41  +
    /// <p>The severity of the patch such as <code>Critical</code>, <code>Important</code>, and <code>Moderate</code>.</p>
          42  +
    pub fn severity(&self) -> &str {
          43  +
        use std::ops::Deref;
          44  +
        self.severity.deref()
          45  +
    }
          46  +
    /// <p>The state of the patch on the managed node, such as INSTALLED or FAILED.</p>
          47  +
    /// <p>For descriptions of each patch state, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch">About patch compliance</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          48  +
    pub fn state(&self) -> &crate::types::PatchComplianceDataState {
          49  +
        &self.state
          50  +
    }
          51  +
    /// <p>The date/time the patch was installed on the managed node. Not all operating systems provide this level of information.</p>
          52  +
    pub fn installed_time(&self) -> &::aws_smithy_types::DateTime {
          53  +
        &self.installed_time
          54  +
    }
          55  +
    /// <p>The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by the patch.</p><note>
          56  +
    /// <p>Currently, CVE ID values are reported only for patches with a status of <code>Missing</code> or <code>Failed</code>.</p>
          57  +
    /// </note>
          58  +
    pub fn cve_ids(&self) -> ::std::option::Option<&str> {
          59  +
        self.cve_ids.as_deref()
          60  +
    }
          61  +
}
          62  +
static PATCHCOMPLIANCEDATA_MEMBER_TITLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchComplianceData$Title", "com.amazonaws.ssm", "PatchComplianceData"),
          64  +
    ::aws_smithy_schema::ShapeType::String,
          65  +
    "Title",
          66  +
    0,
          67  +
);
          68  +
static PATCHCOMPLIANCEDATA_MEMBER_KB_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchComplianceData$KBId", "com.amazonaws.ssm", "PatchComplianceData"),
          70  +
    ::aws_smithy_schema::ShapeType::String,
          71  +
    "KBId",
          72  +
    1,
          73  +
);
          74  +
static PATCHCOMPLIANCEDATA_MEMBER_CLASSIFICATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts(
          76  +
        "com.amazonaws.ssm#PatchComplianceData$Classification",
          77  +
        "com.amazonaws.ssm",
          78  +
        "PatchComplianceData",
          79  +
    ),
          80  +
    ::aws_smithy_schema::ShapeType::String,
          81  +
    "Classification",
          82  +
    2,
          83  +
);
          84  +
static PATCHCOMPLIANCEDATA_MEMBER_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          85  +
    ::aws_smithy_schema::ShapeId::from_parts(
          86  +
        "com.amazonaws.ssm#PatchComplianceData$Severity",
          87  +
        "com.amazonaws.ssm",
          88  +
        "PatchComplianceData",
          89  +
    ),
          90  +
    ::aws_smithy_schema::ShapeType::String,
          91  +
    "Severity",
          92  +
    3,
          93  +
);
          94  +
static PATCHCOMPLIANCEDATA_MEMBER_STATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          95  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchComplianceData$State", "com.amazonaws.ssm", "PatchComplianceData"),
          96  +
    ::aws_smithy_schema::ShapeType::String,
          97  +
    "State",
          98  +
    4,
          99  +
);
         100  +
static PATCHCOMPLIANCEDATA_MEMBER_INSTALLED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         101  +
    ::aws_smithy_schema::ShapeId::from_parts(
         102  +
        "com.amazonaws.ssm#PatchComplianceData$InstalledTime",
         103  +
        "com.amazonaws.ssm",
         104  +
        "PatchComplianceData",
         105  +
    ),
         106  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         107  +
    "InstalledTime",
         108  +
    5,
         109  +
);
         110  +
static PATCHCOMPLIANCEDATA_MEMBER_CVE_IDS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         111  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchComplianceData$CVEIds", "com.amazonaws.ssm", "PatchComplianceData"),
         112  +
    ::aws_smithy_schema::ShapeType::String,
         113  +
    "CVEIds",
         114  +
    6,
         115  +
);
         116  +
static PATCHCOMPLIANCEDATA_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         117  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PatchComplianceData", "com.amazonaws.ssm", "PatchComplianceData"),
         118  +
    ::aws_smithy_schema::ShapeType::Structure,
         119  +
    &[
         120  +
        &PATCHCOMPLIANCEDATA_MEMBER_TITLE,
         121  +
        &PATCHCOMPLIANCEDATA_MEMBER_KB_ID,
         122  +
        &PATCHCOMPLIANCEDATA_MEMBER_CLASSIFICATION,
         123  +
        &PATCHCOMPLIANCEDATA_MEMBER_SEVERITY,
         124  +
        &PATCHCOMPLIANCEDATA_MEMBER_STATE,
         125  +
        &PATCHCOMPLIANCEDATA_MEMBER_INSTALLED_TIME,
         126  +
        &PATCHCOMPLIANCEDATA_MEMBER_CVE_IDS,
         127  +
    ],
         128  +
);
         129  +
impl PatchComplianceData {
         130  +
    /// The schema for this shape.
         131  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PATCHCOMPLIANCEDATA_SCHEMA;
         132  +
}
         133  +
impl ::aws_smithy_schema::serde::SerializableStruct for PatchComplianceData {
         134  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         135  +
    fn serialize_members(
         136  +
        &self,
         137  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         138  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         139  +
        {
         140  +
            let val = &self.title;
         141  +
            ser.write_string(&PATCHCOMPLIANCEDATA_MEMBER_TITLE, val)?;
         142  +
        }
         143  +
        {
         144  +
            let val = &self.kb_id;
         145  +
            ser.write_string(&PATCHCOMPLIANCEDATA_MEMBER_KB_ID, val)?;
         146  +
        }
         147  +
        {
         148  +
            let val = &self.classification;
         149  +
            ser.write_string(&PATCHCOMPLIANCEDATA_MEMBER_CLASSIFICATION, val)?;
         150  +
        }
         151  +
        {
         152  +
            let val = &self.severity;
         153  +
            ser.write_string(&PATCHCOMPLIANCEDATA_MEMBER_SEVERITY, val)?;
         154  +
        }
         155  +
        {
         156  +
            let val = &self.state;
         157  +
            ser.write_string(&PATCHCOMPLIANCEDATA_MEMBER_STATE, val.as_str())?;
         158  +
        }
         159  +
        {
         160  +
            let val = &self.installed_time;
         161  +
            ser.write_timestamp(&PATCHCOMPLIANCEDATA_MEMBER_INSTALLED_TIME, val)?;
         162  +
        }
         163  +
        if let Some(ref val) = self.cve_ids {
         164  +
            ser.write_string(&PATCHCOMPLIANCEDATA_MEMBER_CVE_IDS, val)?;
         165  +
        }
         166  +
        Ok(())
         167  +
    }
         168  +
}
         169  +
impl PatchComplianceData {
         170  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         171  +
    pub fn deserialize(
         172  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         173  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         174  +
        #[allow(unused_variables, unused_mut)]
         175  +
        let mut builder = Self::builder();
         176  +
        #[allow(
         177  +
            unused_variables,
         178  +
            unreachable_code,
         179  +
            clippy::single_match,
         180  +
            clippy::match_single_binding,
         181  +
            clippy::diverging_sub_expression
         182  +
        )]
         183  +
        deserializer.read_struct(&PATCHCOMPLIANCEDATA_SCHEMA, &mut |member, deser| {
         184  +
            match member.member_index() {
         185  +
                Some(0) => {
         186  +
                    builder.title = Some(deser.read_string(member)?);
         187  +
                }
         188  +
                Some(1) => {
         189  +
                    builder.kb_id = Some(deser.read_string(member)?);
         190  +
                }
         191  +
                Some(2) => {
         192  +
                    builder.classification = Some(deser.read_string(member)?);
         193  +
                }
         194  +
                Some(3) => {
         195  +
                    builder.severity = Some(deser.read_string(member)?);
         196  +
                }
         197  +
                Some(4) => {
         198  +
                    builder.state = Some(crate::types::PatchComplianceDataState::from(deser.read_string(member)?.as_str()));
         199  +
                }
         200  +
                Some(5) => {
         201  +
                    builder.installed_time = Some(deser.read_timestamp(member)?);
         202  +
                }
         203  +
                Some(6) => {
         204  +
                    if deser.is_null() {
         205  +
                        deser.read_null()?;
         206  +
                    } else {
         207  +
                        builder.cve_ids = Some(deser.read_string(member)?);
         208  +
                    }
         209  +
                }
         210  +
                _ => {}
         211  +
            }
         212  +
            Ok(())
         213  +
        })?;
         214  +
        builder.title = builder.title.or(Some(String::new()));
         215  +
        builder.kb_id = builder.kb_id.or(Some(String::new()));
         216  +
        builder.classification = builder.classification.or(Some(String::new()));
         217  +
        builder.severity = builder.severity.or(Some(String::new()));
         218  +
        builder.installed_time = builder.installed_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         219  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         220  +
    }
         221  +
}
         222  +
impl PatchComplianceData {
         223  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         224  +
    pub fn deserialize_with_response(
         225  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         226  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         227  +
        _status: u16,
         228  +
        _body: &[u8],
         229  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         230  +
        Self::deserialize(deserializer)
         231  +
    }
         232  +
}
         233  +
impl PatchComplianceData {
         234  +
    /// Creates a new builder-style object to manufacture [`PatchComplianceData`](crate::types::PatchComplianceData).
         235  +
    pub fn builder() -> crate::types::builders::PatchComplianceDataBuilder {
         236  +
        crate::types::builders::PatchComplianceDataBuilder::default()
         237  +
    }
         238  +
}
         239  +
         240  +
/// A builder for [`PatchComplianceData`](crate::types::PatchComplianceData).
         241  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         242  +
#[non_exhaustive]
         243  +
pub struct PatchComplianceDataBuilder {
         244  +
    pub(crate) title: ::std::option::Option<::std::string::String>,
         245  +
    pub(crate) kb_id: ::std::option::Option<::std::string::String>,
         246  +
    pub(crate) classification: ::std::option::Option<::std::string::String>,
         247  +
    pub(crate) severity: ::std::option::Option<::std::string::String>,
         248  +
    pub(crate) state: ::std::option::Option<crate::types::PatchComplianceDataState>,
         249  +
    pub(crate) installed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         250  +
    pub(crate) cve_ids: ::std::option::Option<::std::string::String>,
         251  +
}
         252  +
impl PatchComplianceDataBuilder {
         253  +
    /// <p>The title of the patch.</p>
         254  +
    /// This field is required.
         255  +
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         256  +
        self.title = ::std::option::Option::Some(input.into());
         257  +
        self
         258  +
    }
         259  +
    /// <p>The title of the patch.</p>
         260  +
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         261  +
        self.title = input;
         262  +
        self
         263  +
    }
         264  +
    /// <p>The title of the patch.</p>
         265  +
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
         266  +
        &self.title
         267  +
    }
         268  +
    /// <p>The operating system-specific ID of the patch.</p>
         269  +
    /// This field is required.
         270  +
    pub fn kb_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         271  +
        self.kb_id = ::std::option::Option::Some(input.into());
         272  +
        self
         273  +
    }
         274  +
    /// <p>The operating system-specific ID of the patch.</p>
         275  +
    pub fn set_kb_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         276  +
        self.kb_id = input;
         277  +
        self
         278  +
    }
         279  +
    /// <p>The operating system-specific ID of the patch.</p>
         280  +
    pub fn get_kb_id(&self) -> &::std::option::Option<::std::string::String> {
         281  +
        &self.kb_id
         282  +
    }
         283  +
    /// <p>The classification of the patch, such as <code>SecurityUpdates</code>, <code>Updates</code>, and <code>CriticalUpdates</code>.</p>
         284  +
    /// This field is required.
         285  +
    pub fn classification(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         286  +
        self.classification = ::std::option::Option::Some(input.into());
         287  +
        self
         288  +
    }
         289  +
    /// <p>The classification of the patch, such as <code>SecurityUpdates</code>, <code>Updates</code>, and <code>CriticalUpdates</code>.</p>
         290  +
    pub fn set_classification(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         291  +
        self.classification = input;
         292  +
        self
         293  +
    }
         294  +
    /// <p>The classification of the patch, such as <code>SecurityUpdates</code>, <code>Updates</code>, and <code>CriticalUpdates</code>.</p>
         295  +
    pub fn get_classification(&self) -> &::std::option::Option<::std::string::String> {
         296  +
        &self.classification
         297  +
    }
         298  +
    /// <p>The severity of the patch such as <code>Critical</code>, <code>Important</code>, and <code>Moderate</code>.</p>
         299  +
    /// This field is required.
         300  +
    pub fn severity(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         301  +
        self.severity = ::std::option::Option::Some(input.into());
         302  +
        self
         303  +
    }
         304  +
    /// <p>The severity of the patch such as <code>Critical</code>, <code>Important</code>, and <code>Moderate</code>.</p>
         305  +
    pub fn set_severity(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         306  +
        self.severity = input;
         307  +
        self
         308  +
    }
         309  +
    /// <p>The severity of the patch such as <code>Critical</code>, <code>Important</code>, and <code>Moderate</code>.</p>
         310  +
    pub fn get_severity(&self) -> &::std::option::Option<::std::string::String> {
         311  +
        &self.severity
         312  +
    }
         313  +
    /// <p>The state of the patch on the managed node, such as INSTALLED or FAILED.</p>
         314  +
    /// <p>For descriptions of each patch state, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch">About patch compliance</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         315  +
    /// This field is required.
         316  +
    pub fn state(mut self, input: crate::types::PatchComplianceDataState) -> Self {
         317  +
        self.state = ::std::option::Option::Some(input);
         318  +
        self
         319  +
    }
         320  +
    /// <p>The state of the patch on the managed node, such as INSTALLED or FAILED.</p>
         321  +
    /// <p>For descriptions of each patch state, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch">About patch compliance</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         322  +
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::PatchComplianceDataState>) -> Self {
         323  +
        self.state = input;
         324  +
        self
         325  +
    }
         326  +
    /// <p>The state of the patch on the managed node, such as INSTALLED or FAILED.</p>
         327  +
    /// <p>For descriptions of each patch state, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch">About patch compliance</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         328  +
    pub fn get_state(&self) -> &::std::option::Option<crate::types::PatchComplianceDataState> {
         329  +
        &self.state
         330  +
    }
         331  +
    /// <p>The date/time the patch was installed on the managed node. Not all operating systems provide this level of information.</p>
         332  +
    /// This field is required.
         333  +
    pub fn installed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         334  +
        self.installed_time = ::std::option::Option::Some(input);
         335  +
        self
         336  +
    }
         337  +
    /// <p>The date/time the patch was installed on the managed node. Not all operating systems provide this level of information.</p>
         338  +
    pub fn set_installed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         339  +
        self.installed_time = input;
         340  +
        self
         341  +
    }
         342  +
    /// <p>The date/time the patch was installed on the managed node. Not all operating systems provide this level of information.</p>
         343  +
    pub fn get_installed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         344  +
        &self.installed_time
         345  +
    }
         346  +
    /// <p>The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by the patch.</p><note>
         347  +
    /// <p>Currently, CVE ID values are reported only for patches with a status of <code>Missing</code> or <code>Failed</code>.</p>
         348  +
    /// </note>
         349  +
    pub fn cve_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         350  +
        self.cve_ids = ::std::option::Option::Some(input.into());
         351  +
        self
         352  +
    }
         353  +
    /// <p>The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by the patch.</p><note>
         354  +
    /// <p>Currently, CVE ID values are reported only for patches with a status of <code>Missing</code> or <code>Failed</code>.</p>
         355  +
    /// </note>
         356  +
    pub fn set_cve_ids(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         357  +
        self.cve_ids = input;
         358  +
        self
         359  +
    }
         360  +
    /// <p>The IDs of one or more Common Vulnerabilities and Exposure (CVE) issues that are resolved by the patch.</p><note>
         361  +
    /// <p>Currently, CVE ID values are reported only for patches with a status of <code>Missing</code> or <code>Failed</code>.</p>
         362  +
    /// </note>
         363  +
    pub fn get_cve_ids(&self) -> &::std::option::Option<::std::string::String> {
         364  +
        &self.cve_ids
         365  +
    }
         366  +
    /// Consumes the builder and constructs a [`PatchComplianceData`](crate::types::PatchComplianceData).
         367  +
    /// This method will fail if any of the following fields are not set:
         368  +
    /// - [`title`](crate::types::builders::PatchComplianceDataBuilder::title)
         369  +
    /// - [`kb_id`](crate::types::builders::PatchComplianceDataBuilder::kb_id)
         370  +
    /// - [`classification`](crate::types::builders::PatchComplianceDataBuilder::classification)
         371  +
    /// - [`severity`](crate::types::builders::PatchComplianceDataBuilder::severity)
         372  +
    /// - [`state`](crate::types::builders::PatchComplianceDataBuilder::state)
         373  +
    /// - [`installed_time`](crate::types::builders::PatchComplianceDataBuilder::installed_time)
         374  +
    pub fn build(self) -> ::std::result::Result<crate::types::PatchComplianceData, ::aws_smithy_types::error::operation::BuildError> {
         375  +
        ::std::result::Result::Ok(crate::types::PatchComplianceData {
         376  +
            title: self.title.ok_or_else(|| {
         377  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         378  +
                    "title",
         379  +
                    "title was not specified but it is required when building PatchComplianceData",
         380  +
                )
         381  +
            })?,
         382  +
            kb_id: self.kb_id.ok_or_else(|| {
         383  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         384  +
                    "kb_id",
         385  +
                    "kb_id was not specified but it is required when building PatchComplianceData",
         386  +
                )
         387  +
            })?,
         388  +
            classification: self.classification.ok_or_else(|| {
         389  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         390  +
                    "classification",
         391  +
                    "classification was not specified but it is required when building PatchComplianceData",
         392  +
                )
         393  +
            })?,
         394  +
            severity: self.severity.ok_or_else(|| {
         395  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         396  +
                    "severity",
         397  +
                    "severity was not specified but it is required when building PatchComplianceData",
         398  +
                )
         399  +
            })?,
         400  +
            state: self.state.ok_or_else(|| {
         401  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         402  +
                    "state",
         403  +
                    "state was not specified but it is required when building PatchComplianceData",
         404  +
                )
         405  +
            })?,
         406  +
            installed_time: self.installed_time.ok_or_else(|| {
         407  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         408  +
                    "installed_time",
         409  +
                    "installed_time was not specified but it is required when building PatchComplianceData",
         410  +
                )
         411  +
            })?,
         412  +
            cve_ids: self.cve_ids,
         413  +
        })
         414  +
    }
         415  +
}

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

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

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_patch_compliance_level.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 `PatchComplianceLevel`, 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 patchcompliancelevel = unimplemented!();
          14  +
/// match patchcompliancelevel {
          15  +
///     PatchComplianceLevel::Critical => { /* ... */ },
          16  +
///     PatchComplianceLevel::High => { /* ... */ },
          17  +
///     PatchComplianceLevel::Informational => { /* ... */ },
          18  +
///     PatchComplianceLevel::Low => { /* ... */ },
          19  +
///     PatchComplianceLevel::Medium => { /* ... */ },
          20  +
///     PatchComplianceLevel::Unspecified => { /* ... */ },
          21  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          22  +
///     _ => { /* ... */ },
          23  +
/// }
          24  +
/// ```
          25  +
/// The above code demonstrates that when `patchcompliancelevel` represents
          26  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          27  +
/// even though the enum does not contain a variant `PatchComplianceLevel::NewFeature`
          28  +
/// in the current version of SDK. The reason is that the variable `other`,
          29  +
/// created by the `@` operator, is bound to
          30  +
/// `PatchComplianceLevel::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 `PatchComplianceLevel::NewFeature` is defined.
          34  +
/// Specifically, when `patchcompliancelevel` represents `NewFeature`,
          35  +
/// the execution path will hit the second last match arm as before by virtue of
          36  +
/// calling `as_str` on `PatchComplianceLevel::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 PatchComplianceLevel {
          49  +
    #[allow(missing_docs)] // documentation missing in model
          50  +
    Critical,
          51  +
    #[allow(missing_docs)] // documentation missing in model
          52  +
    High,
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    Informational,
          55  +
    #[allow(missing_docs)] // documentation missing in model
          56  +
    Low,
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    Medium,
          59  +
    #[allow(missing_docs)] // documentation missing in model
          60  +
    Unspecified,
          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 PatchComplianceLevel {
          66  +
    fn from(s: &str) -> Self {
          67  +
        match s {
          68  +
            "CRITICAL" => PatchComplianceLevel::Critical,
          69  +
            "HIGH" => PatchComplianceLevel::High,
          70  +
            "INFORMATIONAL" => PatchComplianceLevel::Informational,
          71  +
            "LOW" => PatchComplianceLevel::Low,
          72  +
            "MEDIUM" => PatchComplianceLevel::Medium,
          73  +
            "UNSPECIFIED" => PatchComplianceLevel::Unspecified,
          74  +
            other => PatchComplianceLevel::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          75  +
        }
          76  +
    }
          77  +
}
          78  +
impl ::std::str::FromStr for PatchComplianceLevel {
          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(PatchComplianceLevel::from(s))
          83  +
    }
          84  +
}
          85  +
impl PatchComplianceLevel {
          86  +
    /// Returns the `&str` value of the enum member.
          87  +
    pub fn as_str(&self) -> &str {
          88  +
        match self {
          89  +
            PatchComplianceLevel::Critical => "CRITICAL",
          90  +
            PatchComplianceLevel::High => "HIGH",
          91  +
            PatchComplianceLevel::Informational => "INFORMATIONAL",
          92  +
            PatchComplianceLevel::Low => "LOW",
          93  +
            PatchComplianceLevel::Medium => "MEDIUM",
          94  +
            PatchComplianceLevel::Unspecified => "UNSPECIFIED",
          95  +
            PatchComplianceLevel::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  +
        &["CRITICAL", "HIGH", "INFORMATIONAL", "LOW", "MEDIUM", "UNSPECIFIED"]
         101  +
    }
         102  +
}
         103  +
impl ::std::convert::AsRef<str> for PatchComplianceLevel {
         104  +
    fn as_ref(&self) -> &str {
         105  +
        self.as_str()
         106  +
    }
         107  +
}
         108  +
impl PatchComplianceLevel {
         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 PatchComplianceLevel {
         121  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         122  +
        match self {
         123  +
            PatchComplianceLevel::Critical => write!(f, "CRITICAL"),
         124  +
            PatchComplianceLevel::High => write!(f, "HIGH"),
         125  +
            PatchComplianceLevel::Informational => write!(f, "INFORMATIONAL"),
         126  +
            PatchComplianceLevel::Low => write!(f, "LOW"),
         127  +
            PatchComplianceLevel::Medium => write!(f, "MEDIUM"),
         128  +
            PatchComplianceLevel::Unspecified => write!(f, "UNSPECIFIED"),
         129  +
            PatchComplianceLevel::Unknown(value) => write!(f, "{value}"),
         130  +
        }
         131  +
    }
         132  +
}