AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

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

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

@@ -0,1 +0,258 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The parameters for task execution.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct MaintenanceWindowTaskInvocationParameters {
           7  +
    /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
           8  +
    pub run_command: ::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters>,
           9  +
    /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
          10  +
    pub automation: ::std::option::Option<crate::types::MaintenanceWindowAutomationParameters>,
          11  +
    /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
          12  +
    pub step_functions: ::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters>,
          13  +
    /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
          14  +
    pub lambda: ::std::option::Option<crate::types::MaintenanceWindowLambdaParameters>,
          15  +
}
          16  +
impl MaintenanceWindowTaskInvocationParameters {
          17  +
    /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
          18  +
    pub fn run_command(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowRunCommandParameters> {
          19  +
        self.run_command.as_ref()
          20  +
    }
          21  +
    /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
          22  +
    pub fn automation(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowAutomationParameters> {
          23  +
        self.automation.as_ref()
          24  +
    }
          25  +
    /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
          26  +
    pub fn step_functions(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowStepFunctionsParameters> {
          27  +
        self.step_functions.as_ref()
          28  +
    }
          29  +
    /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
          30  +
    pub fn lambda(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowLambdaParameters> {
          31  +
        self.lambda.as_ref()
          32  +
    }
          33  +
}
          34  +
static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_RUN_COMMAND: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          35  +
    ::aws_smithy_schema::ShapeId::from_parts(
          36  +
        "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$RunCommand",
          37  +
        "com.amazonaws.ssm",
          38  +
        "MaintenanceWindowTaskInvocationParameters",
          39  +
    ),
          40  +
    ::aws_smithy_schema::ShapeType::Structure,
          41  +
    "RunCommand",
          42  +
    0,
          43  +
);
          44  +
static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_AUTOMATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts(
          46  +
        "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$Automation",
          47  +
        "com.amazonaws.ssm",
          48  +
        "MaintenanceWindowTaskInvocationParameters",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::Structure,
          51  +
    "Automation",
          52  +
    1,
          53  +
);
          54  +
static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_STEP_FUNCTIONS: ::aws_smithy_schema::Schema<'static> =
          55  +
    ::aws_smithy_schema::Schema::new_member(
          56  +
        ::aws_smithy_schema::ShapeId::from_parts(
          57  +
            "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$StepFunctions",
          58  +
            "com.amazonaws.ssm",
          59  +
            "MaintenanceWindowTaskInvocationParameters",
          60  +
        ),
          61  +
        ::aws_smithy_schema::ShapeType::Structure,
          62  +
        "StepFunctions",
          63  +
        2,
          64  +
    );
          65  +
static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_LAMBDA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          66  +
    ::aws_smithy_schema::ShapeId::from_parts(
          67  +
        "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters$Lambda",
          68  +
        "com.amazonaws.ssm",
          69  +
        "MaintenanceWindowTaskInvocationParameters",
          70  +
    ),
          71  +
    ::aws_smithy_schema::ShapeType::Structure,
          72  +
    "Lambda",
          73  +
    3,
          74  +
);
          75  +
static MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          76  +
    ::aws_smithy_schema::ShapeId::from_parts(
          77  +
        "com.amazonaws.ssm#MaintenanceWindowTaskInvocationParameters",
          78  +
        "com.amazonaws.ssm",
          79  +
        "MaintenanceWindowTaskInvocationParameters",
          80  +
    ),
          81  +
    ::aws_smithy_schema::ShapeType::Structure,
          82  +
    &[
          83  +
        &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_RUN_COMMAND,
          84  +
        &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_AUTOMATION,
          85  +
        &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_STEP_FUNCTIONS,
          86  +
        &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_LAMBDA,
          87  +
    ],
          88  +
);
          89  +
impl MaintenanceWindowTaskInvocationParameters {
          90  +
    /// The schema for this shape.
          91  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_SCHEMA;
          92  +
}
          93  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowTaskInvocationParameters {
          94  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          95  +
    fn serialize_members(
          96  +
        &self,
          97  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          98  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          99  +
        if let Some(ref val) = self.run_command {
         100  +
            ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_RUN_COMMAND, val)?;
         101  +
        }
         102  +
        if let Some(ref val) = self.automation {
         103  +
            ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_AUTOMATION, val)?;
         104  +
        }
         105  +
        if let Some(ref val) = self.step_functions {
         106  +
            ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_STEP_FUNCTIONS, val)?;
         107  +
        }
         108  +
        if let Some(ref val) = self.lambda {
         109  +
            ser.write_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_MEMBER_LAMBDA, val)?;
         110  +
        }
         111  +
        Ok(())
         112  +
    }
         113  +
}
         114  +
impl MaintenanceWindowTaskInvocationParameters {
         115  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         116  +
    pub fn deserialize(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        #[allow(unused_variables, unused_mut)]
         120  +
        let mut builder = Self::builder();
         121  +
        #[allow(
         122  +
            unused_variables,
         123  +
            unreachable_code,
         124  +
            clippy::single_match,
         125  +
            clippy::match_single_binding,
         126  +
            clippy::diverging_sub_expression
         127  +
        )]
         128  +
        deserializer.read_struct(&MAINTENANCEWINDOWTASKINVOCATIONPARAMETERS_SCHEMA, &mut |member, deser| {
         129  +
            match member.member_index() {
         130  +
                Some(0) => {
         131  +
                    if deser.is_null() {
         132  +
                        deser.read_null()?;
         133  +
                    } else {
         134  +
                        builder.run_command = Some(crate::types::MaintenanceWindowRunCommandParameters::deserialize(deser)?);
         135  +
                    }
         136  +
                }
         137  +
                Some(1) => {
         138  +
                    if deser.is_null() {
         139  +
                        deser.read_null()?;
         140  +
                    } else {
         141  +
                        builder.automation = Some(crate::types::MaintenanceWindowAutomationParameters::deserialize(deser)?);
         142  +
                    }
         143  +
                }
         144  +
                Some(2) => {
         145  +
                    if deser.is_null() {
         146  +
                        deser.read_null()?;
         147  +
                    } else {
         148  +
                        builder.step_functions = Some(crate::types::MaintenanceWindowStepFunctionsParameters::deserialize(deser)?);
         149  +
                    }
         150  +
                }
         151  +
                Some(3) => {
         152  +
                    if deser.is_null() {
         153  +
                        deser.read_null()?;
         154  +
                    } else {
         155  +
                        builder.lambda = Some(crate::types::MaintenanceWindowLambdaParameters::deserialize(deser)?);
         156  +
                    }
         157  +
                }
         158  +
                _ => {}
         159  +
            }
         160  +
            Ok(())
         161  +
        })?;
         162  +
        Ok(builder.build())
         163  +
    }
         164  +
}
         165  +
impl MaintenanceWindowTaskInvocationParameters {
         166  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         167  +
    pub fn deserialize_with_response(
         168  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         169  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         170  +
        _status: u16,
         171  +
        _body: &[u8],
         172  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         173  +
        Self::deserialize(deserializer)
         174  +
    }
         175  +
}
         176  +
impl MaintenanceWindowTaskInvocationParameters {
         177  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowTaskInvocationParameters`](crate::types::MaintenanceWindowTaskInvocationParameters).
         178  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowTaskInvocationParametersBuilder {
         179  +
        crate::types::builders::MaintenanceWindowTaskInvocationParametersBuilder::default()
         180  +
    }
         181  +
}
         182  +
         183  +
/// A builder for [`MaintenanceWindowTaskInvocationParameters`](crate::types::MaintenanceWindowTaskInvocationParameters).
         184  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         185  +
#[non_exhaustive]
         186  +
pub struct MaintenanceWindowTaskInvocationParametersBuilder {
         187  +
    pub(crate) run_command: ::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters>,
         188  +
    pub(crate) automation: ::std::option::Option<crate::types::MaintenanceWindowAutomationParameters>,
         189  +
    pub(crate) step_functions: ::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters>,
         190  +
    pub(crate) lambda: ::std::option::Option<crate::types::MaintenanceWindowLambdaParameters>,
         191  +
}
         192  +
impl MaintenanceWindowTaskInvocationParametersBuilder {
         193  +
    /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
         194  +
    pub fn run_command(mut self, input: crate::types::MaintenanceWindowRunCommandParameters) -> Self {
         195  +
        self.run_command = ::std::option::Option::Some(input);
         196  +
        self
         197  +
    }
         198  +
    /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
         199  +
    pub fn set_run_command(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters>) -> Self {
         200  +
        self.run_command = input;
         201  +
        self
         202  +
    }
         203  +
    /// <p>The parameters for a <code>RUN_COMMAND</code> task type.</p>
         204  +
    pub fn get_run_command(&self) -> &::std::option::Option<crate::types::MaintenanceWindowRunCommandParameters> {
         205  +
        &self.run_command
         206  +
    }
         207  +
    /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
         208  +
    pub fn automation(mut self, input: crate::types::MaintenanceWindowAutomationParameters) -> Self {
         209  +
        self.automation = ::std::option::Option::Some(input);
         210  +
        self
         211  +
    }
         212  +
    /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
         213  +
    pub fn set_automation(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowAutomationParameters>) -> Self {
         214  +
        self.automation = input;
         215  +
        self
         216  +
    }
         217  +
    /// <p>The parameters for an <code>AUTOMATION</code> task type.</p>
         218  +
    pub fn get_automation(&self) -> &::std::option::Option<crate::types::MaintenanceWindowAutomationParameters> {
         219  +
        &self.automation
         220  +
    }
         221  +
    /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
         222  +
    pub fn step_functions(mut self, input: crate::types::MaintenanceWindowStepFunctionsParameters) -> Self {
         223  +
        self.step_functions = ::std::option::Option::Some(input);
         224  +
        self
         225  +
    }
         226  +
    /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
         227  +
    pub fn set_step_functions(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters>) -> Self {
         228  +
        self.step_functions = input;
         229  +
        self
         230  +
    }
         231  +
    /// <p>The parameters for a <code>STEP_FUNCTIONS</code> task type.</p>
         232  +
    pub fn get_step_functions(&self) -> &::std::option::Option<crate::types::MaintenanceWindowStepFunctionsParameters> {
         233  +
        &self.step_functions
         234  +
    }
         235  +
    /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
         236  +
    pub fn lambda(mut self, input: crate::types::MaintenanceWindowLambdaParameters) -> Self {
         237  +
        self.lambda = ::std::option::Option::Some(input);
         238  +
        self
         239  +
    }
         240  +
    /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
         241  +
    pub fn set_lambda(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowLambdaParameters>) -> Self {
         242  +
        self.lambda = input;
         243  +
        self
         244  +
    }
         245  +
    /// <p>The parameters for a <code>LAMBDA</code> task type.</p>
         246  +
    pub fn get_lambda(&self) -> &::std::option::Option<crate::types::MaintenanceWindowLambdaParameters> {
         247  +
        &self.lambda
         248  +
    }
         249  +
    /// Consumes the builder and constructs a [`MaintenanceWindowTaskInvocationParameters`](crate::types::MaintenanceWindowTaskInvocationParameters).
         250  +
    pub fn build(self) -> crate::types::MaintenanceWindowTaskInvocationParameters {
         251  +
        crate::types::MaintenanceWindowTaskInvocationParameters {
         252  +
            run_command: self.run_command,
         253  +
            automation: self.automation,
         254  +
            step_functions: self.step_functions,
         255  +
            lambda: self.lambda,
         256  +
        }
         257  +
    }
         258  +
}

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

@@ -0,1 +0,167 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Defines the values for a task parameter.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
           6  +
pub struct MaintenanceWindowTaskParameterValueExpression {
           7  +
    /// <p>This field contains an array of 0 or more strings, each 1 to 255 characters in length.</p>
           8  +
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
           9  +
}
          10  +
impl MaintenanceWindowTaskParameterValueExpression {
          11  +
    /// <p>This field contains an array of 0 or more strings, each 1 to 255 characters in length.</p>
          12  +
    ///
          13  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.values.is_none()`.
          14  +
    pub fn values(&self) -> &[::std::string::String] {
          15  +
        self.values.as_deref().unwrap_or_default()
          16  +
    }
          17  +
}
          18  +
impl ::std::fmt::Debug for MaintenanceWindowTaskParameterValueExpression {
          19  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          20  +
        let mut formatter = f.debug_struct("MaintenanceWindowTaskParameterValueExpression");
          21  +
        formatter.field("values", &"*** Sensitive Data Redacted ***");
          22  +
        formatter.finish()
          23  +
    }
          24  +
}
          25  +
static MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_MEMBER_VALUES_MEMBER: ::aws_smithy_schema::Schema<'static> =
          26  +
    ::aws_smithy_schema::Schema::new_member(
          27  +
        ::aws_smithy_schema::ShapeId::from_parts(
          28  +
            "com.amazonaws.ssm#MaintenanceWindowTaskParameterValueList$member",
          29  +
            "com.amazonaws.ssm",
          30  +
            "MaintenanceWindowTaskParameterValueList",
          31  +
        ),
          32  +
        ::aws_smithy_schema::ShapeType::String,
          33  +
        "member",
          34  +
        0,
          35  +
    );
          36  +
static MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_MEMBER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          37  +
    ::aws_smithy_schema::ShapeId::from_parts(
          38  +
        "com.amazonaws.ssm#MaintenanceWindowTaskParameterValueExpression$Values",
          39  +
        "com.amazonaws.ssm",
          40  +
        "MaintenanceWindowTaskParameterValueExpression",
          41  +
    ),
          42  +
    ::aws_smithy_schema::ShapeType::List,
          43  +
    "Values",
          44  +
    0,
          45  +
)
          46  +
.with_list_member(&MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_MEMBER_VALUES_MEMBER);
          47  +
static MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm#MaintenanceWindowTaskParameterValueExpression",
          50  +
        "com.amazonaws.ssm",
          51  +
        "MaintenanceWindowTaskParameterValueExpression",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::Structure,
          54  +
    &[&MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_MEMBER_VALUES],
          55  +
)
          56  +
.with_sensitive();
          57  +
impl MaintenanceWindowTaskParameterValueExpression {
          58  +
    /// The schema for this shape.
          59  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_SCHEMA;
          60  +
}
          61  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowTaskParameterValueExpression {
          62  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          63  +
    fn serialize_members(
          64  +
        &self,
          65  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          66  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          67  +
        if let Some(ref val) = self.values {
          68  +
            ser.write_list(
          69  +
                &MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_MEMBER_VALUES,
          70  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          71  +
                    for item in val {
          72  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
          73  +
                    }
          74  +
                    Ok(())
          75  +
                },
          76  +
            )?;
          77  +
        }
          78  +
        Ok(())
          79  +
    }
          80  +
}
          81  +
impl MaintenanceWindowTaskParameterValueExpression {
          82  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          83  +
    pub fn deserialize(
          84  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          85  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          86  +
        #[allow(unused_variables, unused_mut)]
          87  +
        let mut builder = Self::builder();
          88  +
        #[allow(
          89  +
            unused_variables,
          90  +
            unreachable_code,
          91  +
            clippy::single_match,
          92  +
            clippy::match_single_binding,
          93  +
            clippy::diverging_sub_expression
          94  +
        )]
          95  +
        deserializer.read_struct(&MAINTENANCEWINDOWTASKPARAMETERVALUEEXPRESSION_SCHEMA, &mut |member, deser| {
          96  +
            match member.member_index() {
          97  +
                Some(0) => {
          98  +
                    if deser.is_null() {
          99  +
                        deser.read_null()?;
         100  +
                    } else {
         101  +
                        builder.values = Some(deser.read_string_list(member)?);
         102  +
                    }
         103  +
                }
         104  +
                _ => {}
         105  +
            }
         106  +
            Ok(())
         107  +
        })?;
         108  +
        Ok(builder.build())
         109  +
    }
         110  +
}
         111  +
impl MaintenanceWindowTaskParameterValueExpression {
         112  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         113  +
    pub fn deserialize_with_response(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         115  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         116  +
        _status: u16,
         117  +
        _body: &[u8],
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        Self::deserialize(deserializer)
         120  +
    }
         121  +
}
         122  +
impl MaintenanceWindowTaskParameterValueExpression {
         123  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowTaskParameterValueExpression`](crate::types::MaintenanceWindowTaskParameterValueExpression).
         124  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowTaskParameterValueExpressionBuilder {
         125  +
        crate::types::builders::MaintenanceWindowTaskParameterValueExpressionBuilder::default()
         126  +
    }
         127  +
}
         128  +
         129  +
/// A builder for [`MaintenanceWindowTaskParameterValueExpression`](crate::types::MaintenanceWindowTaskParameterValueExpression).
         130  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         131  +
#[non_exhaustive]
         132  +
pub struct MaintenanceWindowTaskParameterValueExpressionBuilder {
         133  +
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         134  +
}
         135  +
impl MaintenanceWindowTaskParameterValueExpressionBuilder {
         136  +
    /// Appends an item to `values`.
         137  +
    ///
         138  +
    /// To override the contents of this collection use [`set_values`](Self::set_values).
         139  +
    ///
         140  +
    /// <p>This field contains an array of 0 or more strings, each 1 to 255 characters in length.</p>
         141  +
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         142  +
        let mut v = self.values.unwrap_or_default();
         143  +
        v.push(input.into());
         144  +
        self.values = ::std::option::Option::Some(v);
         145  +
        self
         146  +
    }
         147  +
    /// <p>This field contains an array of 0 or more strings, each 1 to 255 characters in length.</p>
         148  +
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         149  +
        self.values = input;
         150  +
        self
         151  +
    }
         152  +
    /// <p>This field contains an array of 0 or more strings, each 1 to 255 characters in length.</p>
         153  +
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         154  +
        &self.values
         155  +
    }
         156  +
    /// Consumes the builder and constructs a [`MaintenanceWindowTaskParameterValueExpression`](crate::types::MaintenanceWindowTaskParameterValueExpression).
         157  +
    pub fn build(self) -> crate::types::MaintenanceWindowTaskParameterValueExpression {
         158  +
        crate::types::MaintenanceWindowTaskParameterValueExpression { values: self.values }
         159  +
    }
         160  +
}
         161  +
impl ::std::fmt::Debug for MaintenanceWindowTaskParameterValueExpressionBuilder {
         162  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         163  +
        let mut formatter = f.debug_struct("MaintenanceWindowTaskParameterValueExpressionBuilder");
         164  +
        formatter.field("values", &"*** Sensitive Data Redacted ***");
         165  +
        formatter.finish()
         166  +
    }
         167  +
}

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

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

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

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

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

@@ -0,1 +0,116 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Metadata to assign to an Application Manager application.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct MetadataValue {
           7  +
    /// <p>Metadata value to assign to an Application Manager application.</p>
           8  +
    pub value: ::std::option::Option<::std::string::String>,
           9  +
}
          10  +
impl MetadataValue {
          11  +
    /// <p>Metadata value to assign to an Application Manager application.</p>
          12  +
    pub fn value(&self) -> ::std::option::Option<&str> {
          13  +
        self.value.as_deref()
          14  +
    }
          15  +
}
          16  +
static METADATAVALUE_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          17  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MetadataValue$Value", "com.amazonaws.ssm", "MetadataValue"),
          18  +
    ::aws_smithy_schema::ShapeType::String,
          19  +
    "Value",
          20  +
    0,
          21  +
);
          22  +
static METADATAVALUE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MetadataValue", "com.amazonaws.ssm", "MetadataValue"),
          24  +
    ::aws_smithy_schema::ShapeType::Structure,
          25  +
    &[&METADATAVALUE_MEMBER_VALUE],
          26  +
);
          27  +
impl MetadataValue {
          28  +
    /// The schema for this shape.
          29  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &METADATAVALUE_SCHEMA;
          30  +
}
          31  +
impl ::aws_smithy_schema::serde::SerializableStruct for MetadataValue {
          32  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          33  +
    fn serialize_members(
          34  +
        &self,
          35  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          36  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          37  +
        if let Some(ref val) = self.value {
          38  +
            ser.write_string(&METADATAVALUE_MEMBER_VALUE, val)?;
          39  +
        }
          40  +
        Ok(())
          41  +
    }
          42  +
}
          43  +
impl MetadataValue {
          44  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          45  +
    pub fn deserialize(
          46  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          47  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          48  +
        #[allow(unused_variables, unused_mut)]
          49  +
        let mut builder = Self::builder();
          50  +
        #[allow(
          51  +
            unused_variables,
          52  +
            unreachable_code,
          53  +
            clippy::single_match,
          54  +
            clippy::match_single_binding,
          55  +
            clippy::diverging_sub_expression
          56  +
        )]
          57  +
        deserializer.read_struct(&METADATAVALUE_SCHEMA, &mut |member, deser| {
          58  +
            match member.member_index() {
          59  +
                Some(0) => {
          60  +
                    if deser.is_null() {
          61  +
                        deser.read_null()?;
          62  +
                    } else {
          63  +
                        builder.value = Some(deser.read_string(member)?);
          64  +
                    }
          65  +
                }
          66  +
                _ => {}
          67  +
            }
          68  +
            Ok(())
          69  +
        })?;
          70  +
        Ok(builder.build())
          71  +
    }
          72  +
}
          73  +
impl MetadataValue {
          74  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          75  +
    pub fn deserialize_with_response(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          77  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          78  +
        _status: u16,
          79  +
        _body: &[u8],
          80  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          81  +
        Self::deserialize(deserializer)
          82  +
    }
          83  +
}
          84  +
impl MetadataValue {
          85  +
    /// Creates a new builder-style object to manufacture [`MetadataValue`](crate::types::MetadataValue).
          86  +
    pub fn builder() -> crate::types::builders::MetadataValueBuilder {
          87  +
        crate::types::builders::MetadataValueBuilder::default()
          88  +
    }
          89  +
}
          90  +
          91  +
/// A builder for [`MetadataValue`](crate::types::MetadataValue).
          92  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          93  +
#[non_exhaustive]
          94  +
pub struct MetadataValueBuilder {
          95  +
    pub(crate) value: ::std::option::Option<::std::string::String>,
          96  +
}
          97  +
impl MetadataValueBuilder {
          98  +
    /// <p>Metadata value to assign to an Application Manager application.</p>
          99  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         100  +
        self.value = ::std::option::Option::Some(input.into());
         101  +
        self
         102  +
    }
         103  +
    /// <p>Metadata value to assign to an Application Manager application.</p>
         104  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         105  +
        self.value = input;
         106  +
        self
         107  +
    }
         108  +
    /// <p>Metadata value to assign to an Application Manager application.</p>
         109  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         110  +
        &self.value
         111  +
    }
         112  +
    /// Consumes the builder and constructs a [`MetadataValue`](crate::types::MetadataValue).
         113  +
    pub fn build(self) -> crate::types::MetadataValue {
         114  +
        crate::types::MetadataValue { value: self.value }
         115  +
    }
         116  +
}

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

@@ -0,1 +0,276 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Details about an individual managed node.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct Node {
           7  +
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
           8  +
    pub capture_time: ::std::option::Option<::aws_smithy_types::DateTime>,
           9  +
    /// <p>The ID of the managed node.</p>
          10  +
    pub id: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>Information about the ownership of the managed node.</p>
          12  +
    pub owner: ::std::option::Option<crate::types::NodeOwnerInfo>,
          13  +
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
          14  +
    pub region: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>Information about the type of node.</p>
          16  +
    pub node_type: ::std::option::Option<crate::types::NodeType>,
          17  +
}
          18  +
impl Node {
          19  +
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
          20  +
    pub fn capture_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          21  +
        self.capture_time.as_ref()
          22  +
    }
          23  +
    /// <p>The ID of the managed node.</p>
          24  +
    pub fn id(&self) -> ::std::option::Option<&str> {
          25  +
        self.id.as_deref()
          26  +
    }
          27  +
    /// <p>Information about the ownership of the managed node.</p>
          28  +
    pub fn owner(&self) -> ::std::option::Option<&crate::types::NodeOwnerInfo> {
          29  +
        self.owner.as_ref()
          30  +
    }
          31  +
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
          32  +
    pub fn region(&self) -> ::std::option::Option<&str> {
          33  +
        self.region.as_deref()
          34  +
    }
          35  +
    /// <p>Information about the type of node.</p>
          36  +
    pub fn node_type(&self) -> ::std::option::Option<&crate::types::NodeType> {
          37  +
        self.node_type.as_ref()
          38  +
    }
          39  +
}
          40  +
static NODE_MEMBER_CAPTURE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Node$CaptureTime", "com.amazonaws.ssm", "Node"),
          42  +
    ::aws_smithy_schema::ShapeType::Timestamp,
          43  +
    "CaptureTime",
          44  +
    0,
          45  +
);
          46  +
static NODE_MEMBER_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Node$Id", "com.amazonaws.ssm", "Node"),
          48  +
    ::aws_smithy_schema::ShapeType::String,
          49  +
    "Id",
          50  +
    1,
          51  +
);
          52  +
static NODE_MEMBER_OWNER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Node$Owner", "com.amazonaws.ssm", "Node"),
          54  +
    ::aws_smithy_schema::ShapeType::Structure,
          55  +
    "Owner",
          56  +
    2,
          57  +
);
          58  +
static NODE_MEMBER_REGION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Node$Region", "com.amazonaws.ssm", "Node"),
          60  +
    ::aws_smithy_schema::ShapeType::String,
          61  +
    "Region",
          62  +
    3,
          63  +
);
          64  +
static NODE_MEMBER_NODE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          65  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Node$NodeType", "com.amazonaws.ssm", "Node"),
          66  +
    ::aws_smithy_schema::ShapeType::Union,
          67  +
    "NodeType",
          68  +
    4,
          69  +
);
          70  +
static NODE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          71  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Node", "com.amazonaws.ssm", "Node"),
          72  +
    ::aws_smithy_schema::ShapeType::Structure,
          73  +
    &[
          74  +
        &NODE_MEMBER_CAPTURE_TIME,
          75  +
        &NODE_MEMBER_ID,
          76  +
        &NODE_MEMBER_OWNER,
          77  +
        &NODE_MEMBER_REGION,
          78  +
        &NODE_MEMBER_NODE_TYPE,
          79  +
    ],
          80  +
);
          81  +
impl Node {
          82  +
    /// The schema for this shape.
          83  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &NODE_SCHEMA;
          84  +
}
          85  +
impl ::aws_smithy_schema::serde::SerializableStruct for Node {
          86  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          87  +
    fn serialize_members(
          88  +
        &self,
          89  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          90  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          91  +
        if let Some(ref val) = self.capture_time {
          92  +
            ser.write_timestamp(&NODE_MEMBER_CAPTURE_TIME, val)?;
          93  +
        }
          94  +
        if let Some(ref val) = self.id {
          95  +
            ser.write_string(&NODE_MEMBER_ID, val)?;
          96  +
        }
          97  +
        if let Some(ref val) = self.owner {
          98  +
            ser.write_struct(&NODE_MEMBER_OWNER, val)?;
          99  +
        }
         100  +
        if let Some(ref val) = self.region {
         101  +
            ser.write_string(&NODE_MEMBER_REGION, val)?;
         102  +
        }
         103  +
        if let Some(ref val) = self.node_type {
         104  +
            ser.write_struct(&NODE_MEMBER_NODE_TYPE, val)?;
         105  +
        }
         106  +
        Ok(())
         107  +
    }
         108  +
}
         109  +
impl Node {
         110  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         111  +
    pub fn deserialize(
         112  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         113  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         114  +
        #[allow(unused_variables, unused_mut)]
         115  +
        let mut builder = Self::builder();
         116  +
        #[allow(
         117  +
            unused_variables,
         118  +
            unreachable_code,
         119  +
            clippy::single_match,
         120  +
            clippy::match_single_binding,
         121  +
            clippy::diverging_sub_expression
         122  +
        )]
         123  +
        deserializer.read_struct(&NODE_SCHEMA, &mut |member, deser| {
         124  +
            match member.member_index() {
         125  +
                Some(0) => {
         126  +
                    if deser.is_null() {
         127  +
                        deser.read_null()?;
         128  +
                    } else {
         129  +
                        builder.capture_time = Some(deser.read_timestamp(member)?);
         130  +
                    }
         131  +
                }
         132  +
                Some(1) => {
         133  +
                    if deser.is_null() {
         134  +
                        deser.read_null()?;
         135  +
                    } else {
         136  +
                        builder.id = Some(deser.read_string(member)?);
         137  +
                    }
         138  +
                }
         139  +
                Some(2) => {
         140  +
                    if deser.is_null() {
         141  +
                        deser.read_null()?;
         142  +
                    } else {
         143  +
                        builder.owner = Some(crate::types::NodeOwnerInfo::deserialize(deser)?);
         144  +
                    }
         145  +
                }
         146  +
                Some(3) => {
         147  +
                    if deser.is_null() {
         148  +
                        deser.read_null()?;
         149  +
                    } else {
         150  +
                        builder.region = Some(deser.read_string(member)?);
         151  +
                    }
         152  +
                }
         153  +
                Some(4) => {
         154  +
                    if deser.is_null() {
         155  +
                        deser.read_null()?;
         156  +
                    } else {
         157  +
                        builder.node_type = Some(crate::types::NodeType::deserialize(deser)?);
         158  +
                    }
         159  +
                }
         160  +
                _ => {}
         161  +
            }
         162  +
            Ok(())
         163  +
        })?;
         164  +
        Ok(builder.build())
         165  +
    }
         166  +
}
         167  +
impl Node {
         168  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         169  +
    pub fn deserialize_with_response(
         170  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         171  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         172  +
        _status: u16,
         173  +
        _body: &[u8],
         174  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         175  +
        Self::deserialize(deserializer)
         176  +
    }
         177  +
}
         178  +
impl Node {
         179  +
    /// Creates a new builder-style object to manufacture [`Node`](crate::types::Node).
         180  +
    pub fn builder() -> crate::types::builders::NodeBuilder {
         181  +
        crate::types::builders::NodeBuilder::default()
         182  +
    }
         183  +
}
         184  +
         185  +
/// A builder for [`Node`](crate::types::Node).
         186  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         187  +
#[non_exhaustive]
         188  +
pub struct NodeBuilder {
         189  +
    pub(crate) capture_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         190  +
    pub(crate) id: ::std::option::Option<::std::string::String>,
         191  +
    pub(crate) owner: ::std::option::Option<crate::types::NodeOwnerInfo>,
         192  +
    pub(crate) region: ::std::option::Option<::std::string::String>,
         193  +
    pub(crate) node_type: ::std::option::Option<crate::types::NodeType>,
         194  +
}
         195  +
impl NodeBuilder {
         196  +
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
         197  +
    pub fn capture_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         198  +
        self.capture_time = ::std::option::Option::Some(input);
         199  +
        self
         200  +
    }
         201  +
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
         202  +
    pub fn set_capture_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         203  +
        self.capture_time = input;
         204  +
        self
         205  +
    }
         206  +
    /// <p>The UTC timestamp for when the managed node data was last captured.</p>
         207  +
    pub fn get_capture_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         208  +
        &self.capture_time
         209  +
    }
         210  +
    /// <p>The ID of the managed node.</p>
         211  +
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         212  +
        self.id = ::std::option::Option::Some(input.into());
         213  +
        self
         214  +
    }
         215  +
    /// <p>The ID of the managed node.</p>
         216  +
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         217  +
        self.id = input;
         218  +
        self
         219  +
    }
         220  +
    /// <p>The ID of the managed node.</p>
         221  +
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
         222  +
        &self.id
         223  +
    }
         224  +
    /// <p>Information about the ownership of the managed node.</p>
         225  +
    pub fn owner(mut self, input: crate::types::NodeOwnerInfo) -> Self {
         226  +
        self.owner = ::std::option::Option::Some(input);
         227  +
        self
         228  +
    }
         229  +
    /// <p>Information about the ownership of the managed node.</p>
         230  +
    pub fn set_owner(mut self, input: ::std::option::Option<crate::types::NodeOwnerInfo>) -> Self {
         231  +
        self.owner = input;
         232  +
        self
         233  +
    }
         234  +
    /// <p>Information about the ownership of the managed node.</p>
         235  +
    pub fn get_owner(&self) -> &::std::option::Option<crate::types::NodeOwnerInfo> {
         236  +
        &self.owner
         237  +
    }
         238  +
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
         239  +
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         240  +
        self.region = ::std::option::Option::Some(input.into());
         241  +
        self
         242  +
    }
         243  +
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
         244  +
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         245  +
        self.region = input;
         246  +
        self
         247  +
    }
         248  +
    /// <p>The Amazon Web Services Region that a managed node was created in or assigned to.</p>
         249  +
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
         250  +
        &self.region
         251  +
    }
         252  +
    /// <p>Information about the type of node.</p>
         253  +
    pub fn node_type(mut self, input: crate::types::NodeType) -> Self {
         254  +
        self.node_type = ::std::option::Option::Some(input);
         255  +
        self
         256  +
    }
         257  +
    /// <p>Information about the type of node.</p>
         258  +
    pub fn set_node_type(mut self, input: ::std::option::Option<crate::types::NodeType>) -> Self {
         259  +
        self.node_type = input;
         260  +
        self
         261  +
    }
         262  +
    /// <p>Information about the type of node.</p>
         263  +
    pub fn get_node_type(&self) -> &::std::option::Option<crate::types::NodeType> {
         264  +
        &self.node_type
         265  +
    }
         266  +
    /// Consumes the builder and constructs a [`Node`](crate::types::Node).
         267  +
    pub fn build(self) -> crate::types::Node {
         268  +
        crate::types::Node {
         269  +
            capture_time: self.capture_time,
         270  +
            id: self.id,
         271  +
            owner: self.owner,
         272  +
            region: self.region,
         273  +
            node_type: self.node_type,
         274  +
        }
         275  +
    }
         276  +
}