aws-sdk-ssm 1.131.0

AWS SDK for Amazon Simple Systems Manager (SSM)
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteInventoryOutput {
    /// <p>Every <code>DeleteInventory</code> operation is assigned a unique ID. This option returns a unique ID. You can use this ID to query the status of a delete operation. This option is useful for ensuring that a delete operation has completed before you begin other operations.</p>
    pub deletion_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the inventory data type specified in the request.</p>
    pub type_name: ::std::option::Option<::std::string::String>,
    /// <p>A summary of the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary">Deleting custom inventory</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub deletion_summary: ::std::option::Option<crate::types::InventoryDeletionSummary>,
    _request_id: Option<String>,
}
impl DeleteInventoryOutput {
    /// <p>Every <code>DeleteInventory</code> operation is assigned a unique ID. This option returns a unique ID. You can use this ID to query the status of a delete operation. This option is useful for ensuring that a delete operation has completed before you begin other operations.</p>
    pub fn deletion_id(&self) -> ::std::option::Option<&str> {
        self.deletion_id.as_deref()
    }
    /// <p>The name of the inventory data type specified in the request.</p>
    pub fn type_name(&self) -> ::std::option::Option<&str> {
        self.type_name.as_deref()
    }
    /// <p>A summary of the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary">Deleting custom inventory</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn deletion_summary(&self) -> ::std::option::Option<&crate::types::InventoryDeletionSummary> {
        self.deletion_summary.as_ref()
    }
}
static DELETEINVENTORYOUTPUT_MEMBER_DELETION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#DeleteInventoryOutput$DeletionId",
        "com.amazonaws.ssm.synthetic",
        "DeleteInventoryOutput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "DeletionId",
    0,
);
static DELETEINVENTORYOUTPUT_MEMBER_TYPE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#DeleteInventoryOutput$TypeName",
        "com.amazonaws.ssm.synthetic",
        "DeleteInventoryOutput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "TypeName",
    1,
);
static DELETEINVENTORYOUTPUT_MEMBER_DELETION_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#DeleteInventoryOutput$DeletionSummary",
        "com.amazonaws.ssm.synthetic",
        "DeleteInventoryOutput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    "DeletionSummary",
    2,
);
static DELETEINVENTORYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#DeleteInventoryOutput",
        "com.amazonaws.ssm.synthetic",
        "DeleteInventoryOutput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    &[
        &DELETEINVENTORYOUTPUT_MEMBER_DELETION_ID,
        &DELETEINVENTORYOUTPUT_MEMBER_TYPE_NAME,
        &DELETEINVENTORYOUTPUT_MEMBER_DELETION_SUMMARY,
    ],
)
.with_original_name("DeleteInventoryResult");
impl DeleteInventoryOutput {
    /// The schema for this shape.
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DELETEINVENTORYOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for DeleteInventoryOutput {
    fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
        Self::SCHEMA
    }

    #[allow(unused_variables, clippy::diverging_sub_expression)]
    fn serialize_members(
        &self,
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
        if let Some(ref val) = self.deletion_id {
            ser.write_string(&DELETEINVENTORYOUTPUT_MEMBER_DELETION_ID, val)?;
        }
        if let Some(ref val) = self.type_name {
            ser.write_string(&DELETEINVENTORYOUTPUT_MEMBER_TYPE_NAME, val)?;
        }
        if let Some(ref val) = self.deletion_summary {
            ser.write_struct(&DELETEINVENTORYOUTPUT_MEMBER_DELETION_SUMMARY, val)?;
        }
        Ok(())
    }
}
impl crate::operation::delete_inventory::builders::DeleteInventoryOutputBuilder {
    #[allow(
        unused_variables,
        unreachable_code,
        clippy::single_match,
        clippy::match_single_binding,
        clippy::diverging_sub_expression
    )]
    pub(crate) fn deserialize_members(
        &mut self,
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
        deserializer.read_struct(&DELETEINVENTORYOUTPUT_SCHEMA, &mut |member, deser| {
            match member.member_index() {
                Some(0) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.deletion_id = Some(deser.read_string(member)?);
                    }
                }
                Some(1) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.type_name = Some(deser.read_string(member)?);
                    }
                }
                Some(2) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.deletion_summary = Some(crate::types::InventoryDeletionSummary::deserialize(deser)?);
                    }
                }
                _ => {}
            }
            Ok(())
        })
    }
}

impl DeleteInventoryOutput {
    /// Deserializes this structure from a [`ShapeDeserializer`].
    pub fn deserialize(
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
        let mut builder = Self::builder();
        builder.deserialize_members(deserializer)?;
        Ok(builder.build())
    }
}
impl ::aws_types::request_id::RequestId for DeleteInventoryOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DeleteInventoryOutput {
    /// Creates a new builder-style object to manufacture [`DeleteInventoryOutput`](crate::operation::delete_inventory::DeleteInventoryOutput).
    pub fn builder() -> crate::operation::delete_inventory::builders::DeleteInventoryOutputBuilder {
        crate::operation::delete_inventory::builders::DeleteInventoryOutputBuilder::default()
    }
}

/// A builder for [`DeleteInventoryOutput`](crate::operation::delete_inventory::DeleteInventoryOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteInventoryOutputBuilder {
    pub(crate) deletion_id: ::std::option::Option<::std::string::String>,
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
    pub(crate) deletion_summary: ::std::option::Option<crate::types::InventoryDeletionSummary>,
    _request_id: Option<String>,
}
impl DeleteInventoryOutputBuilder {
    /// <p>Every <code>DeleteInventory</code> operation is assigned a unique ID. This option returns a unique ID. You can use this ID to query the status of a delete operation. This option is useful for ensuring that a delete operation has completed before you begin other operations.</p>
    pub fn deletion_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deletion_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Every <code>DeleteInventory</code> operation is assigned a unique ID. This option returns a unique ID. You can use this ID to query the status of a delete operation. This option is useful for ensuring that a delete operation has completed before you begin other operations.</p>
    pub fn set_deletion_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deletion_id = input;
        self
    }
    /// <p>Every <code>DeleteInventory</code> operation is assigned a unique ID. This option returns a unique ID. You can use this ID to query the status of a delete operation. This option is useful for ensuring that a delete operation has completed before you begin other operations.</p>
    pub fn get_deletion_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.deletion_id
    }
    /// <p>The name of the inventory data type specified in the request.</p>
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.type_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the inventory data type specified in the request.</p>
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.type_name = input;
        self
    }
    /// <p>The name of the inventory data type specified in the request.</p>
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.type_name
    }
    /// <p>A summary of the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary">Deleting custom inventory</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn deletion_summary(mut self, input: crate::types::InventoryDeletionSummary) -> Self {
        self.deletion_summary = ::std::option::Option::Some(input);
        self
    }
    /// <p>A summary of the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary">Deleting custom inventory</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn set_deletion_summary(mut self, input: ::std::option::Option<crate::types::InventoryDeletionSummary>) -> Self {
        self.deletion_summary = input;
        self
    }
    /// <p>A summary of the delete operation. For more information about this summary, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary">Deleting custom inventory</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn get_deletion_summary(&self) -> &::std::option::Option<crate::types::InventoryDeletionSummary> {
        &self.deletion_summary
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DeleteInventoryOutput`](crate::operation::delete_inventory::DeleteInventoryOutput).
    pub fn build(self) -> crate::operation::delete_inventory::DeleteInventoryOutput {
        crate::operation::delete_inventory::DeleteInventoryOutput {
            deletion_id: self.deletion_id,
            type_name: self.type_name,
            deletion_summary: self.deletion_summary,
            _request_id: self._request_id,
        }
    }
}