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 UpdateDocumentOutput {
    /// <p>A description of the document that was updated.</p>
    pub document_description: ::std::option::Option<crate::types::DocumentDescription>,
    _request_id: Option<String>,
}
impl UpdateDocumentOutput {
    /// <p>A description of the document that was updated.</p>
    pub fn document_description(&self) -> ::std::option::Option<&crate::types::DocumentDescription> {
        self.document_description.as_ref()
    }
}
static UPDATEDOCUMENTOUTPUT_MEMBER_DOCUMENT_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#UpdateDocumentOutput$DocumentDescription",
        "com.amazonaws.ssm.synthetic",
        "UpdateDocumentOutput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    "DocumentDescription",
    0,
);
static UPDATEDOCUMENTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#UpdateDocumentOutput",
        "com.amazonaws.ssm.synthetic",
        "UpdateDocumentOutput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    &[&UPDATEDOCUMENTOUTPUT_MEMBER_DOCUMENT_DESCRIPTION],
)
.with_original_name("UpdateDocumentResult");
impl UpdateDocumentOutput {
    /// The schema for this shape.
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEDOCUMENTOUTPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateDocumentOutput {
    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.document_description {
            ser.write_struct(&UPDATEDOCUMENTOUTPUT_MEMBER_DOCUMENT_DESCRIPTION, val)?;
        }
        Ok(())
    }
}
impl crate::operation::update_document::builders::UpdateDocumentOutputBuilder {
    #[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(&UPDATEDOCUMENTOUTPUT_SCHEMA, &mut |member, deser| {
            match member.member_index() {
                Some(0) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.document_description = Some(crate::types::DocumentDescription::deserialize(deser)?);
                    }
                }
                _ => {}
            }
            Ok(())
        })
    }
}

impl UpdateDocumentOutput {
    /// 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 UpdateDocumentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateDocumentOutput {
    /// Creates a new builder-style object to manufacture [`UpdateDocumentOutput`](crate::operation::update_document::UpdateDocumentOutput).
    pub fn builder() -> crate::operation::update_document::builders::UpdateDocumentOutputBuilder {
        crate::operation::update_document::builders::UpdateDocumentOutputBuilder::default()
    }
}

/// A builder for [`UpdateDocumentOutput`](crate::operation::update_document::UpdateDocumentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDocumentOutputBuilder {
    pub(crate) document_description: ::std::option::Option<crate::types::DocumentDescription>,
    _request_id: Option<String>,
}
impl UpdateDocumentOutputBuilder {
    /// <p>A description of the document that was updated.</p>
    pub fn document_description(mut self, input: crate::types::DocumentDescription) -> Self {
        self.document_description = ::std::option::Option::Some(input);
        self
    }
    /// <p>A description of the document that was updated.</p>
    pub fn set_document_description(mut self, input: ::std::option::Option<crate::types::DocumentDescription>) -> Self {
        self.document_description = input;
        self
    }
    /// <p>A description of the document that was updated.</p>
    pub fn get_document_description(&self) -> &::std::option::Option<crate::types::DocumentDescription> {
        &self.document_description
    }
    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 [`UpdateDocumentOutput`](crate::operation::update_document::UpdateDocumentOutput).
    pub fn build(self) -> crate::operation::update_document::UpdateDocumentOutput {
        crate::operation::update_document::UpdateDocumentOutput {
            document_description: self.document_description,
            _request_id: self._request_id,
        }
    }
}