AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_command_invocation_status.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 `CommandInvocationStatus`, 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 commandinvocationstatus = unimplemented!();
          14  +
/// match commandinvocationstatus {
          15  +
///     CommandInvocationStatus::Cancelled => { /* ... */ },
          16  +
///     CommandInvocationStatus::Cancelling => { /* ... */ },
          17  +
///     CommandInvocationStatus::Delayed => { /* ... */ },
          18  +
///     CommandInvocationStatus::Failed => { /* ... */ },
          19  +
///     CommandInvocationStatus::InProgress => { /* ... */ },
          20  +
///     CommandInvocationStatus::Pending => { /* ... */ },
          21  +
///     CommandInvocationStatus::Success => { /* ... */ },
          22  +
///     CommandInvocationStatus::TimedOut => { /* ... */ },
          23  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          24  +
///     _ => { /* ... */ },
          25  +
/// }
          26  +
/// ```
          27  +
/// The above code demonstrates that when `commandinvocationstatus` represents
          28  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          29  +
/// even though the enum does not contain a variant `CommandInvocationStatus::NewFeature`
          30  +
/// in the current version of SDK. The reason is that the variable `other`,
          31  +
/// created by the `@` operator, is bound to
          32  +
/// `CommandInvocationStatus::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 `CommandInvocationStatus::NewFeature` is defined.
          36  +
/// Specifically, when `commandinvocationstatus` represents `NewFeature`,
          37  +
/// the execution path will hit the second last match arm as before by virtue of
          38  +
/// calling `as_str` on `CommandInvocationStatus::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 CommandInvocationStatus {
          51  +
    #[allow(missing_docs)] // documentation missing in model
          52  +
    Cancelled,
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    Cancelling,
          55  +
    #[allow(missing_docs)] // documentation missing in model
          56  +
    Delayed,
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    Failed,
          59  +
    #[allow(missing_docs)] // documentation missing in model
          60  +
    InProgress,
          61  +
    #[allow(missing_docs)] // documentation missing in model
          62  +
    Pending,
          63  +
    #[allow(missing_docs)] // documentation missing in model
          64  +
    Success,
          65  +
    #[allow(missing_docs)] // documentation missing in model
          66  +
    TimedOut,
          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 CommandInvocationStatus {
          72  +
    fn from(s: &str) -> Self {
          73  +
        match s {
          74  +
            "Cancelled" => CommandInvocationStatus::Cancelled,
          75  +
            "Cancelling" => CommandInvocationStatus::Cancelling,
          76  +
            "Delayed" => CommandInvocationStatus::Delayed,
          77  +
            "Failed" => CommandInvocationStatus::Failed,
          78  +
            "InProgress" => CommandInvocationStatus::InProgress,
          79  +
            "Pending" => CommandInvocationStatus::Pending,
          80  +
            "Success" => CommandInvocationStatus::Success,
          81  +
            "TimedOut" => CommandInvocationStatus::TimedOut,
          82  +
            other => CommandInvocationStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          83  +
        }
          84  +
    }
          85  +
}
          86  +
impl ::std::str::FromStr for CommandInvocationStatus {
          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(CommandInvocationStatus::from(s))
          91  +
    }
          92  +
}
          93  +
impl CommandInvocationStatus {
          94  +
    /// Returns the `&str` value of the enum member.
          95  +
    pub fn as_str(&self) -> &str {
          96  +
        match self {
          97  +
            CommandInvocationStatus::Cancelled => "Cancelled",
          98  +
            CommandInvocationStatus::Cancelling => "Cancelling",
          99  +
            CommandInvocationStatus::Delayed => "Delayed",
         100  +
            CommandInvocationStatus::Failed => "Failed",
         101  +
            CommandInvocationStatus::InProgress => "InProgress",
         102  +
            CommandInvocationStatus::Pending => "Pending",
         103  +
            CommandInvocationStatus::Success => "Success",
         104  +
            CommandInvocationStatus::TimedOut => "TimedOut",
         105  +
            CommandInvocationStatus::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  +
            "Cancelled",
         112  +
            "Cancelling",
         113  +
            "Delayed",
         114  +
            "Failed",
         115  +
            "InProgress",
         116  +
            "Pending",
         117  +
            "Success",
         118  +
            "TimedOut",
         119  +
        ]
         120  +
    }
         121  +
}
         122  +
impl ::std::convert::AsRef<str> for CommandInvocationStatus {
         123  +
    fn as_ref(&self) -> &str {
         124  +
        self.as_str()
         125  +
    }
         126  +
}
         127  +
impl CommandInvocationStatus {
         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 CommandInvocationStatus {
         140  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         141  +
        match self {
         142  +
            CommandInvocationStatus::Cancelled => write!(f, "Cancelled"),
         143  +
            CommandInvocationStatus::Cancelling => write!(f, "Cancelling"),
         144  +
            CommandInvocationStatus::Delayed => write!(f, "Delayed"),
         145  +
            CommandInvocationStatus::Failed => write!(f, "Failed"),
         146  +
            CommandInvocationStatus::InProgress => write!(f, "InProgress"),
         147  +
            CommandInvocationStatus::Pending => write!(f, "Pending"),
         148  +
            CommandInvocationStatus::Success => write!(f, "Success"),
         149  +
            CommandInvocationStatus::TimedOut => write!(f, "TimedOut"),
         150  +
            CommandInvocationStatus::Unknown(value) => write!(f, "{value}"),
         151  +
        }
         152  +
    }
         153  +
}

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

@@ -0,1 +0,704 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Describes plugin details.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct CommandPlugin {
           7  +
    /// <p>The name of the plugin. Must be one of the following: <code>aws:updateAgent</code>, <code>aws:domainjoin</code>, <code>aws:applications</code>, <code>aws:runPowerShellScript</code>, <code>aws:psmodule</code>, <code>aws:cloudWatch</code>, <code>aws:runShellScript</code>, or <code>aws:updateSSMAgent</code>.</p>
           8  +
    pub name: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The status of this plugin. You can run a document with multiple plugins.</p>
          10  +
    pub status: ::std::option::Option<crate::types::CommandPluginStatus>,
          11  +
    /// <p>A detailed status of the plugin execution. <code>StatusDetails</code> includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
          12  +
    /// <ul>
          13  +
    /// <li>
          14  +
    /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
          15  +
    /// <li>
          16  +
    /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
          17  +
    /// <li>
          18  +
    /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
          19  +
    /// <li>
          20  +
    /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
          21  +
    /// <li>
          22  +
    /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
          23  +
    /// <li>
          24  +
    /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.</p></li>
          25  +
    /// <li>
          26  +
    /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
          27  +
    /// <li>
          28  +
    /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist, or it might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit, and they don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
          29  +
    /// <li>
          30  +
    /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
          31  +
    /// </ul>
          32  +
    pub status_details: ::std::option::Option<::std::string::String>,
          33  +
    /// <p>A numeric response code generated after running the plugin.</p>
          34  +
    pub response_code: i32,
          35  +
    /// <p>The time the plugin started running.</p>
          36  +
    pub response_start_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          37  +
    /// <p>The time the plugin stopped running. Could stop prematurely if, for example, a cancel command was sent.</p>
          38  +
    pub response_finish_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          39  +
    /// <p>Output of the plugin execution.</p>
          40  +
    pub output: ::std::option::Option<::std::string::String>,
          41  +
    /// <p>The URL for the complete text written by the plugin to stdout in Amazon S3. If the S3 bucket for the command wasn't specified, then this string is empty.</p>
          42  +
    pub standard_output_url: ::std::option::Option<::std::string::String>,
          43  +
    /// <p>The URL for the complete text written by the plugin to stderr. If execution isn't yet complete, then this string is empty.</p>
          44  +
    pub standard_error_url: ::std::option::Option<::std::string::String>,
          45  +
    /// <p>(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Amazon Web Services Systems Manager automatically determines the S3 bucket region.</p>
          46  +
    pub output_s3_region: ::std::option::Option<::std::string::String>,
          47  +
    /// <p>The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
          48  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
          49  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
          50  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
          51  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
          52  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
          53  +
    pub output_s3_bucket_name: ::std::option::Option<::std::string::String>,
          54  +
    /// <p>The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
          55  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
          56  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
          57  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
          58  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
          59  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
          60  +
    pub output_s3_key_prefix: ::std::option::Option<::std::string::String>,
          61  +
}
          62  +
impl CommandPlugin {
          63  +
    /// <p>The name of the plugin. Must be one of the following: <code>aws:updateAgent</code>, <code>aws:domainjoin</code>, <code>aws:applications</code>, <code>aws:runPowerShellScript</code>, <code>aws:psmodule</code>, <code>aws:cloudWatch</code>, <code>aws:runShellScript</code>, or <code>aws:updateSSMAgent</code>.</p>
          64  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          65  +
        self.name.as_deref()
          66  +
    }
          67  +
    /// <p>The status of this plugin. You can run a document with multiple plugins.</p>
          68  +
    pub fn status(&self) -> ::std::option::Option<&crate::types::CommandPluginStatus> {
          69  +
        self.status.as_ref()
          70  +
    }
          71  +
    /// <p>A detailed status of the plugin execution. <code>StatusDetails</code> includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
          72  +
    /// <ul>
          73  +
    /// <li>
          74  +
    /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
          75  +
    /// <li>
          76  +
    /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
          77  +
    /// <li>
          78  +
    /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
          79  +
    /// <li>
          80  +
    /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
          81  +
    /// <li>
          82  +
    /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
          83  +
    /// <li>
          84  +
    /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.</p></li>
          85  +
    /// <li>
          86  +
    /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
          87  +
    /// <li>
          88  +
    /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist, or it might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit, and they don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
          89  +
    /// <li>
          90  +
    /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
          91  +
    /// </ul>
          92  +
    pub fn status_details(&self) -> ::std::option::Option<&str> {
          93  +
        self.status_details.as_deref()
          94  +
    }
          95  +
    /// <p>A numeric response code generated after running the plugin.</p>
          96  +
    pub fn response_code(&self) -> i32 {
          97  +
        self.response_code
          98  +
    }
          99  +
    /// <p>The time the plugin started running.</p>
         100  +
    pub fn response_start_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
         101  +
        self.response_start_date_time.as_ref()
         102  +
    }
         103  +
    /// <p>The time the plugin stopped running. Could stop prematurely if, for example, a cancel command was sent.</p>
         104  +
    pub fn response_finish_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
         105  +
        self.response_finish_date_time.as_ref()
         106  +
    }
         107  +
    /// <p>Output of the plugin execution.</p>
         108  +
    pub fn output(&self) -> ::std::option::Option<&str> {
         109  +
        self.output.as_deref()
         110  +
    }
         111  +
    /// <p>The URL for the complete text written by the plugin to stdout in Amazon S3. If the S3 bucket for the command wasn't specified, then this string is empty.</p>
         112  +
    pub fn standard_output_url(&self) -> ::std::option::Option<&str> {
         113  +
        self.standard_output_url.as_deref()
         114  +
    }
         115  +
    /// <p>The URL for the complete text written by the plugin to stderr. If execution isn't yet complete, then this string is empty.</p>
         116  +
    pub fn standard_error_url(&self) -> ::std::option::Option<&str> {
         117  +
        self.standard_error_url.as_deref()
         118  +
    }
         119  +
    /// <p>(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Amazon Web Services Systems Manager automatically determines the S3 bucket region.</p>
         120  +
    pub fn output_s3_region(&self) -> ::std::option::Option<&str> {
         121  +
        self.output_s3_region.as_deref()
         122  +
    }
         123  +
    /// <p>The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         124  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         125  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         126  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         127  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         128  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         129  +
    pub fn output_s3_bucket_name(&self) -> ::std::option::Option<&str> {
         130  +
        self.output_s3_bucket_name.as_deref()
         131  +
    }
         132  +
    /// <p>The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         133  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         134  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         135  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         136  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         137  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         138  +
    pub fn output_s3_key_prefix(&self) -> ::std::option::Option<&str> {
         139  +
        self.output_s3_key_prefix.as_deref()
         140  +
    }
         141  +
}
         142  +
static COMMANDPLUGIN_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         143  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$Name", "com.amazonaws.ssm", "CommandPlugin"),
         144  +
    ::aws_smithy_schema::ShapeType::String,
         145  +
    "Name",
         146  +
    0,
         147  +
);
         148  +
static COMMANDPLUGIN_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         149  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$Status", "com.amazonaws.ssm", "CommandPlugin"),
         150  +
    ::aws_smithy_schema::ShapeType::String,
         151  +
    "Status",
         152  +
    1,
         153  +
);
         154  +
static COMMANDPLUGIN_MEMBER_STATUS_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         155  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$StatusDetails", "com.amazonaws.ssm", "CommandPlugin"),
         156  +
    ::aws_smithy_schema::ShapeType::String,
         157  +
    "StatusDetails",
         158  +
    2,
         159  +
);
         160  +
static COMMANDPLUGIN_MEMBER_RESPONSE_CODE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         161  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$ResponseCode", "com.amazonaws.ssm", "CommandPlugin"),
         162  +
    ::aws_smithy_schema::ShapeType::Integer,
         163  +
    "ResponseCode",
         164  +
    3,
         165  +
);
         166  +
static COMMANDPLUGIN_MEMBER_RESPONSE_START_DATE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         167  +
    ::aws_smithy_schema::ShapeId::from_parts(
         168  +
        "com.amazonaws.ssm#CommandPlugin$ResponseStartDateTime",
         169  +
        "com.amazonaws.ssm",
         170  +
        "CommandPlugin",
         171  +
    ),
         172  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         173  +
    "ResponseStartDateTime",
         174  +
    4,
         175  +
);
         176  +
static COMMANDPLUGIN_MEMBER_RESPONSE_FINISH_DATE_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         177  +
    ::aws_smithy_schema::ShapeId::from_parts(
         178  +
        "com.amazonaws.ssm#CommandPlugin$ResponseFinishDateTime",
         179  +
        "com.amazonaws.ssm",
         180  +
        "CommandPlugin",
         181  +
    ),
         182  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         183  +
    "ResponseFinishDateTime",
         184  +
    5,
         185  +
);
         186  +
static COMMANDPLUGIN_MEMBER_OUTPUT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         187  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$Output", "com.amazonaws.ssm", "CommandPlugin"),
         188  +
    ::aws_smithy_schema::ShapeType::String,
         189  +
    "Output",
         190  +
    6,
         191  +
);
         192  +
static COMMANDPLUGIN_MEMBER_STANDARD_OUTPUT_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         193  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$StandardOutputUrl", "com.amazonaws.ssm", "CommandPlugin"),
         194  +
    ::aws_smithy_schema::ShapeType::String,
         195  +
    "StandardOutputUrl",
         196  +
    7,
         197  +
);
         198  +
static COMMANDPLUGIN_MEMBER_STANDARD_ERROR_URL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         199  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$StandardErrorUrl", "com.amazonaws.ssm", "CommandPlugin"),
         200  +
    ::aws_smithy_schema::ShapeType::String,
         201  +
    "StandardErrorUrl",
         202  +
    8,
         203  +
);
         204  +
static COMMANDPLUGIN_MEMBER_OUTPUT_S3_REGION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         205  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$OutputS3Region", "com.amazonaws.ssm", "CommandPlugin"),
         206  +
    ::aws_smithy_schema::ShapeType::String,
         207  +
    "OutputS3Region",
         208  +
    9,
         209  +
);
         210  +
static COMMANDPLUGIN_MEMBER_OUTPUT_S3_BUCKET_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         211  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$OutputS3BucketName", "com.amazonaws.ssm", "CommandPlugin"),
         212  +
    ::aws_smithy_schema::ShapeType::String,
         213  +
    "OutputS3BucketName",
         214  +
    10,
         215  +
);
         216  +
static COMMANDPLUGIN_MEMBER_OUTPUT_S3_KEY_PREFIX: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         217  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin$OutputS3KeyPrefix", "com.amazonaws.ssm", "CommandPlugin"),
         218  +
    ::aws_smithy_schema::ShapeType::String,
         219  +
    "OutputS3KeyPrefix",
         220  +
    11,
         221  +
);
         222  +
static COMMANDPLUGIN_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         223  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#CommandPlugin", "com.amazonaws.ssm", "CommandPlugin"),
         224  +
    ::aws_smithy_schema::ShapeType::Structure,
         225  +
    &[
         226  +
        &COMMANDPLUGIN_MEMBER_NAME,
         227  +
        &COMMANDPLUGIN_MEMBER_STATUS,
         228  +
        &COMMANDPLUGIN_MEMBER_STATUS_DETAILS,
         229  +
        &COMMANDPLUGIN_MEMBER_RESPONSE_CODE,
         230  +
        &COMMANDPLUGIN_MEMBER_RESPONSE_START_DATE_TIME,
         231  +
        &COMMANDPLUGIN_MEMBER_RESPONSE_FINISH_DATE_TIME,
         232  +
        &COMMANDPLUGIN_MEMBER_OUTPUT,
         233  +
        &COMMANDPLUGIN_MEMBER_STANDARD_OUTPUT_URL,
         234  +
        &COMMANDPLUGIN_MEMBER_STANDARD_ERROR_URL,
         235  +
        &COMMANDPLUGIN_MEMBER_OUTPUT_S3_REGION,
         236  +
        &COMMANDPLUGIN_MEMBER_OUTPUT_S3_BUCKET_NAME,
         237  +
        &COMMANDPLUGIN_MEMBER_OUTPUT_S3_KEY_PREFIX,
         238  +
    ],
         239  +
);
         240  +
impl CommandPlugin {
         241  +
    /// The schema for this shape.
         242  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &COMMANDPLUGIN_SCHEMA;
         243  +
}
         244  +
impl ::aws_smithy_schema::serde::SerializableStruct for CommandPlugin {
         245  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         246  +
    fn serialize_members(
         247  +
        &self,
         248  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         249  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         250  +
        if let Some(ref val) = self.name {
         251  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_NAME, val)?;
         252  +
        }
         253  +
        if let Some(ref val) = self.status {
         254  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_STATUS, val.as_str())?;
         255  +
        }
         256  +
        if let Some(ref val) = self.status_details {
         257  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_STATUS_DETAILS, val)?;
         258  +
        }
         259  +
        {
         260  +
            let val = &self.response_code;
         261  +
            ser.write_integer(&COMMANDPLUGIN_MEMBER_RESPONSE_CODE, *val)?;
         262  +
        }
         263  +
        if let Some(ref val) = self.response_start_date_time {
         264  +
            ser.write_timestamp(&COMMANDPLUGIN_MEMBER_RESPONSE_START_DATE_TIME, val)?;
         265  +
        }
         266  +
        if let Some(ref val) = self.response_finish_date_time {
         267  +
            ser.write_timestamp(&COMMANDPLUGIN_MEMBER_RESPONSE_FINISH_DATE_TIME, val)?;
         268  +
        }
         269  +
        if let Some(ref val) = self.output {
         270  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_OUTPUT, val)?;
         271  +
        }
         272  +
        if let Some(ref val) = self.standard_output_url {
         273  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_STANDARD_OUTPUT_URL, val)?;
         274  +
        }
         275  +
        if let Some(ref val) = self.standard_error_url {
         276  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_STANDARD_ERROR_URL, val)?;
         277  +
        }
         278  +
        if let Some(ref val) = self.output_s3_region {
         279  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_OUTPUT_S3_REGION, val)?;
         280  +
        }
         281  +
        if let Some(ref val) = self.output_s3_bucket_name {
         282  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_OUTPUT_S3_BUCKET_NAME, val)?;
         283  +
        }
         284  +
        if let Some(ref val) = self.output_s3_key_prefix {
         285  +
            ser.write_string(&COMMANDPLUGIN_MEMBER_OUTPUT_S3_KEY_PREFIX, val)?;
         286  +
        }
         287  +
        Ok(())
         288  +
    }
         289  +
}
         290  +
impl CommandPlugin {
         291  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         292  +
    pub fn deserialize(
         293  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         294  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         295  +
        #[allow(unused_variables, unused_mut)]
         296  +
        let mut builder = Self::builder();
         297  +
        #[allow(
         298  +
            unused_variables,
         299  +
            unreachable_code,
         300  +
            clippy::single_match,
         301  +
            clippy::match_single_binding,
         302  +
            clippy::diverging_sub_expression
         303  +
        )]
         304  +
        deserializer.read_struct(&COMMANDPLUGIN_SCHEMA, &mut |member, deser| {
         305  +
            match member.member_index() {
         306  +
                Some(0) => {
         307  +
                    if deser.is_null() {
         308  +
                        deser.read_null()?;
         309  +
                    } else {
         310  +
                        builder.name = Some(deser.read_string(member)?);
         311  +
                    }
         312  +
                }
         313  +
                Some(1) => {
         314  +
                    if deser.is_null() {
         315  +
                        deser.read_null()?;
         316  +
                    } else {
         317  +
                        builder.status = Some(crate::types::CommandPluginStatus::from(deser.read_string(member)?.as_str()));
         318  +
                    }
         319  +
                }
         320  +
                Some(2) => {
         321  +
                    if deser.is_null() {
         322  +
                        deser.read_null()?;
         323  +
                    } else {
         324  +
                        builder.status_details = Some(deser.read_string(member)?);
         325  +
                    }
         326  +
                }
         327  +
                Some(3) => {
         328  +
                    builder.response_code = Some(deser.read_integer(member)?);
         329  +
                }
         330  +
                Some(4) => {
         331  +
                    if deser.is_null() {
         332  +
                        deser.read_null()?;
         333  +
                    } else {
         334  +
                        builder.response_start_date_time = Some(deser.read_timestamp(member)?);
         335  +
                    }
         336  +
                }
         337  +
                Some(5) => {
         338  +
                    if deser.is_null() {
         339  +
                        deser.read_null()?;
         340  +
                    } else {
         341  +
                        builder.response_finish_date_time = Some(deser.read_timestamp(member)?);
         342  +
                    }
         343  +
                }
         344  +
                Some(6) => {
         345  +
                    if deser.is_null() {
         346  +
                        deser.read_null()?;
         347  +
                    } else {
         348  +
                        builder.output = Some(deser.read_string(member)?);
         349  +
                    }
         350  +
                }
         351  +
                Some(7) => {
         352  +
                    if deser.is_null() {
         353  +
                        deser.read_null()?;
         354  +
                    } else {
         355  +
                        builder.standard_output_url = Some(deser.read_string(member)?);
         356  +
                    }
         357  +
                }
         358  +
                Some(8) => {
         359  +
                    if deser.is_null() {
         360  +
                        deser.read_null()?;
         361  +
                    } else {
         362  +
                        builder.standard_error_url = Some(deser.read_string(member)?);
         363  +
                    }
         364  +
                }
         365  +
                Some(9) => {
         366  +
                    if deser.is_null() {
         367  +
                        deser.read_null()?;
         368  +
                    } else {
         369  +
                        builder.output_s3_region = Some(deser.read_string(member)?);
         370  +
                    }
         371  +
                }
         372  +
                Some(10) => {
         373  +
                    if deser.is_null() {
         374  +
                        deser.read_null()?;
         375  +
                    } else {
         376  +
                        builder.output_s3_bucket_name = Some(deser.read_string(member)?);
         377  +
                    }
         378  +
                }
         379  +
                Some(11) => {
         380  +
                    if deser.is_null() {
         381  +
                        deser.read_null()?;
         382  +
                    } else {
         383  +
                        builder.output_s3_key_prefix = Some(deser.read_string(member)?);
         384  +
                    }
         385  +
                }
         386  +
                _ => {}
         387  +
            }
         388  +
            Ok(())
         389  +
        })?;
         390  +
        Ok(builder.build())
         391  +
    }
         392  +
}
         393  +
impl CommandPlugin {
         394  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         395  +
    pub fn deserialize_with_response(
         396  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         397  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         398  +
        _status: u16,
         399  +
        _body: &[u8],
         400  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         401  +
        Self::deserialize(deserializer)
         402  +
    }
         403  +
}
         404  +
impl CommandPlugin {
         405  +
    /// Creates a new builder-style object to manufacture [`CommandPlugin`](crate::types::CommandPlugin).
         406  +
    pub fn builder() -> crate::types::builders::CommandPluginBuilder {
         407  +
        crate::types::builders::CommandPluginBuilder::default()
         408  +
    }
         409  +
}
         410  +
         411  +
/// A builder for [`CommandPlugin`](crate::types::CommandPlugin).
         412  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         413  +
#[non_exhaustive]
         414  +
pub struct CommandPluginBuilder {
         415  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         416  +
    pub(crate) status: ::std::option::Option<crate::types::CommandPluginStatus>,
         417  +
    pub(crate) status_details: ::std::option::Option<::std::string::String>,
         418  +
    pub(crate) response_code: ::std::option::Option<i32>,
         419  +
    pub(crate) response_start_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         420  +
    pub(crate) response_finish_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         421  +
    pub(crate) output: ::std::option::Option<::std::string::String>,
         422  +
    pub(crate) standard_output_url: ::std::option::Option<::std::string::String>,
         423  +
    pub(crate) standard_error_url: ::std::option::Option<::std::string::String>,
         424  +
    pub(crate) output_s3_region: ::std::option::Option<::std::string::String>,
         425  +
    pub(crate) output_s3_bucket_name: ::std::option::Option<::std::string::String>,
         426  +
    pub(crate) output_s3_key_prefix: ::std::option::Option<::std::string::String>,
         427  +
}
         428  +
impl CommandPluginBuilder {
         429  +
    /// <p>The name of the plugin. Must be one of the following: <code>aws:updateAgent</code>, <code>aws:domainjoin</code>, <code>aws:applications</code>, <code>aws:runPowerShellScript</code>, <code>aws:psmodule</code>, <code>aws:cloudWatch</code>, <code>aws:runShellScript</code>, or <code>aws:updateSSMAgent</code>.</p>
         430  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         431  +
        self.name = ::std::option::Option::Some(input.into());
         432  +
        self
         433  +
    }
         434  +
    /// <p>The name of the plugin. Must be one of the following: <code>aws:updateAgent</code>, <code>aws:domainjoin</code>, <code>aws:applications</code>, <code>aws:runPowerShellScript</code>, <code>aws:psmodule</code>, <code>aws:cloudWatch</code>, <code>aws:runShellScript</code>, or <code>aws:updateSSMAgent</code>.</p>
         435  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         436  +
        self.name = input;
         437  +
        self
         438  +
    }
         439  +
    /// <p>The name of the plugin. Must be one of the following: <code>aws:updateAgent</code>, <code>aws:domainjoin</code>, <code>aws:applications</code>, <code>aws:runPowerShellScript</code>, <code>aws:psmodule</code>, <code>aws:cloudWatch</code>, <code>aws:runShellScript</code>, or <code>aws:updateSSMAgent</code>.</p>
         440  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         441  +
        &self.name
         442  +
    }
         443  +
    /// <p>The status of this plugin. You can run a document with multiple plugins.</p>
         444  +
    pub fn status(mut self, input: crate::types::CommandPluginStatus) -> Self {
         445  +
        self.status = ::std::option::Option::Some(input);
         446  +
        self
         447  +
    }
         448  +
    /// <p>The status of this plugin. You can run a document with multiple plugins.</p>
         449  +
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::CommandPluginStatus>) -> Self {
         450  +
        self.status = input;
         451  +
        self
         452  +
    }
         453  +
    /// <p>The status of this plugin. You can run a document with multiple plugins.</p>
         454  +
    pub fn get_status(&self) -> &::std::option::Option<crate::types::CommandPluginStatus> {
         455  +
        &self.status
         456  +
    }
         457  +
    /// <p>A detailed status of the plugin execution. <code>StatusDetails</code> includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
         458  +
    /// <ul>
         459  +
    /// <li>
         460  +
    /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
         461  +
    /// <li>
         462  +
    /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
         463  +
    /// <li>
         464  +
    /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
         465  +
    /// <li>
         466  +
    /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
         467  +
    /// <li>
         468  +
    /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
         469  +
    /// <li>
         470  +
    /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.</p></li>
         471  +
    /// <li>
         472  +
    /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
         473  +
    /// <li>
         474  +
    /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist, or it might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit, and they don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
         475  +
    /// <li>
         476  +
    /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
         477  +
    /// </ul>
         478  +
    pub fn status_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         479  +
        self.status_details = ::std::option::Option::Some(input.into());
         480  +
        self
         481  +
    }
         482  +
    /// <p>A detailed status of the plugin execution. <code>StatusDetails</code> includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
         483  +
    /// <ul>
         484  +
    /// <li>
         485  +
    /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
         486  +
    /// <li>
         487  +
    /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
         488  +
    /// <li>
         489  +
    /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
         490  +
    /// <li>
         491  +
    /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
         492  +
    /// <li>
         493  +
    /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
         494  +
    /// <li>
         495  +
    /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.</p></li>
         496  +
    /// <li>
         497  +
    /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
         498  +
    /// <li>
         499  +
    /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist, or it might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit, and they don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
         500  +
    /// <li>
         501  +
    /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
         502  +
    /// </ul>
         503  +
    pub fn set_status_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         504  +
        self.status_details = input;
         505  +
        self
         506  +
    }
         507  +
    /// <p>A detailed status of the plugin execution. <code>StatusDetails</code> includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html">Understanding command statuses</a> in the <i>Amazon Web Services Systems Manager User Guide</i>. StatusDetails can be one of the following values:</p>
         508  +
    /// <ul>
         509  +
    /// <li>
         510  +
    /// <p>Pending: The command hasn't been sent to the managed node.</p></li>
         511  +
    /// <li>
         512  +
    /// <p>In Progress: The command has been sent to the managed node but hasn't reached a terminal state.</p></li>
         513  +
    /// <li>
         514  +
    /// <p>Success: The execution of the command or plugin was successfully completed. This is a terminal state.</p></li>
         515  +
    /// <li>
         516  +
    /// <p>Delivery Timed Out: The command wasn't delivered to the managed node before the delivery timeout expired. Delivery timeouts don't count against the parent command's <code>MaxErrors</code> limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
         517  +
    /// <li>
         518  +
    /// <p>Execution Timed Out: Command execution started on the managed node, but the execution wasn't complete before the execution timeout expired. Execution timeouts count against the <code>MaxErrors</code> limit of the parent command. This is a terminal state.</p></li>
         519  +
    /// <li>
         520  +
    /// <p>Failed: The command wasn't successful on the managed node. For a plugin, this indicates that the result code wasn't zero. For a command invocation, this indicates that the result code for one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state.</p></li>
         521  +
    /// <li>
         522  +
    /// <p>Cancelled: The command was terminated before it was completed. This is a terminal state.</p></li>
         523  +
    /// <li>
         524  +
    /// <p>Undeliverable: The command can't be delivered to the managed node. The managed node might not exist, or it might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit, and they don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state.</p></li>
         525  +
    /// <li>
         526  +
    /// <p>Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state.</p></li>
         527  +
    /// </ul>
         528  +
    pub fn get_status_details(&self) -> &::std::option::Option<::std::string::String> {
         529  +
        &self.status_details
         530  +
    }
         531  +
    /// <p>A numeric response code generated after running the plugin.</p>
         532  +
    pub fn response_code(mut self, input: i32) -> Self {
         533  +
        self.response_code = ::std::option::Option::Some(input);
         534  +
        self
         535  +
    }
         536  +
    /// <p>A numeric response code generated after running the plugin.</p>
         537  +
    pub fn set_response_code(mut self, input: ::std::option::Option<i32>) -> Self {
         538  +
        self.response_code = input;
         539  +
        self
         540  +
    }
         541  +
    /// <p>A numeric response code generated after running the plugin.</p>
         542  +
    pub fn get_response_code(&self) -> &::std::option::Option<i32> {
         543  +
        &self.response_code
         544  +
    }
         545  +
    /// <p>The time the plugin started running.</p>
         546  +
    pub fn response_start_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         547  +
        self.response_start_date_time = ::std::option::Option::Some(input);
         548  +
        self
         549  +
    }
         550  +
    /// <p>The time the plugin started running.</p>
         551  +
    pub fn set_response_start_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         552  +
        self.response_start_date_time = input;
         553  +
        self
         554  +
    }
         555  +
    /// <p>The time the plugin started running.</p>
         556  +
    pub fn get_response_start_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         557  +
        &self.response_start_date_time
         558  +
    }
         559  +
    /// <p>The time the plugin stopped running. Could stop prematurely if, for example, a cancel command was sent.</p>
         560  +
    pub fn response_finish_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         561  +
        self.response_finish_date_time = ::std::option::Option::Some(input);
         562  +
        self
         563  +
    }
         564  +
    /// <p>The time the plugin stopped running. Could stop prematurely if, for example, a cancel command was sent.</p>
         565  +
    pub fn set_response_finish_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         566  +
        self.response_finish_date_time = input;
         567  +
        self
         568  +
    }
         569  +
    /// <p>The time the plugin stopped running. Could stop prematurely if, for example, a cancel command was sent.</p>
         570  +
    pub fn get_response_finish_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         571  +
        &self.response_finish_date_time
         572  +
    }
         573  +
    /// <p>Output of the plugin execution.</p>
         574  +
    pub fn output(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         575  +
        self.output = ::std::option::Option::Some(input.into());
         576  +
        self
         577  +
    }
         578  +
    /// <p>Output of the plugin execution.</p>
         579  +
    pub fn set_output(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         580  +
        self.output = input;
         581  +
        self
         582  +
    }
         583  +
    /// <p>Output of the plugin execution.</p>
         584  +
    pub fn get_output(&self) -> &::std::option::Option<::std::string::String> {
         585  +
        &self.output
         586  +
    }
         587  +
    /// <p>The URL for the complete text written by the plugin to stdout in Amazon S3. If the S3 bucket for the command wasn't specified, then this string is empty.</p>
         588  +
    pub fn standard_output_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         589  +
        self.standard_output_url = ::std::option::Option::Some(input.into());
         590  +
        self
         591  +
    }
         592  +
    /// <p>The URL for the complete text written by the plugin to stdout in Amazon S3. If the S3 bucket for the command wasn't specified, then this string is empty.</p>
         593  +
    pub fn set_standard_output_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         594  +
        self.standard_output_url = input;
         595  +
        self
         596  +
    }
         597  +
    /// <p>The URL for the complete text written by the plugin to stdout in Amazon S3. If the S3 bucket for the command wasn't specified, then this string is empty.</p>
         598  +
    pub fn get_standard_output_url(&self) -> &::std::option::Option<::std::string::String> {
         599  +
        &self.standard_output_url
         600  +
    }
         601  +
    /// <p>The URL for the complete text written by the plugin to stderr. If execution isn't yet complete, then this string is empty.</p>
         602  +
    pub fn standard_error_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         603  +
        self.standard_error_url = ::std::option::Option::Some(input.into());
         604  +
        self
         605  +
    }
         606  +
    /// <p>The URL for the complete text written by the plugin to stderr. If execution isn't yet complete, then this string is empty.</p>
         607  +
    pub fn set_standard_error_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         608  +
        self.standard_error_url = input;
         609  +
        self
         610  +
    }
         611  +
    /// <p>The URL for the complete text written by the plugin to stderr. If execution isn't yet complete, then this string is empty.</p>
         612  +
    pub fn get_standard_error_url(&self) -> &::std::option::Option<::std::string::String> {
         613  +
        &self.standard_error_url
         614  +
    }
         615  +
    /// <p>(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Amazon Web Services Systems Manager automatically determines the S3 bucket region.</p>
         616  +
    pub fn output_s3_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         617  +
        self.output_s3_region = ::std::option::Option::Some(input.into());
         618  +
        self
         619  +
    }
         620  +
    /// <p>(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Amazon Web Services Systems Manager automatically determines the S3 bucket region.</p>
         621  +
    pub fn set_output_s3_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         622  +
        self.output_s3_region = input;
         623  +
        self
         624  +
    }
         625  +
    /// <p>(Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Amazon Web Services Systems Manager automatically determines the S3 bucket region.</p>
         626  +
    pub fn get_output_s3_region(&self) -> &::std::option::Option<::std::string::String> {
         627  +
        &self.output_s3_region
         628  +
    }
         629  +
    /// <p>The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         630  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         631  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         632  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         633  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         634  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         635  +
    pub fn output_s3_bucket_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         636  +
        self.output_s3_bucket_name = ::std::option::Option::Some(input.into());
         637  +
        self
         638  +
    }
         639  +
    /// <p>The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         640  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         641  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         642  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         643  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         644  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         645  +
    pub fn set_output_s3_bucket_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         646  +
        self.output_s3_bucket_name = input;
         647  +
        self
         648  +
    }
         649  +
    /// <p>The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         650  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         651  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         652  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         653  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         654  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         655  +
    pub fn get_output_s3_bucket_name(&self) -> &::std::option::Option<::std::string::String> {
         656  +
        &self.output_s3_bucket_name
         657  +
    }
         658  +
    /// <p>The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         659  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         660  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         661  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         662  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         663  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         664  +
    pub fn output_s3_key_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         665  +
        self.output_s3_key_prefix = ::std::option::Option::Some(input.into());
         666  +
        self
         667  +
    }
         668  +
    /// <p>The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         669  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         670  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         671  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         672  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         673  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         674  +
    pub fn set_output_s3_key_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         675  +
        self.output_s3_key_prefix = input;
         676  +
        self
         677  +
    }
         678  +
    /// <p>The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command. For example, in the following response:</p>
         679  +
    /// <p><code>amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript</code></p>
         680  +
    /// <p><code>amzn-s3-demo-bucket</code> is the name of the S3 bucket;</p>
         681  +
    /// <p><code>my-prefix</code> is the name of the S3 prefix;</p>
         682  +
    /// <p><code>i-02573cafcfEXAMPLE</code> is the managed node ID;</p>
         683  +
    /// <p><code>awsrunShellScript</code> is the name of the plugin.</p>
         684  +
    pub fn get_output_s3_key_prefix(&self) -> &::std::option::Option<::std::string::String> {
         685  +
        &self.output_s3_key_prefix
         686  +
    }
         687  +
    /// Consumes the builder and constructs a [`CommandPlugin`](crate::types::CommandPlugin).
         688  +
    pub fn build(self) -> crate::types::CommandPlugin {
         689  +
        crate::types::CommandPlugin {
         690  +
            name: self.name,
         691  +
            status: self.status,
         692  +
            status_details: self.status_details,
         693  +
            response_code: self.response_code.unwrap_or_default(),
         694  +
            response_start_date_time: self.response_start_date_time,
         695  +
            response_finish_date_time: self.response_finish_date_time,
         696  +
            output: self.output,
         697  +
            standard_output_url: self.standard_output_url,
         698  +
            standard_error_url: self.standard_error_url,
         699  +
            output_s3_region: self.output_s3_region,
         700  +
            output_s3_bucket_name: self.output_s3_bucket_name,
         701  +
            output_s3_key_prefix: self.output_s3_key_prefix,
         702  +
        }
         703  +
    }
         704  +
}

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

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

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

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