AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b

Files changed:

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

@@ -0,1 +0,262 @@
           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 DeleteDocumentInput {
           6  +
    /// <p>The name of the document.</p>
           7  +
    pub name: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
           9  +
    pub document_version: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
          11  +
    pub version_name: ::std::option::Option<::std::string::String>,
          12  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
          13  +
    pub force: ::std::option::Option<bool>,
          14  +
}
          15  +
impl DeleteDocumentInput {
          16  +
    /// <p>The name of the document.</p>
          17  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          18  +
        self.name.as_deref()
          19  +
    }
          20  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
          21  +
    pub fn document_version(&self) -> ::std::option::Option<&str> {
          22  +
        self.document_version.as_deref()
          23  +
    }
          24  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
          25  +
    pub fn version_name(&self) -> ::std::option::Option<&str> {
          26  +
        self.version_name.as_deref()
          27  +
    }
          28  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
          29  +
    pub fn force(&self) -> ::std::option::Option<bool> {
          30  +
        self.force
          31  +
    }
          32  +
}
          33  +
static DELETEDOCUMENTINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#DeleteDocumentInput$Name",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "DeleteDocumentInput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::String,
          40  +
    "Name",
          41  +
    0,
          42  +
);
          43  +
static DELETEDOCUMENTINPUT_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts(
          45  +
        "com.amazonaws.ssm.synthetic#DeleteDocumentInput$DocumentVersion",
          46  +
        "com.amazonaws.ssm.synthetic",
          47  +
        "DeleteDocumentInput",
          48  +
    ),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "DocumentVersion",
          51  +
    1,
          52  +
);
          53  +
static DELETEDOCUMENTINPUT_MEMBER_VERSION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          54  +
    ::aws_smithy_schema::ShapeId::from_parts(
          55  +
        "com.amazonaws.ssm.synthetic#DeleteDocumentInput$VersionName",
          56  +
        "com.amazonaws.ssm.synthetic",
          57  +
        "DeleteDocumentInput",
          58  +
    ),
          59  +
    ::aws_smithy_schema::ShapeType::String,
          60  +
    "VersionName",
          61  +
    2,
          62  +
);
          63  +
static DELETEDOCUMENTINPUT_MEMBER_FORCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_parts(
          65  +
        "com.amazonaws.ssm.synthetic#DeleteDocumentInput$Force",
          66  +
        "com.amazonaws.ssm.synthetic",
          67  +
        "DeleteDocumentInput",
          68  +
    ),
          69  +
    ::aws_smithy_schema::ShapeType::Boolean,
          70  +
    "Force",
          71  +
    3,
          72  +
);
          73  +
static DELETEDOCUMENTINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          74  +
    ::aws_smithy_schema::ShapeId::from_parts(
          75  +
        "com.amazonaws.ssm.synthetic#DeleteDocumentInput",
          76  +
        "com.amazonaws.ssm.synthetic",
          77  +
        "DeleteDocumentInput",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::Structure,
          80  +
    &[
          81  +
        &DELETEDOCUMENTINPUT_MEMBER_NAME,
          82  +
        &DELETEDOCUMENTINPUT_MEMBER_DOCUMENT_VERSION,
          83  +
        &DELETEDOCUMENTINPUT_MEMBER_VERSION_NAME,
          84  +
        &DELETEDOCUMENTINPUT_MEMBER_FORCE,
          85  +
    ],
          86  +
)
          87  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          88  +
.with_original_name("DeleteDocumentRequest");
          89  +
impl DeleteDocumentInput {
          90  +
    /// The schema for this shape.
          91  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DELETEDOCUMENTINPUT_SCHEMA;
          92  +
}
          93  +
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteDocumentInput {
          94  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          95  +
    fn serialize_members(
          96  +
        &self,
          97  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          98  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          99  +
        if let Some(ref val) = self.name {
         100  +
            ser.write_string(&DELETEDOCUMENTINPUT_MEMBER_NAME, val)?;
         101  +
        }
         102  +
        if let Some(ref val) = self.document_version {
         103  +
            ser.write_string(&DELETEDOCUMENTINPUT_MEMBER_DOCUMENT_VERSION, val)?;
         104  +
        }
         105  +
        if let Some(ref val) = self.version_name {
         106  +
            ser.write_string(&DELETEDOCUMENTINPUT_MEMBER_VERSION_NAME, val)?;
         107  +
        }
         108  +
        if let Some(ref val) = self.force {
         109  +
            ser.write_boolean(&DELETEDOCUMENTINPUT_MEMBER_FORCE, *val)?;
         110  +
        }
         111  +
        Ok(())
         112  +
    }
         113  +
}
         114  +
impl DeleteDocumentInput {
         115  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         116  +
    pub fn deserialize(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        #[allow(unused_variables, unused_mut)]
         120  +
        let mut builder = Self::builder();
         121  +
        #[allow(
         122  +
            unused_variables,
         123  +
            unreachable_code,
         124  +
            clippy::single_match,
         125  +
            clippy::match_single_binding,
         126  +
            clippy::diverging_sub_expression
         127  +
        )]
         128  +
        deserializer.read_struct(&DELETEDOCUMENTINPUT_SCHEMA, &mut |member, deser| {
         129  +
            match member.member_index() {
         130  +
                Some(0) => {
         131  +
                    if deser.is_null() {
         132  +
                        deser.read_null()?;
         133  +
                    } else {
         134  +
                        builder.name = Some(deser.read_string(member)?);
         135  +
                    }
         136  +
                }
         137  +
                Some(1) => {
         138  +
                    if deser.is_null() {
         139  +
                        deser.read_null()?;
         140  +
                    } else {
         141  +
                        builder.document_version = Some(deser.read_string(member)?);
         142  +
                    }
         143  +
                }
         144  +
                Some(2) => {
         145  +
                    if deser.is_null() {
         146  +
                        deser.read_null()?;
         147  +
                    } else {
         148  +
                        builder.version_name = Some(deser.read_string(member)?);
         149  +
                    }
         150  +
                }
         151  +
                Some(3) => {
         152  +
                    if deser.is_null() {
         153  +
                        deser.read_null()?;
         154  +
                    } else {
         155  +
                        builder.force = Some(deser.read_boolean(member)?);
         156  +
                    }
         157  +
                }
         158  +
                _ => {}
         159  +
            }
         160  +
            Ok(())
         161  +
        })?;
         162  +
        builder.name = builder.name.or(Some(String::new()));
         163  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         164  +
    }
         165  +
}
         166  +
impl DeleteDocumentInput {
         167  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         168  +
    pub fn deserialize_with_response(
         169  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         170  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         171  +
        _status: u16,
         172  +
        _body: &[u8],
         173  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         174  +
        Self::deserialize(deserializer)
         175  +
    }
         176  +
}
         177  +
impl DeleteDocumentInput {
         178  +
    /// Creates a new builder-style object to manufacture [`DeleteDocumentInput`](crate::operation::delete_document::DeleteDocumentInput).
         179  +
    pub fn builder() -> crate::operation::delete_document::builders::DeleteDocumentInputBuilder {
         180  +
        crate::operation::delete_document::builders::DeleteDocumentInputBuilder::default()
         181  +
    }
         182  +
}
         183  +
         184  +
/// A builder for [`DeleteDocumentInput`](crate::operation::delete_document::DeleteDocumentInput).
         185  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         186  +
#[non_exhaustive]
         187  +
pub struct DeleteDocumentInputBuilder {
         188  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         189  +
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
         190  +
    pub(crate) version_name: ::std::option::Option<::std::string::String>,
         191  +
    pub(crate) force: ::std::option::Option<bool>,
         192  +
}
         193  +
impl DeleteDocumentInputBuilder {
         194  +
    /// <p>The name of the document.</p>
         195  +
    /// This field is required.
         196  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         197  +
        self.name = ::std::option::Option::Some(input.into());
         198  +
        self
         199  +
    }
         200  +
    /// <p>The name of the document.</p>
         201  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         202  +
        self.name = input;
         203  +
        self
         204  +
    }
         205  +
    /// <p>The name of the document.</p>
         206  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         207  +
        &self.name
         208  +
    }
         209  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         210  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         211  +
        self.document_version = ::std::option::Option::Some(input.into());
         212  +
        self
         213  +
    }
         214  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         215  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         216  +
        self.document_version = input;
         217  +
        self
         218  +
    }
         219  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         220  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         221  +
        &self.document_version
         222  +
    }
         223  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         224  +
    pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         225  +
        self.version_name = ::std::option::Option::Some(input.into());
         226  +
        self
         227  +
    }
         228  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         229  +
    pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         230  +
        self.version_name = input;
         231  +
        self
         232  +
    }
         233  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         234  +
    pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
         235  +
        &self.version_name
         236  +
    }
         237  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
         238  +
    pub fn force(mut self, input: bool) -> Self {
         239  +
        self.force = ::std::option::Option::Some(input);
         240  +
        self
         241  +
    }
         242  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
         243  +
    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
         244  +
        self.force = input;
         245  +
        self
         246  +
    }
         247  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
         248  +
    pub fn get_force(&self) -> &::std::option::Option<bool> {
         249  +
        &self.force
         250  +
    }
         251  +
    /// Consumes the builder and constructs a [`DeleteDocumentInput`](crate::operation::delete_document::DeleteDocumentInput).
         252  +
    pub fn build(
         253  +
        self,
         254  +
    ) -> ::std::result::Result<crate::operation::delete_document::DeleteDocumentInput, ::aws_smithy_types::error::operation::BuildError> {
         255  +
        ::std::result::Result::Ok(crate::operation::delete_document::DeleteDocumentInput {
         256  +
            name: self.name,
         257  +
            document_version: self.document_version,
         258  +
            version_name: self.version_name,
         259  +
            force: self.force,
         260  +
        })
         261  +
    }
         262  +
}

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

@@ -0,1 +0,122 @@
           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 DeleteDocumentOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static DELETEDOCUMENTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
           9  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          10  +
    ::aws_smithy_schema::ShapeType::String,
          11  +
    "request_id",
          12  +
    0,
          13  +
)
          14  +
.with_http_header("x-amzn-requestid");
          15  +
static DELETEDOCUMENTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#DeleteDocumentOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "DeleteDocumentOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&DELETEDOCUMENTOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("DeleteDocumentResult");
          25  +
impl DeleteDocumentOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DELETEDOCUMENTOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteDocumentOutput {
          30  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          31  +
    fn serialize_members(
          32  +
        &self,
          33  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          34  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          35  +
        Ok(())
          36  +
    }
          37  +
}
          38  +
impl DeleteDocumentOutput {
          39  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          42  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          43  +
        #[allow(unused_variables, unused_mut)]
          44  +
        let mut builder = Self::builder();
          45  +
        #[allow(
          46  +
            unused_variables,
          47  +
            unreachable_code,
          48  +
            clippy::single_match,
          49  +
            clippy::match_single_binding,
          50  +
            clippy::diverging_sub_expression
          51  +
        )]
          52  +
        deserializer.read_struct(&DELETEDOCUMENTOUTPUT_SCHEMA, &mut |member, deser| {
          53  +
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
          57  +
                _ => {}
          58  +
            }
          59  +
            Ok(())
          60  +
        })?;
          61  +
        Ok(builder.build())
          62  +
    }
          63  +
}
          64  +
impl DeleteDocumentOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
          82  +
impl ::aws_types::request_id::RequestId for DeleteDocumentOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl DeleteDocumentOutput {
          88  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
          89  +
        self._request_id = request_id;
          90  +
        self
          91  +
    }
          92  +
}
          93  +
impl DeleteDocumentOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`DeleteDocumentOutput`](crate::operation::delete_document::DeleteDocumentOutput).
          95  +
    pub fn builder() -> crate::operation::delete_document::builders::DeleteDocumentOutputBuilder {
          96  +
        crate::operation::delete_document::builders::DeleteDocumentOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`DeleteDocumentOutput`](crate::operation::delete_document::DeleteDocumentOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct DeleteDocumentOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl DeleteDocumentOutputBuilder {
         107  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         108  +
        self._request_id = Some(request_id.into());
         109  +
        self
         110  +
    }
         111  +
         112  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         113  +
        self._request_id = request_id;
         114  +
        self
         115  +
    }
         116  +
    /// Consumes the builder and constructs a [`DeleteDocumentOutput`](crate::operation::delete_document::DeleteDocumentOutput).
         117  +
    pub fn build(self) -> crate::operation::delete_document::DeleteDocumentOutput {
         118  +
        crate::operation::delete_document::DeleteDocumentOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,168 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::delete_document::_delete_document_input::DeleteDocumentInputBuilder;
           3  +
           4  +
pub use crate::operation::delete_document::_delete_document_output::DeleteDocumentOutputBuilder;
           5  +
           6  +
impl crate::operation::delete_document::builders::DeleteDocumentInputBuilder {
           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::delete_document::DeleteDocumentOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::delete_document::DeleteDocumentError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.delete_document();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DeleteDocument`.
          24  +
///
          25  +
/// <p>Deletes the Amazon Web Services Systems Manager document (SSM document) and all managed node associations to the document.</p>
          26  +
/// <p>Before you delete the document, we recommend that you use <code>DeleteAssociation</code> to disassociate all managed nodes that are associated with the document.</p>
          27  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          28  +
pub struct DeleteDocumentFluentBuilder {
          29  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          30  +
    inner: crate::operation::delete_document::builders::DeleteDocumentInputBuilder,
          31  +
    config_override: ::std::option::Option<crate::config::Builder>,
          32  +
}
          33  +
impl
          34  +
    crate::client::customize::internal::CustomizableSend<
          35  +
        crate::operation::delete_document::DeleteDocumentOutput,
          36  +
        crate::operation::delete_document::DeleteDocumentError,
          37  +
    > for DeleteDocumentFluentBuilder
          38  +
{
          39  +
    fn send(
          40  +
        self,
          41  +
        config_override: crate::config::Builder,
          42  +
    ) -> crate::client::customize::internal::BoxFuture<
          43  +
        crate::client::customize::internal::SendResult<
          44  +
            crate::operation::delete_document::DeleteDocumentOutput,
          45  +
            crate::operation::delete_document::DeleteDocumentError,
          46  +
        >,
          47  +
    > {
          48  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          49  +
    }
          50  +
}
          51  +
impl DeleteDocumentFluentBuilder {
          52  +
    /// Creates a new `DeleteDocumentFluentBuilder`.
          53  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          54  +
        Self {
          55  +
            handle,
          56  +
            inner: ::std::default::Default::default(),
          57  +
            config_override: ::std::option::Option::None,
          58  +
        }
          59  +
    }
          60  +
    /// Access the DeleteDocument as a reference.
          61  +
    pub fn as_input(&self) -> &crate::operation::delete_document::builders::DeleteDocumentInputBuilder {
          62  +
        &self.inner
          63  +
    }
          64  +
    /// Sends the request and returns the response.
          65  +
    ///
          66  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          67  +
    /// can be matched against.
          68  +
    ///
          69  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          70  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          71  +
    /// set when configuring the client.
          72  +
    pub async fn send(
          73  +
        self,
          74  +
    ) -> ::std::result::Result<
          75  +
        crate::operation::delete_document::DeleteDocumentOutput,
          76  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          77  +
            crate::operation::delete_document::DeleteDocumentError,
          78  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          79  +
        >,
          80  +
    > {
          81  +
        let input = self
          82  +
            .inner
          83  +
            .build()
          84  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          85  +
        let runtime_plugins = crate::operation::delete_document::DeleteDocument::operation_runtime_plugins(
          86  +
            self.handle.runtime_plugins.clone(),
          87  +
            &self.handle.conf,
          88  +
            self.config_override,
          89  +
        );
          90  +
        crate::operation::delete_document::DeleteDocument::orchestrate(&runtime_plugins, input).await
          91  +
    }
          92  +
          93  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          94  +
    pub fn customize(
          95  +
        self,
          96  +
    ) -> crate::client::customize::CustomizableOperation<
          97  +
        crate::operation::delete_document::DeleteDocumentOutput,
          98  +
        crate::operation::delete_document::DeleteDocumentError,
          99  +
        Self,
         100  +
    > {
         101  +
        crate::client::customize::CustomizableOperation::new(self)
         102  +
    }
         103  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         104  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         105  +
        self
         106  +
    }
         107  +
         108  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         109  +
        self.config_override = config_override;
         110  +
        self
         111  +
    }
         112  +
    /// <p>The name of the document.</p>
         113  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         114  +
        self.inner = self.inner.name(input.into());
         115  +
        self
         116  +
    }
         117  +
    /// <p>The name of the document.</p>
         118  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.set_name(input);
         120  +
        self
         121  +
    }
         122  +
    /// <p>The name of the document.</p>
         123  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         124  +
        self.inner.get_name()
         125  +
    }
         126  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         127  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         128  +
        self.inner = self.inner.document_version(input.into());
         129  +
        self
         130  +
    }
         131  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         132  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        self.inner = self.inner.set_document_version(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>The version of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         137  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         138  +
        self.inner.get_document_version()
         139  +
    }
         140  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         141  +
    pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         142  +
        self.inner = self.inner.version_name(input.into());
         143  +
        self
         144  +
    }
         145  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         146  +
    pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         147  +
        self.inner = self.inner.set_version_name(input);
         148  +
        self
         149  +
    }
         150  +
    /// <p>The version name of the document that you want to delete. If not provided, all versions of the document are deleted.</p>
         151  +
    pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
         152  +
        self.inner.get_version_name()
         153  +
    }
         154  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
         155  +
    pub fn force(mut self, input: bool) -> Self {
         156  +
        self.inner = self.inner.force(input);
         157  +
        self
         158  +
    }
         159  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
         160  +
    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
         161  +
        self.inner = self.inner.set_force(input);
         162  +
        self
         163  +
    }
         164  +
    /// <p>Some SSM document types require that you specify a <code>Force</code> flag before you can delete the document. For example, you must specify a <code>Force</code> flag to delete a document of type <code>ApplicationConfigurationSchema</code>. You can restrict access to the <code>Force</code> flag in an Identity and Access Management (IAM) policy.</p>
         165  +
    pub fn get_force(&self) -> &::std::option::Option<bool> {
         166  +
        self.inner.get_force()
         167  +
    }
         168  +
}

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

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