AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/associate_ops_item_related_item/_associate_ops_item_related_item_input.rs

@@ -0,1 +0,281 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct AssociateOpsItemRelatedItemInput {
           6  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
           7  +
    pub ops_item_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
           9  +
    pub association_type: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
          11  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
          12  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
          13  +
    pub resource_type: ::std::option::Option<::std::string::String>,
          14  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
          15  +
    pub resource_uri: ::std::option::Option<::std::string::String>,
          16  +
}
          17  +
impl AssociateOpsItemRelatedItemInput {
          18  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
          19  +
    pub fn ops_item_id(&self) -> ::std::option::Option<&str> {
          20  +
        self.ops_item_id.as_deref()
          21  +
    }
          22  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
          23  +
    pub fn association_type(&self) -> ::std::option::Option<&str> {
          24  +
        self.association_type.as_deref()
          25  +
    }
          26  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
          27  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
          28  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
          29  +
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
          30  +
        self.resource_type.as_deref()
          31  +
    }
          32  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
          33  +
    pub fn resource_uri(&self) -> ::std::option::Option<&str> {
          34  +
        self.resource_uri.as_deref()
          35  +
    }
          36  +
}
          37  +
static ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_OPS_ITEM_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          38  +
    ::aws_smithy_schema::ShapeId::from_parts(
          39  +
        "com.amazonaws.ssm.synthetic#AssociateOpsItemRelatedItemInput$OpsItemId",
          40  +
        "com.amazonaws.ssm.synthetic",
          41  +
        "AssociateOpsItemRelatedItemInput",
          42  +
    ),
          43  +
    ::aws_smithy_schema::ShapeType::String,
          44  +
    "OpsItemId",
          45  +
    0,
          46  +
);
          47  +
static ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_ASSOCIATION_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm.synthetic#AssociateOpsItemRelatedItemInput$AssociationType",
          50  +
        "com.amazonaws.ssm.synthetic",
          51  +
        "AssociateOpsItemRelatedItemInput",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "AssociationType",
          55  +
    1,
          56  +
);
          57  +
static ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts(
          59  +
        "com.amazonaws.ssm.synthetic#AssociateOpsItemRelatedItemInput$ResourceType",
          60  +
        "com.amazonaws.ssm.synthetic",
          61  +
        "AssociateOpsItemRelatedItemInput",
          62  +
    ),
          63  +
    ::aws_smithy_schema::ShapeType::String,
          64  +
    "ResourceType",
          65  +
    2,
          66  +
);
          67  +
static ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_RESOURCE_URI: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          68  +
    ::aws_smithy_schema::ShapeId::from_parts(
          69  +
        "com.amazonaws.ssm.synthetic#AssociateOpsItemRelatedItemInput$ResourceUri",
          70  +
        "com.amazonaws.ssm.synthetic",
          71  +
        "AssociateOpsItemRelatedItemInput",
          72  +
    ),
          73  +
    ::aws_smithy_schema::ShapeType::String,
          74  +
    "ResourceUri",
          75  +
    3,
          76  +
);
          77  +
static ASSOCIATEOPSITEMRELATEDITEMINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          78  +
    ::aws_smithy_schema::ShapeId::from_parts(
          79  +
        "com.amazonaws.ssm.synthetic#AssociateOpsItemRelatedItemInput",
          80  +
        "com.amazonaws.ssm.synthetic",
          81  +
        "AssociateOpsItemRelatedItemInput",
          82  +
    ),
          83  +
    ::aws_smithy_schema::ShapeType::Structure,
          84  +
    &[
          85  +
        &ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_OPS_ITEM_ID,
          86  +
        &ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_ASSOCIATION_TYPE,
          87  +
        &ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_RESOURCE_TYPE,
          88  +
        &ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_RESOURCE_URI,
          89  +
    ],
          90  +
)
          91  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          92  +
.with_original_name("AssociateOpsItemRelatedItemRequest");
          93  +
impl AssociateOpsItemRelatedItemInput {
          94  +
    /// The schema for this shape.
          95  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ASSOCIATEOPSITEMRELATEDITEMINPUT_SCHEMA;
          96  +
}
          97  +
impl ::aws_smithy_schema::serde::SerializableStruct for AssociateOpsItemRelatedItemInput {
          98  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          99  +
    fn serialize_members(
         100  +
        &self,
         101  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         102  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         103  +
        if let Some(ref val) = self.ops_item_id {
         104  +
            ser.write_string(&ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_OPS_ITEM_ID, val)?;
         105  +
        }
         106  +
        if let Some(ref val) = self.association_type {
         107  +
            ser.write_string(&ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_ASSOCIATION_TYPE, val)?;
         108  +
        }
         109  +
        if let Some(ref val) = self.resource_type {
         110  +
            ser.write_string(&ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_RESOURCE_TYPE, val)?;
         111  +
        }
         112  +
        if let Some(ref val) = self.resource_uri {
         113  +
            ser.write_string(&ASSOCIATEOPSITEMRELATEDITEMINPUT_MEMBER_RESOURCE_URI, val)?;
         114  +
        }
         115  +
        Ok(())
         116  +
    }
         117  +
}
         118  +
impl AssociateOpsItemRelatedItemInput {
         119  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         120  +
    pub fn deserialize(
         121  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         122  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         123  +
        #[allow(unused_variables, unused_mut)]
         124  +
        let mut builder = Self::builder();
         125  +
        #[allow(
         126  +
            unused_variables,
         127  +
            unreachable_code,
         128  +
            clippy::single_match,
         129  +
            clippy::match_single_binding,
         130  +
            clippy::diverging_sub_expression
         131  +
        )]
         132  +
        deserializer.read_struct(&ASSOCIATEOPSITEMRELATEDITEMINPUT_SCHEMA, &mut |member, deser| {
         133  +
            match member.member_index() {
         134  +
                Some(0) => {
         135  +
                    if deser.is_null() {
         136  +
                        deser.read_null()?;
         137  +
                    } else {
         138  +
                        builder.ops_item_id = Some(deser.read_string(member)?);
         139  +
                    }
         140  +
                }
         141  +
                Some(1) => {
         142  +
                    if deser.is_null() {
         143  +
                        deser.read_null()?;
         144  +
                    } else {
         145  +
                        builder.association_type = Some(deser.read_string(member)?);
         146  +
                    }
         147  +
                }
         148  +
                Some(2) => {
         149  +
                    if deser.is_null() {
         150  +
                        deser.read_null()?;
         151  +
                    } else {
         152  +
                        builder.resource_type = Some(deser.read_string(member)?);
         153  +
                    }
         154  +
                }
         155  +
                Some(3) => {
         156  +
                    if deser.is_null() {
         157  +
                        deser.read_null()?;
         158  +
                    } else {
         159  +
                        builder.resource_uri = Some(deser.read_string(member)?);
         160  +
                    }
         161  +
                }
         162  +
                _ => {}
         163  +
            }
         164  +
            Ok(())
         165  +
        })?;
         166  +
        builder.ops_item_id = builder.ops_item_id.or(Some(String::new()));
         167  +
        builder.association_type = builder.association_type.or(Some(String::new()));
         168  +
        builder.resource_type = builder.resource_type.or(Some(String::new()));
         169  +
        builder.resource_uri = builder.resource_uri.or(Some(String::new()));
         170  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         171  +
    }
         172  +
}
         173  +
impl AssociateOpsItemRelatedItemInput {
         174  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         175  +
    pub fn deserialize_with_response(
         176  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         177  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         178  +
        _status: u16,
         179  +
        _body: &[u8],
         180  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         181  +
        Self::deserialize(deserializer)
         182  +
    }
         183  +
}
         184  +
impl AssociateOpsItemRelatedItemInput {
         185  +
    /// Creates a new builder-style object to manufacture [`AssociateOpsItemRelatedItemInput`](crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput).
         186  +
    pub fn builder() -> crate::operation::associate_ops_item_related_item::builders::AssociateOpsItemRelatedItemInputBuilder {
         187  +
        crate::operation::associate_ops_item_related_item::builders::AssociateOpsItemRelatedItemInputBuilder::default()
         188  +
    }
         189  +
}
         190  +
         191  +
/// A builder for [`AssociateOpsItemRelatedItemInput`](crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput).
         192  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         193  +
#[non_exhaustive]
         194  +
pub struct AssociateOpsItemRelatedItemInputBuilder {
         195  +
    pub(crate) ops_item_id: ::std::option::Option<::std::string::String>,
         196  +
    pub(crate) association_type: ::std::option::Option<::std::string::String>,
         197  +
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
         198  +
    pub(crate) resource_uri: ::std::option::Option<::std::string::String>,
         199  +
}
         200  +
impl AssociateOpsItemRelatedItemInputBuilder {
         201  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
         202  +
    /// This field is required.
         203  +
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         204  +
        self.ops_item_id = ::std::option::Option::Some(input.into());
         205  +
        self
         206  +
    }
         207  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
         208  +
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         209  +
        self.ops_item_id = input;
         210  +
        self
         211  +
    }
         212  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
         213  +
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
         214  +
        &self.ops_item_id
         215  +
    }
         216  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
         217  +
    /// This field is required.
         218  +
    pub fn association_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         219  +
        self.association_type = ::std::option::Option::Some(input.into());
         220  +
        self
         221  +
    }
         222  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
         223  +
    pub fn set_association_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         224  +
        self.association_type = input;
         225  +
        self
         226  +
    }
         227  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
         228  +
    pub fn get_association_type(&self) -> &::std::option::Option<::std::string::String> {
         229  +
        &self.association_type
         230  +
    }
         231  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
         232  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
         233  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
         234  +
    /// This field is required.
         235  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         236  +
        self.resource_type = ::std::option::Option::Some(input.into());
         237  +
        self
         238  +
    }
         239  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
         240  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
         241  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
         242  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         243  +
        self.resource_type = input;
         244  +
        self
         245  +
    }
         246  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
         247  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
         248  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
         249  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         250  +
        &self.resource_type
         251  +
    }
         252  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
         253  +
    /// This field is required.
         254  +
    pub fn resource_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         255  +
        self.resource_uri = ::std::option::Option::Some(input.into());
         256  +
        self
         257  +
    }
         258  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
         259  +
    pub fn set_resource_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         260  +
        self.resource_uri = input;
         261  +
        self
         262  +
    }
         263  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
         264  +
    pub fn get_resource_uri(&self) -> &::std::option::Option<::std::string::String> {
         265  +
        &self.resource_uri
         266  +
    }
         267  +
    /// Consumes the builder and constructs a [`AssociateOpsItemRelatedItemInput`](crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput).
         268  +
    pub fn build(
         269  +
        self,
         270  +
    ) -> ::std::result::Result<
         271  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput,
         272  +
        ::aws_smithy_types::error::operation::BuildError,
         273  +
    > {
         274  +
        ::std::result::Result::Ok(crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput {
         275  +
            ops_item_id: self.ops_item_id,
         276  +
            association_type: self.association_type,
         277  +
            resource_type: self.resource_type,
         278  +
            resource_uri: self.resource_uri,
         279  +
        })
         280  +
    }
         281  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/associate_ops_item_related_item/_associate_ops_item_related_item_output.rs

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

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

@@ -0,1 +0,173 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::associate_ops_item_related_item::_associate_ops_item_related_item_input::AssociateOpsItemRelatedItemInputBuilder;
           3  +
           4  +
pub use crate::operation::associate_ops_item_related_item::_associate_ops_item_related_item_output::AssociateOpsItemRelatedItemOutputBuilder;
           5  +
           6  +
impl crate::operation::associate_ops_item_related_item::builders::AssociateOpsItemRelatedItemInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.associate_ops_item_related_item();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `AssociateOpsItemRelatedItem`.
          24  +
///
          25  +
/// <p>Associates a related item to a Systems Manager OpsCenter OpsItem. For example, you can associate an Incident Manager incident or analysis with an OpsItem. Incident Manager and OpsCenter are tools in Amazon Web Services Systems Manager.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct AssociateOpsItemRelatedItemFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::associate_ops_item_related_item::builders::AssociateOpsItemRelatedItemInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput,
          35  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
          36  +
    > for AssociateOpsItemRelatedItemFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput,
          44  +
            crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl AssociateOpsItemRelatedItemFluentBuilder {
          51  +
    /// Creates a new `AssociateOpsItemRelatedItemFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the AssociateOpsItemRelatedItem as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::associate_ops_item_related_item::builders::AssociateOpsItemRelatedItemInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItem::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItem::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput,
          97  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
         112  +
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.ops_item_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
         117  +
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_ops_item_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The ID of the OpsItem to which you want to associate a resource as a related item.</p>
         122  +
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_ops_item_id()
         124  +
    }
         125  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
         126  +
    pub fn association_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         127  +
        self.inner = self.inner.association_type(input.into());
         128  +
        self
         129  +
    }
         130  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
         131  +
    pub fn set_association_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         132  +
        self.inner = self.inner.set_association_type(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>The type of association that you want to create between an OpsItem and a resource. OpsCenter supports <code>IsParentOf</code> and <code>RelatesTo</code> association types.</p>
         136  +
    pub fn get_association_type(&self) -> &::std::option::Option<::std::string::String> {
         137  +
        self.inner.get_association_type()
         138  +
    }
         139  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
         140  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
         141  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
         142  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         143  +
        self.inner = self.inner.resource_type(input.into());
         144  +
        self
         145  +
    }
         146  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
         147  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
         148  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
         149  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         150  +
        self.inner = self.inner.set_resource_type(input);
         151  +
        self
         152  +
    }
         153  +
    /// <p>The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:</p>
         154  +
    /// <p><code>AWS::SSMIncidents::IncidentRecord</code>: an Incident Manager incident.</p>
         155  +
    /// <p><code>AWS::SSM::Document</code>: a Systems Manager (SSM) document.</p>
         156  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         157  +
        self.inner.get_resource_type()
         158  +
    }
         159  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
         160  +
    pub fn resource_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         161  +
        self.inner = self.inner.resource_uri(input.into());
         162  +
        self
         163  +
    }
         164  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
         165  +
    pub fn set_resource_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         166  +
        self.inner = self.inner.set_resource_uri(input);
         167  +
        self
         168  +
    }
         169  +
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services resource that you want to associate with the OpsItem.</p>
         170  +
    pub fn get_resource_uri(&self) -> &::std::option::Option<::std::string::String> {
         171  +
        self.inner.get_resource_uri()
         172  +
    }
         173  +
}

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

@@ -0,1 +0,645 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `CancelCommand`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct CancelCommand;
           6  +
impl CancelCommand {
           7  +
    /// Creates a new `CancelCommand`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::cancel_command::CancelCommandInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::cancel_command::CancelCommandOutput::SCHEMA;
          15  +
    pub(crate) async fn orchestrate(
          16  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          17  +
        input: crate::operation::cancel_command::CancelCommandInput,
          18  +
    ) -> ::std::result::Result<
          19  +
        crate::operation::cancel_command::CancelCommandOutput,
          20  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          21  +
            crate::operation::cancel_command::CancelCommandError,
          22  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          23  +
        >,
          24  +
    > {
          25  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          26  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          27  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          28  +
        >| {
          29  +
            err.map_service_error(|err| {
          30  +
                err.downcast::<crate::operation::cancel_command::CancelCommandError>()
          31  +
                    .expect("correct error type")
          32  +
            })
          33  +
        };
          34  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          35  +
            .await
          36  +
            .map_err(map_err)?;
          37  +
        let output = context.finalize().map_err(map_err)?;
          38  +
        ::std::result::Result::Ok(
          39  +
            output
          40  +
                .downcast::<crate::operation::cancel_command::CancelCommandOutput>()
          41  +
                .expect("correct output type"),
          42  +
        )
          43  +
    }
          44  +
          45  +
    pub(crate) async fn orchestrate_with_stop_point(
          46  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          47  +
        input: crate::operation::cancel_command::CancelCommandInput,
          48  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          49  +
    ) -> ::std::result::Result<
          50  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          51  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          52  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          53  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          54  +
        >,
          55  +
    > {
          56  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          57  +
        use ::tracing::Instrument;
          58  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "CancelCommand", input, runtime_plugins, stop_point)
          59  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          60  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          61  +
            .instrument(::tracing::debug_span!(
          62  +
                "SSM.CancelCommand",
          63  +
                "rpc.service" = "SSM",
          64  +
                "rpc.method" = "CancelCommand",
          65  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          66  +
                "rpc.system" = "aws-api",
          67  +
            ))
          68  +
            .await
          69  +
    }
          70  +
          71  +
    pub(crate) fn operation_runtime_plugins(
          72  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          73  +
        client_config: &crate::config::Config,
          74  +
        config_override: ::std::option::Option<crate::config::Builder>,
          75  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          76  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          77  +
          78  +
        if let ::std::option::Option::Some(config_override) = config_override {
          79  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          80  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          81  +
            }
          82  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          83  +
                config_override,
          84  +
                client_config.config.clone(),
          85  +
                &client_config.runtime_components,
          86  +
            ));
          87  +
        }
          88  +
        runtime_plugins
          89  +
    }
          90  +
}
          91  +
/// Per-operation error registry. Contains an entry for every modeled
          92  +
/// error this operation can throw.
          93  +
///
          94  +
/// Used by the schema-serde error path as the operation-scoped lookup
          95  +
/// for registry-backed error reification: an error code that does not
          96  +
/// match one of the operation's modeled errors directly is resolved
          97  +
/// against this registry first, then widened to the service-wide error
          98  +
/// registry.
          99  +
pub(crate) mod error_registry {
         100  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         101  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         102  +
                            .insert_error_shape(
         103  +
                        crate::types::error::DuplicateInstanceId::SCHEMA,
         104  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         105  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DuplicateInstanceId::deserialize(d)?))
         106  +
                        },
         107  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         108  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DuplicateInstanceId::deserialize(d)?))
         109  +
                        },
         110  +
                    )
         111  +
.insert_error_shape(
         112  +
                        crate::types::error::InternalServerError::SCHEMA,
         113  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         114  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         115  +
                        },
         116  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         117  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         118  +
                        },
         119  +
                    )
         120  +
.insert_error_shape(
         121  +
                        crate::types::error::InvalidCommandId::SCHEMA,
         122  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         123  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidCommandId::deserialize(d)?))
         124  +
                        },
         125  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         126  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidCommandId::deserialize(d)?))
         127  +
                        },
         128  +
                    )
         129  +
.insert_error_shape(
         130  +
                        crate::types::error::InvalidInstanceId::SCHEMA,
         131  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         132  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInstanceId::deserialize(d)?))
         133  +
                        },
         134  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         135  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInstanceId::deserialize(d)?))
         136  +
                        },
         137  +
                    )
         138  +
                            .build()
         139  +
    });
         140  +
}
         141  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CancelCommand {
         142  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         143  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CancelCommand");
         144  +
         145  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         146  +
            CancelCommandRequestSerializer,
         147  +
        ));
         148  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         149  +
            CancelCommandResponseDeserializer,
         150  +
        ));
         151  +
         152  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         153  +
            crate::config::auth::Params::builder()
         154  +
                .operation_name("CancelCommand")
         155  +
                .build()
         156  +
                .expect("required fields set"),
         157  +
        ));
         158  +
         159  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("CancelCommand", "SSM"));
         160  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         161  +
        signing_options.double_uri_encode = true;
         162  +
        signing_options.content_sha256_header = false;
         163  +
        signing_options.normalize_uri_path = true;
         164  +
        signing_options.payload_override = None;
         165  +
         166  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         167  +
            signing_options,
         168  +
            ..::std::default::Default::default()
         169  +
        });
         170  +
         171  +
        ::std::option::Option::Some(cfg.freeze())
         172  +
    }
         173  +
         174  +
    fn runtime_components(
         175  +
        &self,
         176  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         177  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         178  +
        #[allow(unused_mut)]
         179  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CancelCommand")
         180  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         181  +
                CancelCommandTelemetryInputCaptureInterceptor,
         182  +
            ))
         183  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         184  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         185  +
            ))
         186  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         187  +
                CancelCommandEndpointParamsInterceptor,
         188  +
            ))
         189  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         190  +
                crate::operation::cancel_command::CancelCommandError,
         191  +
            >::new())
         192  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         193  +
                crate::operation::cancel_command::CancelCommandError,
         194  +
            >::new())
         195  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         196  +
                crate::operation::cancel_command::CancelCommandError,
         197  +
            >::new())
         198  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         199  +
                crate::operation::cancel_command::CancelCommandError,
         200  +
            >::new());
         201  +
         202  +
        ::std::borrow::Cow::Owned(rcb)
         203  +
    }
         204  +
}
         205  +
         206  +
#[derive(Debug)]
         207  +
struct CancelCommandTelemetryInputCaptureInterceptor;
         208  +
         209  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         210  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CancelCommandTelemetryInputCaptureInterceptor {
         211  +
    fn name(&self) -> &'static str {
         212  +
        "CancelCommandTelemetryInputCaptureInterceptor"
         213  +
    }
         214  +
         215  +
    fn read_before_execution(
         216  +
        &self,
         217  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         218  +
            '_,
         219  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         220  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         221  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         222  +
        >,
         223  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         224  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         225  +
        // Nothing to do unless the customer opted in by naming members to record.
         226  +
        let ::std::option::Option::Some(requested) = cfg
         227  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         228  +
            .filter(|r| !r.is_empty())
         229  +
        else {
         230  +
            return ::std::result::Result::Ok(());
         231  +
        };
         232  +
         233  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<CancelCommandInput>() else {
         234  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         235  +
            return ::std::result::Result::Ok(());
         236  +
        };
         237  +
         238  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         239  +
        if requested.should_capture("CommandId") {
         240  +
            if let ::std::option::Option::Some(value) = input.command_id.as_deref() {
         241  +
                captured.insert("CommandId", value);
         242  +
            }
         243  +
        }
         244  +
         245  +
        cfg.interceptor_state().store_put(captured);
         246  +
        ::std::result::Result::Ok(())
         247  +
    }
         248  +
}
         249  +
#[derive(Debug)]
         250  +
struct CancelCommandResponseDeserializer;
         251  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CancelCommandResponseDeserializer {
         252  +
    fn deserialize_nonstreaming_with_config(
         253  +
        &self,
         254  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         255  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         256  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         257  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         258  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         259  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         260  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         261  +
        // loads `body` before firing this hook.
         262  +
        let body = response.body().bytes().expect("body loaded");
         263  +
        let headers = response.headers();
         264  +
        #[allow(unused_mut)]
         265  +
        let mut force_error = false;
         266  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         267  +
        if !success && status != 200 || force_error {
         268  +
            let protocol = _cfg
         269  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         270  +
                .expect("a SharedClientProtocol is required");
         271  +
            #[allow(unused_mut)]
         272  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         273  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         274  +
            })?;
         275  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         276  +
            let generic = generic_builder.build();
         277  +
            let error_code = match generic.code() {
         278  +
                ::std::option::Option::Some(code) => code,
         279  +
                ::std::option::Option::None => {
         280  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::cancel_command::CancelCommandError::unhandled(generic)),
         282  +
                    ))
         283  +
                }
         284  +
            };
         285  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         286  +
            let err = match error_code {
         287  +
                "DuplicateInstanceId" => crate::operation::cancel_command::CancelCommandError::DuplicateInstanceId({
         288  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         289  +
                        crate::types::error::DuplicateInstanceId::deserialize_with_response(
         290  +
                            &mut *deser,
         291  +
                            response.headers(),
         292  +
                            response.status().into(),
         293  +
                            body,
         294  +
                        )
         295  +
                    }) {
         296  +
                        ::std::result::Result::Ok(val) => val,
         297  +
                        ::std::result::Result::Err(e) => {
         298  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         299  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         300  +
                            ))
         301  +
                        }
         302  +
                    };
         303  +
                    tmp.meta = generic;
         304  +
                    if tmp.message.is_none() {
         305  +
                        tmp.message = _error_message;
         306  +
                    }
         307  +
                    tmp
         308  +
                }),
         309  +
                "InternalServerError" => crate::operation::cancel_command::CancelCommandError::InternalServerError({
         310  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         311  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         312  +
                            &mut *deser,
         313  +
                            response.headers(),
         314  +
                            response.status().into(),
         315  +
                            body,
         316  +
                        )
         317  +
                    }) {
         318  +
                        ::std::result::Result::Ok(val) => val,
         319  +
                        ::std::result::Result::Err(e) => {
         320  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         321  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         322  +
                            ))
         323  +
                        }
         324  +
                    };
         325  +
                    tmp.meta = generic;
         326  +
                    if tmp.message.is_none() {
         327  +
                        tmp.message = _error_message;
         328  +
                    }
         329  +
                    tmp
         330  +
                }),
         331  +
                "InvalidCommandId" => crate::operation::cancel_command::CancelCommandError::InvalidCommandId({
         332  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         333  +
                        crate::types::error::InvalidCommandId::deserialize_with_response(
         334  +
                            &mut *deser,
         335  +
                            response.headers(),
         336  +
                            response.status().into(),
         337  +
                            body,
         338  +
                        )
         339  +
                    }) {
         340  +
                        ::std::result::Result::Ok(val) => val,
         341  +
                        ::std::result::Result::Err(e) => {
         342  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         343  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         344  +
                            ))
         345  +
                        }
         346  +
                    };
         347  +
                    tmp.meta = generic;
         348  +
                    if tmp.message.is_none() {
         349  +
                        tmp.message = _error_message;
         350  +
                    }
         351  +
                    tmp
         352  +
                }),
         353  +
                "InvalidInstanceId" => crate::operation::cancel_command::CancelCommandError::InvalidInstanceId({
         354  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         355  +
                        crate::types::error::InvalidInstanceId::deserialize_with_response(
         356  +
                            &mut *deser,
         357  +
                            response.headers(),
         358  +
                            response.status().into(),
         359  +
                            body,
         360  +
                        )
         361  +
                    }) {
         362  +
                        ::std::result::Result::Ok(val) => val,
         363  +
                        ::std::result::Result::Err(e) => {
         364  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         365  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         366  +
                            ))
         367  +
                        }
         368  +
                    };
         369  +
                    tmp.meta = generic;
         370  +
                    if tmp.message.is_none() {
         371  +
                        tmp.message = _error_message;
         372  +
                    }
         373  +
                    tmp
         374  +
                }),
         375  +
                _ => {
         376  +
                    // Registry-backed, operation-scoped reification of an error whose
         377  +
                    // code this operation does not model directly: the operation's own
         378  +
                    // error registry is consulted first, then the lookup widens to the
         379  +
                    // service-wide error registry. On a hit, the reified error is attached
         380  +
                    // as the source of the returned unhandled error while its metadata
         381  +
                    // (code, message, request id) is preserved; on a miss the generic
         382  +
                    // error is returned unchanged.
         383  +
                    match protocol
         384  +
                        .deserialize_error_response(response, _cfg)
         385  +
                        .ok()
         386  +
                        .and_then(|mut deser| {
         387  +
                            ::aws_smithy_schema::registry::reify_error(
         388  +
                                crate::operation::cancel_command::error_registry::REGISTRY
         389  +
                                    .or(&crate::error_type_registry::REGISTRY),
         390  +
                                error_code,
         391  +
                                &mut *deser,
         392  +
                            )
         393  +
                        }) {
         394  +
                        ::std::option::Option::Some(source) => <crate::operation::cancel_command::CancelCommandError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         395  +
                        ::std::option::Option::None => crate::operation::cancel_command::CancelCommandError::generic(generic),
         396  +
                    }
         397  +
                }
         398  +
            };
         399  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         400  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         401  +
            ))
         402  +
        } else {
         403  +
            let protocol = _cfg
         404  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         405  +
                .expect("a SharedClientProtocol is required");
         406  +
            let mut deser = protocol.deserialize_response(response, CancelCommand::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         407  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         408  +
            })?;
         409  +
            // body and headers are already in scope from the top of the function;
         410  +
            // alias `headers` as `_response_headers` so MutateOutput
         411  +
            // customizations have a stable name to read from.
         412  +
            let _response_headers = headers;
         413  +
            #[allow(unused_mut)]
         414  +
            let mut output = crate::operation::cancel_command::CancelCommandOutput::deserialize_with_response(
         415  +
                &mut *deser,
         416  +
                _response_headers,
         417  +
                response.status().into(),
         418  +
                body,
         419  +
            )
         420  +
            .map_err(|e| {
         421  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         422  +
            })?;
         423  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         424  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         425  +
        }
         426  +
    }
         427  +
}
         428  +
#[derive(Debug)]
         429  +
struct CancelCommandRequestSerializer;
         430  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CancelCommandRequestSerializer {
         431  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         432  +
    fn serialize_input(
         433  +
        &self,
         434  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         435  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         436  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         437  +
        let input = input
         438  +
            .downcast::<crate::operation::cancel_command::CancelCommandInput>()
         439  +
            .expect("correct type");
         440  +
         441  +
        let protocol = _cfg
         442  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         443  +
            .expect("a SharedClientProtocol is required");
         444  +
        let mut request = protocol
         445  +
            .serialize_request(&input, CancelCommand::INPUT_SCHEMA, "/", _cfg)
         446  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         447  +
         448  +
        return ::std::result::Result::Ok(request);
         449  +
    }
         450  +
}
         451  +
#[derive(Debug)]
         452  +
struct CancelCommandEndpointParamsInterceptor;
         453  +
         454  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         455  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CancelCommandEndpointParamsInterceptor {
         456  +
    fn name(&self) -> &'static str {
         457  +
        "CancelCommandEndpointParamsInterceptor"
         458  +
    }
         459  +
         460  +
    fn read_before_execution(
         461  +
        &self,
         462  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         463  +
            '_,
         464  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         465  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         466  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         467  +
        >,
         468  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         469  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         470  +
        let _input = context
         471  +
            .input()
         472  +
            .downcast_ref::<CancelCommandInput>()
         473  +
            .ok_or("failed to downcast to CancelCommandInput")?;
         474  +
         475  +
        let params = crate::config::endpoint::Params::builder()
         476  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         477  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         478  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         479  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         480  +
            .build()
         481  +
            .map_err(|err| {
         482  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         483  +
            })?;
         484  +
        cfg.interceptor_state()
         485  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         486  +
        ::std::result::Result::Ok(())
         487  +
    }
         488  +
}
         489  +
         490  +
// The get_* functions below are generated from JMESPath expressions in the
         491  +
// operationContextParams trait. They target the operation's input shape.
         492  +
         493  +
/// Error type for the `CancelCommandError` operation.
         494  +
#[non_exhaustive]
         495  +
#[derive(::std::fmt::Debug)]
         496  +
pub enum CancelCommandError {
         497  +
    /// <p>You can't specify a managed node ID in more than one association.</p>
         498  +
    DuplicateInstanceId(crate::types::error::DuplicateInstanceId),
         499  +
    /// <p>An error occurred on the server side.</p>
         500  +
    InternalServerError(crate::types::error::InternalServerError),
         501  +
    /// <p>The specified command ID isn't valid. Verify the ID and try again.</p>
         502  +
    InvalidCommandId(crate::types::error::InvalidCommandId),
         503  +
    /// <p>The following problems can cause this exception:</p>
         504  +
    /// <ul>
         505  +
    /// <li>
         506  +
    /// <p>You don't have permission to access the managed node.</p></li>
         507  +
    /// <li>
         508  +
    /// <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.</p></li>
         509  +
    /// <li>
         510  +
    /// <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p></li>
         511  +
    /// <li>
         512  +
    /// <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>, <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are: <code>Shutting-down</code> and <code>Terminated</code>.</p></li>
         513  +
    /// </ul>
         514  +
    InvalidInstanceId(crate::types::error::InvalidInstanceId),
         515  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         516  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         517  +
    variable wildcard pattern and check `.code()`:
         518  +
     \
         519  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         520  +
     \
         521  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CancelCommandError) for what information is available for the error.")]
         522  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         523  +
}
         524  +
impl CancelCommandError {
         525  +
    /// Creates the `CancelCommandError::Unhandled` variant from any error type.
         526  +
    pub fn unhandled(
         527  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         528  +
    ) -> Self {
         529  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         530  +
            source: err.into(),
         531  +
            meta: ::std::default::Default::default(),
         532  +
        })
         533  +
    }
         534  +
         535  +
    /// Creates the `CancelCommandError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         536  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         537  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         538  +
            source: err.clone().into(),
         539  +
            meta: err,
         540  +
        })
         541  +
    }
         542  +
    ///
         543  +
    /// Returns error metadata, which includes the error code, message,
         544  +
    /// request ID, and potentially additional information.
         545  +
    ///
         546  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         547  +
        match self {
         548  +
            Self::DuplicateInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         549  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         550  +
            Self::InvalidCommandId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         551  +
            Self::InvalidInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         552  +
            Self::Unhandled(e) => &e.meta,
         553  +
        }
         554  +
    }
         555  +
    /// Returns `true` if the error kind is `CancelCommandError::DuplicateInstanceId`.
         556  +
    pub fn is_duplicate_instance_id(&self) -> bool {
         557  +
        matches!(self, Self::DuplicateInstanceId(_))
         558  +
    }
         559  +
    /// Returns `true` if the error kind is `CancelCommandError::InternalServerError`.
         560  +
    pub fn is_internal_server_error(&self) -> bool {
         561  +
        matches!(self, Self::InternalServerError(_))
         562  +
    }
         563  +
    /// Returns `true` if the error kind is `CancelCommandError::InvalidCommandId`.
         564  +
    pub fn is_invalid_command_id(&self) -> bool {
         565  +
        matches!(self, Self::InvalidCommandId(_))
         566  +
    }
         567  +
    /// Returns `true` if the error kind is `CancelCommandError::InvalidInstanceId`.
         568  +
    pub fn is_invalid_instance_id(&self) -> bool {
         569  +
        matches!(self, Self::InvalidInstanceId(_))
         570  +
    }
         571  +
}
         572  +
impl ::std::error::Error for CancelCommandError {
         573  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         574  +
        match self {
         575  +
            Self::DuplicateInstanceId(_inner) => ::std::option::Option::Some(_inner),
         576  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         577  +
            Self::InvalidCommandId(_inner) => ::std::option::Option::Some(_inner),
         578  +
            Self::InvalidInstanceId(_inner) => ::std::option::Option::Some(_inner),
         579  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         580  +
        }
         581  +
    }
         582  +
}
         583  +
impl ::std::fmt::Display for CancelCommandError {
         584  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         585  +
        match self {
         586  +
            Self::DuplicateInstanceId(_inner) => _inner.fmt(f),
         587  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         588  +
            Self::InvalidCommandId(_inner) => _inner.fmt(f),
         589  +
            Self::InvalidInstanceId(_inner) => _inner.fmt(f),
         590  +
            Self::Unhandled(_inner) => {
         591  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         592  +
                    write!(f, "unhandled error ({code})")
         593  +
                } else {
         594  +
                    f.write_str("unhandled error")
         595  +
                }
         596  +
            }
         597  +
        }
         598  +
    }
         599  +
}
         600  +
impl ::aws_smithy_types::retry::ProvideErrorKind for CancelCommandError {
         601  +
    fn code(&self) -> ::std::option::Option<&str> {
         602  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         603  +
    }
         604  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         605  +
        ::std::option::Option::None
         606  +
    }
         607  +
}
         608  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CancelCommandError {
         609  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         610  +
        match self {
         611  +
            Self::DuplicateInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         612  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         613  +
            Self::InvalidCommandId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         614  +
            Self::InvalidInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         615  +
            Self::Unhandled(_inner) => &_inner.meta,
         616  +
        }
         617  +
    }
         618  +
}
         619  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CancelCommandError {
         620  +
    fn create_unhandled_error(
         621  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         622  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         623  +
    ) -> Self {
         624  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         625  +
            source,
         626  +
            meta: meta.unwrap_or_default(),
         627  +
        })
         628  +
    }
         629  +
}
         630  +
impl ::aws_types::request_id::RequestId for crate::operation::cancel_command::CancelCommandError {
         631  +
    fn request_id(&self) -> Option<&str> {
         632  +
        self.meta().request_id()
         633  +
    }
         634  +
}
         635  +
         636  +
pub use crate::operation::cancel_command::_cancel_command_input::CancelCommandInput;
         637  +
         638  +
pub use crate::operation::cancel_command::_cancel_command_output::CancelCommandOutput;
         639  +
         640  +
mod _cancel_command_input;
         641  +
         642  +
mod _cancel_command_output;
         643  +
         644  +
/// Builders
         645  +
pub mod builders;