AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,167 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>This data type is deprecated. Instead, use <code>DocumentKeyValuesFilter</code>.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct DocumentFilter {
           7  +
    /// <p>The name of the filter.</p>
           8  +
    pub key: crate::types::DocumentFilterKey,
           9  +
    /// <p>The value of the filter.</p>
          10  +
    pub value: ::std::string::String,
          11  +
}
          12  +
impl DocumentFilter {
          13  +
    /// <p>The name of the filter.</p>
          14  +
    pub fn key(&self) -> &crate::types::DocumentFilterKey {
          15  +
        &self.key
          16  +
    }
          17  +
    /// <p>The value of the filter.</p>
          18  +
    pub fn value(&self) -> &str {
          19  +
        use std::ops::Deref;
          20  +
        self.value.deref()
          21  +
    }
          22  +
}
          23  +
static DOCUMENTFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentFilter$key", "com.amazonaws.ssm", "DocumentFilter"),
          25  +
    ::aws_smithy_schema::ShapeType::String,
          26  +
    "key",
          27  +
    0,
          28  +
);
          29  +
static DOCUMENTFILTER_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          30  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentFilter$value", "com.amazonaws.ssm", "DocumentFilter"),
          31  +
    ::aws_smithy_schema::ShapeType::String,
          32  +
    "value",
          33  +
    1,
          34  +
);
          35  +
static DOCUMENTFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          36  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentFilter", "com.amazonaws.ssm", "DocumentFilter"),
          37  +
    ::aws_smithy_schema::ShapeType::Structure,
          38  +
    &[&DOCUMENTFILTER_MEMBER_KEY, &DOCUMENTFILTER_MEMBER_VALUE],
          39  +
);
          40  +
impl DocumentFilter {
          41  +
    /// The schema for this shape.
          42  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DOCUMENTFILTER_SCHEMA;
          43  +
}
          44  +
impl ::aws_smithy_schema::serde::SerializableStruct for DocumentFilter {
          45  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          46  +
    fn serialize_members(
          47  +
        &self,
          48  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          49  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          50  +
        {
          51  +
            let val = &self.key;
          52  +
            ser.write_string(&DOCUMENTFILTER_MEMBER_KEY, val.as_str())?;
          53  +
        }
          54  +
        {
          55  +
            let val = &self.value;
          56  +
            ser.write_string(&DOCUMENTFILTER_MEMBER_VALUE, val)?;
          57  +
        }
          58  +
        Ok(())
          59  +
    }
          60  +
}
          61  +
impl DocumentFilter {
          62  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          63  +
    pub fn deserialize(
          64  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          65  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          66  +
        #[allow(unused_variables, unused_mut)]
          67  +
        let mut builder = Self::builder();
          68  +
        #[allow(
          69  +
            unused_variables,
          70  +
            unreachable_code,
          71  +
            clippy::single_match,
          72  +
            clippy::match_single_binding,
          73  +
            clippy::diverging_sub_expression
          74  +
        )]
          75  +
        deserializer.read_struct(&DOCUMENTFILTER_SCHEMA, &mut |member, deser| {
          76  +
            match member.member_index() {
          77  +
                Some(0) => {
          78  +
                    builder.key = Some(crate::types::DocumentFilterKey::from(deser.read_string(member)?.as_str()));
          79  +
                }
          80  +
                Some(1) => {
          81  +
                    builder.value = Some(deser.read_string(member)?);
          82  +
                }
          83  +
                _ => {}
          84  +
            }
          85  +
            Ok(())
          86  +
        })?;
          87  +
        builder.value = builder.value.or(Some(String::new()));
          88  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          89  +
    }
          90  +
}
          91  +
impl DocumentFilter {
          92  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          93  +
    pub fn deserialize_with_response(
          94  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          95  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          96  +
        _status: u16,
          97  +
        _body: &[u8],
          98  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          99  +
        Self::deserialize(deserializer)
         100  +
    }
         101  +
}
         102  +
impl DocumentFilter {
         103  +
    /// Creates a new builder-style object to manufacture [`DocumentFilter`](crate::types::DocumentFilter).
         104  +
    pub fn builder() -> crate::types::builders::DocumentFilterBuilder {
         105  +
        crate::types::builders::DocumentFilterBuilder::default()
         106  +
    }
         107  +
}
         108  +
         109  +
/// A builder for [`DocumentFilter`](crate::types::DocumentFilter).
         110  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         111  +
#[non_exhaustive]
         112  +
pub struct DocumentFilterBuilder {
         113  +
    pub(crate) key: ::std::option::Option<crate::types::DocumentFilterKey>,
         114  +
    pub(crate) value: ::std::option::Option<::std::string::String>,
         115  +
}
         116  +
impl DocumentFilterBuilder {
         117  +
    /// <p>The name of the filter.</p>
         118  +
    /// This field is required.
         119  +
    pub fn key(mut self, input: crate::types::DocumentFilterKey) -> Self {
         120  +
        self.key = ::std::option::Option::Some(input);
         121  +
        self
         122  +
    }
         123  +
    /// <p>The name of the filter.</p>
         124  +
    pub fn set_key(mut self, input: ::std::option::Option<crate::types::DocumentFilterKey>) -> Self {
         125  +
        self.key = input;
         126  +
        self
         127  +
    }
         128  +
    /// <p>The name of the filter.</p>
         129  +
    pub fn get_key(&self) -> &::std::option::Option<crate::types::DocumentFilterKey> {
         130  +
        &self.key
         131  +
    }
         132  +
    /// <p>The value of the filter.</p>
         133  +
    /// This field is required.
         134  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         135  +
        self.value = ::std::option::Option::Some(input.into());
         136  +
        self
         137  +
    }
         138  +
    /// <p>The value of the filter.</p>
         139  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         140  +
        self.value = input;
         141  +
        self
         142  +
    }
         143  +
    /// <p>The value of the filter.</p>
         144  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         145  +
        &self.value
         146  +
    }
         147  +
    /// Consumes the builder and constructs a [`DocumentFilter`](crate::types::DocumentFilter).
         148  +
    /// This method will fail if any of the following fields are not set:
         149  +
    /// - [`key`](crate::types::builders::DocumentFilterBuilder::key)
         150  +
    /// - [`value`](crate::types::builders::DocumentFilterBuilder::value)
         151  +
    pub fn build(self) -> ::std::result::Result<crate::types::DocumentFilter, ::aws_smithy_types::error::operation::BuildError> {
         152  +
        ::std::result::Result::Ok(crate::types::DocumentFilter {
         153  +
            key: self.key.ok_or_else(|| {
         154  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         155  +
                    "key",
         156  +
                    "key was not specified but it is required when building DocumentFilter",
         157  +
                )
         158  +
            })?,
         159  +
            value: self.value.ok_or_else(|| {
         160  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         161  +
                    "value",
         162  +
                    "value was not specified but it is required when building DocumentFilter",
         163  +
                )
         164  +
            })?,
         165  +
        })
         166  +
    }
         167  +
}

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

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

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

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

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

@@ -0,1 +0,108 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `DocumentHashType`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let documenthashtype = unimplemented!();
          14  +
/// match documenthashtype {
          15  +
///     DocumentHashType::Sha1 => { /* ... */ },
          16  +
///     DocumentHashType::Sha256 => { /* ... */ },
          17  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          18  +
///     _ => { /* ... */ },
          19  +
/// }
          20  +
/// ```
          21  +
/// The above code demonstrates that when `documenthashtype` represents
          22  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          23  +
/// even though the enum does not contain a variant `DocumentHashType::NewFeature`
          24  +
/// in the current version of SDK. The reason is that the variable `other`,
          25  +
/// created by the `@` operator, is bound to
          26  +
/// `DocumentHashType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          27  +
/// and calling `as_str` on it yields `"NewFeature"`.
          28  +
/// This match expression is forward-compatible when executed with a newer
          29  +
/// version of SDK where the variant `DocumentHashType::NewFeature` is defined.
          30  +
/// Specifically, when `documenthashtype` represents `NewFeature`,
          31  +
/// the execution path will hit the second last match arm as before by virtue of
          32  +
/// calling `as_str` on `DocumentHashType::NewFeature` also yielding `"NewFeature"`.
          33  +
///
          34  +
/// Explicitly matching on the `Unknown` variant should
          35  +
/// be avoided for two reasons:
          36  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          37  +
/// - It might inadvertently shadow other intended match arms.
          38  +
///
          39  +
#[allow(missing_docs)] // documentation missing in model
          40  +
#[non_exhaustive]
          41  +
#[derive(
          42  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          43  +
)]
          44  +
pub enum DocumentHashType {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    Sha1,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    Sha256,
          49  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          50  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          51  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          52  +
}
          53  +
impl ::std::convert::From<&str> for DocumentHashType {
          54  +
    fn from(s: &str) -> Self {
          55  +
        match s {
          56  +
            "Sha1" => DocumentHashType::Sha1,
          57  +
            "Sha256" => DocumentHashType::Sha256,
          58  +
            other => DocumentHashType::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          59  +
        }
          60  +
    }
          61  +
}
          62  +
impl ::std::str::FromStr for DocumentHashType {
          63  +
    type Err = ::std::convert::Infallible;
          64  +
          65  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          66  +
        ::std::result::Result::Ok(DocumentHashType::from(s))
          67  +
    }
          68  +
}
          69  +
impl DocumentHashType {
          70  +
    /// Returns the `&str` value of the enum member.
          71  +
    pub fn as_str(&self) -> &str {
          72  +
        match self {
          73  +
            DocumentHashType::Sha1 => "Sha1",
          74  +
            DocumentHashType::Sha256 => "Sha256",
          75  +
            DocumentHashType::Unknown(value) => value.as_str(),
          76  +
        }
          77  +
    }
          78  +
    /// Returns all the `&str` representations of the enum members.
          79  +
    pub const fn values() -> &'static [&'static str] {
          80  +
        &["Sha1", "Sha256"]
          81  +
    }
          82  +
}
          83  +
impl ::std::convert::AsRef<str> for DocumentHashType {
          84  +
    fn as_ref(&self) -> &str {
          85  +
        self.as_str()
          86  +
    }
          87  +
}
          88  +
impl DocumentHashType {
          89  +
    /// Parses the enum value while disallowing unknown variants.
          90  +
    ///
          91  +
    /// Unknown variants will result in an error.
          92  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
          93  +
        match Self::from(value) {
          94  +
            #[allow(deprecated)]
          95  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
          96  +
            known => Ok(known),
          97  +
        }
          98  +
    }
          99  +
}
         100  +
impl ::std::fmt::Display for DocumentHashType {
         101  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         102  +
        match self {
         103  +
            DocumentHashType::Sha1 => write!(f, "Sha1"),
         104  +
            DocumentHashType::Sha256 => write!(f, "Sha256"),
         105  +
            DocumentHashType::Unknown(value) => write!(f, "{value}"),
         106  +
        }
         107  +
    }
         108  +
}

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

@@ -0,1 +0,803 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Describes the name of a SSM document.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct DocumentIdentifier {
           7  +
    /// <p>The name of the SSM document.</p>
           8  +
    pub name: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The date the SSM document was created.</p>
          10  +
    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          11  +
    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
          12  +
    pub display_name: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The Amazon Web Services user that created the document.</p>
          14  +
    pub owner: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
          16  +
    pub version_name: ::std::option::Option<::std::string::String>,
          17  +
    /// <p>The operating system platform.</p>
          18  +
    pub platform_types: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>,
          19  +
    /// <p>The document version.</p>
          20  +
    pub document_version: ::std::option::Option<::std::string::String>,
          21  +
    /// <p>The document type.</p>
          22  +
    pub document_type: ::std::option::Option<crate::types::DocumentType>,
          23  +
    /// <p>The schema version.</p>
          24  +
    pub schema_version: ::std::option::Option<::std::string::String>,
          25  +
    /// <p>The document format, either JSON or YAML.</p>
          26  +
    pub document_format: ::std::option::Option<crate::types::DocumentFormat>,
          27  +
    /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
          28  +
    pub target_type: ::std::option::Option<::std::string::String>,
          29  +
    /// <p>The tags, or metadata, that have been applied to the document.</p>
          30  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
          31  +
    /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
          32  +
    pub requires: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>,
          33  +
    /// <p>The current status of a document review.</p>
          34  +
    pub review_status: ::std::option::Option<crate::types::ReviewStatus>,
          35  +
    /// <p>The user in your organization who created the document.</p>
          36  +
    pub author: ::std::option::Option<::std::string::String>,
          37  +
}
          38  +
impl DocumentIdentifier {
          39  +
    /// <p>The name of the SSM document.</p>
          40  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          41  +
        self.name.as_deref()
          42  +
    }
          43  +
    /// <p>The date the SSM document was created.</p>
          44  +
    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          45  +
        self.created_date.as_ref()
          46  +
    }
          47  +
    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
          48  +
    pub fn display_name(&self) -> ::std::option::Option<&str> {
          49  +
        self.display_name.as_deref()
          50  +
    }
          51  +
    /// <p>The Amazon Web Services user that created the document.</p>
          52  +
    pub fn owner(&self) -> ::std::option::Option<&str> {
          53  +
        self.owner.as_deref()
          54  +
    }
          55  +
    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
          56  +
    pub fn version_name(&self) -> ::std::option::Option<&str> {
          57  +
        self.version_name.as_deref()
          58  +
    }
          59  +
    /// <p>The operating system platform.</p>
          60  +
    ///
          61  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.platform_types.is_none()`.
          62  +
    pub fn platform_types(&self) -> &[crate::types::PlatformType] {
          63  +
        self.platform_types.as_deref().unwrap_or_default()
          64  +
    }
          65  +
    /// <p>The document version.</p>
          66  +
    pub fn document_version(&self) -> ::std::option::Option<&str> {
          67  +
        self.document_version.as_deref()
          68  +
    }
          69  +
    /// <p>The document type.</p>
          70  +
    pub fn document_type(&self) -> ::std::option::Option<&crate::types::DocumentType> {
          71  +
        self.document_type.as_ref()
          72  +
    }
          73  +
    /// <p>The schema version.</p>
          74  +
    pub fn schema_version(&self) -> ::std::option::Option<&str> {
          75  +
        self.schema_version.as_deref()
          76  +
    }
          77  +
    /// <p>The document format, either JSON or YAML.</p>
          78  +
    pub fn document_format(&self) -> ::std::option::Option<&crate::types::DocumentFormat> {
          79  +
        self.document_format.as_ref()
          80  +
    }
          81  +
    /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
          82  +
    pub fn target_type(&self) -> ::std::option::Option<&str> {
          83  +
        self.target_type.as_deref()
          84  +
    }
          85  +
    /// <p>The tags, or metadata, that have been applied to the document.</p>
          86  +
    ///
          87  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
          88  +
    pub fn tags(&self) -> &[crate::types::Tag] {
          89  +
        self.tags.as_deref().unwrap_or_default()
          90  +
    }
          91  +
    /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
          92  +
    ///
          93  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requires.is_none()`.
          94  +
    pub fn requires(&self) -> &[crate::types::DocumentRequires] {
          95  +
        self.requires.as_deref().unwrap_or_default()
          96  +
    }
          97  +
    /// <p>The current status of a document review.</p>
          98  +
    pub fn review_status(&self) -> ::std::option::Option<&crate::types::ReviewStatus> {
          99  +
        self.review_status.as_ref()
         100  +
    }
         101  +
    /// <p>The user in your organization who created the document.</p>
         102  +
    pub fn author(&self) -> ::std::option::Option<&str> {
         103  +
        self.author.as_deref()
         104  +
    }
         105  +
}
         106  +
static DOCUMENTIDENTIFIER_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         107  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Name", "com.amazonaws.ssm", "DocumentIdentifier"),
         108  +
    ::aws_smithy_schema::ShapeType::String,
         109  +
    "Name",
         110  +
    0,
         111  +
);
         112  +
static DOCUMENTIDENTIFIER_MEMBER_CREATED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         113  +
    ::aws_smithy_schema::ShapeId::from_parts(
         114  +
        "com.amazonaws.ssm#DocumentIdentifier$CreatedDate",
         115  +
        "com.amazonaws.ssm",
         116  +
        "DocumentIdentifier",
         117  +
    ),
         118  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         119  +
    "CreatedDate",
         120  +
    1,
         121  +
);
         122  +
static DOCUMENTIDENTIFIER_MEMBER_DISPLAY_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         123  +
    ::aws_smithy_schema::ShapeId::from_parts(
         124  +
        "com.amazonaws.ssm#DocumentIdentifier$DisplayName",
         125  +
        "com.amazonaws.ssm",
         126  +
        "DocumentIdentifier",
         127  +
    ),
         128  +
    ::aws_smithy_schema::ShapeType::String,
         129  +
    "DisplayName",
         130  +
    2,
         131  +
);
         132  +
static DOCUMENTIDENTIFIER_MEMBER_OWNER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         133  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Owner", "com.amazonaws.ssm", "DocumentIdentifier"),
         134  +
    ::aws_smithy_schema::ShapeType::String,
         135  +
    "Owner",
         136  +
    3,
         137  +
);
         138  +
static DOCUMENTIDENTIFIER_MEMBER_VERSION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         139  +
    ::aws_smithy_schema::ShapeId::from_parts(
         140  +
        "com.amazonaws.ssm#DocumentIdentifier$VersionName",
         141  +
        "com.amazonaws.ssm",
         142  +
        "DocumentIdentifier",
         143  +
    ),
         144  +
    ::aws_smithy_schema::ShapeType::String,
         145  +
    "VersionName",
         146  +
    4,
         147  +
);
         148  +
static DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         149  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PlatformTypeList$member", "com.amazonaws.ssm", "PlatformTypeList"),
         150  +
    ::aws_smithy_schema::ShapeType::String,
         151  +
    "member",
         152  +
    0,
         153  +
)
         154  +
.with_xml_name("PlatformType");
         155  +
static DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         156  +
    ::aws_smithy_schema::ShapeId::from_parts(
         157  +
        "com.amazonaws.ssm#DocumentIdentifier$PlatformTypes",
         158  +
        "com.amazonaws.ssm",
         159  +
        "DocumentIdentifier",
         160  +
    ),
         161  +
    ::aws_smithy_schema::ShapeType::List,
         162  +
    "PlatformTypes",
         163  +
    5,
         164  +
)
         165  +
.with_list_member(&DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES_MEMBER);
         166  +
static DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         167  +
    ::aws_smithy_schema::ShapeId::from_parts(
         168  +
        "com.amazonaws.ssm#DocumentIdentifier$DocumentVersion",
         169  +
        "com.amazonaws.ssm",
         170  +
        "DocumentIdentifier",
         171  +
    ),
         172  +
    ::aws_smithy_schema::ShapeType::String,
         173  +
    "DocumentVersion",
         174  +
    6,
         175  +
);
         176  +
static DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         177  +
    ::aws_smithy_schema::ShapeId::from_parts(
         178  +
        "com.amazonaws.ssm#DocumentIdentifier$DocumentType",
         179  +
        "com.amazonaws.ssm",
         180  +
        "DocumentIdentifier",
         181  +
    ),
         182  +
    ::aws_smithy_schema::ShapeType::String,
         183  +
    "DocumentType",
         184  +
    7,
         185  +
);
         186  +
static DOCUMENTIDENTIFIER_MEMBER_SCHEMA_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         187  +
    ::aws_smithy_schema::ShapeId::from_parts(
         188  +
        "com.amazonaws.ssm#DocumentIdentifier$SchemaVersion",
         189  +
        "com.amazonaws.ssm",
         190  +
        "DocumentIdentifier",
         191  +
    ),
         192  +
    ::aws_smithy_schema::ShapeType::String,
         193  +
    "SchemaVersion",
         194  +
    8,
         195  +
);
         196  +
static DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_FORMAT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         197  +
    ::aws_smithy_schema::ShapeId::from_parts(
         198  +
        "com.amazonaws.ssm#DocumentIdentifier$DocumentFormat",
         199  +
        "com.amazonaws.ssm",
         200  +
        "DocumentIdentifier",
         201  +
    ),
         202  +
    ::aws_smithy_schema::ShapeType::String,
         203  +
    "DocumentFormat",
         204  +
    9,
         205  +
);
         206  +
static DOCUMENTIDENTIFIER_MEMBER_TARGET_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         207  +
    ::aws_smithy_schema::ShapeId::from_parts(
         208  +
        "com.amazonaws.ssm#DocumentIdentifier$TargetType",
         209  +
        "com.amazonaws.ssm",
         210  +
        "DocumentIdentifier",
         211  +
    ),
         212  +
    ::aws_smithy_schema::ShapeType::String,
         213  +
    "TargetType",
         214  +
    10,
         215  +
);
         216  +
static DOCUMENTIDENTIFIER_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         217  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
         218  +
    ::aws_smithy_schema::ShapeType::Structure,
         219  +
    "member",
         220  +
    0,
         221  +
);
         222  +
static DOCUMENTIDENTIFIER_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         223  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Tags", "com.amazonaws.ssm", "DocumentIdentifier"),
         224  +
    ::aws_smithy_schema::ShapeType::List,
         225  +
    "Tags",
         226  +
    11,
         227  +
)
         228  +
.with_list_member(&DOCUMENTIDENTIFIER_MEMBER_TAGS_MEMBER);
         229  +
static DOCUMENTIDENTIFIER_MEMBER_REQUIRES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         230  +
    ::aws_smithy_schema::ShapeId::from_parts(
         231  +
        "com.amazonaws.ssm#DocumentRequiresList$member",
         232  +
        "com.amazonaws.ssm",
         233  +
        "DocumentRequiresList",
         234  +
    ),
         235  +
    ::aws_smithy_schema::ShapeType::Structure,
         236  +
    "member",
         237  +
    0,
         238  +
);
         239  +
static DOCUMENTIDENTIFIER_MEMBER_REQUIRES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         240  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Requires", "com.amazonaws.ssm", "DocumentIdentifier"),
         241  +
    ::aws_smithy_schema::ShapeType::List,
         242  +
    "Requires",
         243  +
    12,
         244  +
)
         245  +
.with_list_member(&DOCUMENTIDENTIFIER_MEMBER_REQUIRES_MEMBER);
         246  +
static DOCUMENTIDENTIFIER_MEMBER_REVIEW_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         247  +
    ::aws_smithy_schema::ShapeId::from_parts(
         248  +
        "com.amazonaws.ssm#DocumentIdentifier$ReviewStatus",
         249  +
        "com.amazonaws.ssm",
         250  +
        "DocumentIdentifier",
         251  +
    ),
         252  +
    ::aws_smithy_schema::ShapeType::String,
         253  +
    "ReviewStatus",
         254  +
    13,
         255  +
);
         256  +
static DOCUMENTIDENTIFIER_MEMBER_AUTHOR: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         257  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Author", "com.amazonaws.ssm", "DocumentIdentifier"),
         258  +
    ::aws_smithy_schema::ShapeType::String,
         259  +
    "Author",
         260  +
    14,
         261  +
);
         262  +
static DOCUMENTIDENTIFIER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         263  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier", "com.amazonaws.ssm", "DocumentIdentifier"),
         264  +
    ::aws_smithy_schema::ShapeType::Structure,
         265  +
    &[
         266  +
        &DOCUMENTIDENTIFIER_MEMBER_NAME,
         267  +
        &DOCUMENTIDENTIFIER_MEMBER_CREATED_DATE,
         268  +
        &DOCUMENTIDENTIFIER_MEMBER_DISPLAY_NAME,
         269  +
        &DOCUMENTIDENTIFIER_MEMBER_OWNER,
         270  +
        &DOCUMENTIDENTIFIER_MEMBER_VERSION_NAME,
         271  +
        &DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES,
         272  +
        &DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_VERSION,
         273  +
        &DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_TYPE,
         274  +
        &DOCUMENTIDENTIFIER_MEMBER_SCHEMA_VERSION,
         275  +
        &DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_FORMAT,
         276  +
        &DOCUMENTIDENTIFIER_MEMBER_TARGET_TYPE,
         277  +
        &DOCUMENTIDENTIFIER_MEMBER_TAGS,
         278  +
        &DOCUMENTIDENTIFIER_MEMBER_REQUIRES,
         279  +
        &DOCUMENTIDENTIFIER_MEMBER_REVIEW_STATUS,
         280  +
        &DOCUMENTIDENTIFIER_MEMBER_AUTHOR,
         281  +
    ],
         282  +
);
         283  +
impl DocumentIdentifier {
         284  +
    /// The schema for this shape.
         285  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DOCUMENTIDENTIFIER_SCHEMA;
         286  +
}
         287  +
impl ::aws_smithy_schema::serde::SerializableStruct for DocumentIdentifier {
         288  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         289  +
    fn serialize_members(
         290  +
        &self,
         291  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         292  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         293  +
        if let Some(ref val) = self.name {
         294  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_NAME, val)?;
         295  +
        }
         296  +
        if let Some(ref val) = self.created_date {
         297  +
            ser.write_timestamp(&DOCUMENTIDENTIFIER_MEMBER_CREATED_DATE, val)?;
         298  +
        }
         299  +
        if let Some(ref val) = self.display_name {
         300  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DISPLAY_NAME, val)?;
         301  +
        }
         302  +
        if let Some(ref val) = self.owner {
         303  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_OWNER, val)?;
         304  +
        }
         305  +
        if let Some(ref val) = self.version_name {
         306  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_VERSION_NAME, val)?;
         307  +
        }
         308  +
        if let Some(ref val) = self.platform_types {
         309  +
            ser.write_list(
         310  +
                &DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES,
         311  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         312  +
                    for item in val {
         313  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
         314  +
                    }
         315  +
                    Ok(())
         316  +
                },
         317  +
            )?;
         318  +
        }
         319  +
        if let Some(ref val) = self.document_version {
         320  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_VERSION, val)?;
         321  +
        }
         322  +
        if let Some(ref val) = self.document_type {
         323  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_TYPE, val.as_str())?;
         324  +
        }
         325  +
        if let Some(ref val) = self.schema_version {
         326  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_SCHEMA_VERSION, val)?;
         327  +
        }
         328  +
        if let Some(ref val) = self.document_format {
         329  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_FORMAT, val.as_str())?;
         330  +
        }
         331  +
        if let Some(ref val) = self.target_type {
         332  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_TARGET_TYPE, val)?;
         333  +
        }
         334  +
        if let Some(ref val) = self.tags {
         335  +
            ser.write_list(
         336  +
                &DOCUMENTIDENTIFIER_MEMBER_TAGS,
         337  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         338  +
                    for item in val {
         339  +
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
         340  +
                    }
         341  +
                    Ok(())
         342  +
                },
         343  +
            )?;
         344  +
        }
         345  +
        if let Some(ref val) = self.requires {
         346  +
            ser.write_list(
         347  +
                &DOCUMENTIDENTIFIER_MEMBER_REQUIRES,
         348  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         349  +
                    for item in val {
         350  +
                        ser.write_struct(crate::types::DocumentRequires::SCHEMA, item)?;
         351  +
                    }
         352  +
                    Ok(())
         353  +
                },
         354  +
            )?;
         355  +
        }
         356  +
        if let Some(ref val) = self.review_status {
         357  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_REVIEW_STATUS, val.as_str())?;
         358  +
        }
         359  +
        if let Some(ref val) = self.author {
         360  +
            ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_AUTHOR, val)?;
         361  +
        }
         362  +
        Ok(())
         363  +
    }
         364  +
}
         365  +
impl DocumentIdentifier {
         366  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         367  +
    pub fn deserialize(
         368  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         369  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         370  +
        #[allow(unused_variables, unused_mut)]
         371  +
        let mut builder = Self::builder();
         372  +
        #[allow(
         373  +
            unused_variables,
         374  +
            unreachable_code,
         375  +
            clippy::single_match,
         376  +
            clippy::match_single_binding,
         377  +
            clippy::diverging_sub_expression
         378  +
        )]
         379  +
        deserializer.read_struct(&DOCUMENTIDENTIFIER_SCHEMA, &mut |member, deser| {
         380  +
            match member.member_index() {
         381  +
                Some(0) => {
         382  +
                    if deser.is_null() {
         383  +
                        deser.read_null()?;
         384  +
                    } else {
         385  +
                        builder.name = Some(deser.read_string(member)?);
         386  +
                    }
         387  +
                }
         388  +
                Some(1) => {
         389  +
                    if deser.is_null() {
         390  +
                        deser.read_null()?;
         391  +
                    } else {
         392  +
                        builder.created_date = Some(deser.read_timestamp(member)?);
         393  +
                    }
         394  +
                }
         395  +
                Some(2) => {
         396  +
                    if deser.is_null() {
         397  +
                        deser.read_null()?;
         398  +
                    } else {
         399  +
                        builder.display_name = Some(deser.read_string(member)?);
         400  +
                    }
         401  +
                }
         402  +
                Some(3) => {
         403  +
                    if deser.is_null() {
         404  +
                        deser.read_null()?;
         405  +
                    } else {
         406  +
                        builder.owner = Some(deser.read_string(member)?);
         407  +
                    }
         408  +
                }
         409  +
                Some(4) => {
         410  +
                    if deser.is_null() {
         411  +
                        deser.read_null()?;
         412  +
                    } else {
         413  +
                        builder.version_name = Some(deser.read_string(member)?);
         414  +
                    }
         415  +
                }
         416  +
                Some(5) => {
         417  +
                    if deser.is_null() {
         418  +
                        deser.read_null()?;
         419  +
                    } else {
         420  +
                        builder.platform_types = Some({
         421  +
                            let mut container = Vec::new();
         422  +
                            deser.read_list(member, &mut |deser| {
         423  +
                                container.push(crate::types::PlatformType::from(
         424  +
                                    deser.read_string(&::aws_smithy_schema::prelude::STRING)?.as_str(),
         425  +
                                ));
         426  +
                                Ok(())
         427  +
                            })?;
         428  +
                            container
         429  +
                        });
         430  +
                    }
         431  +
                }
         432  +
                Some(6) => {
         433  +
                    if deser.is_null() {
         434  +
                        deser.read_null()?;
         435  +
                    } else {
         436  +
                        builder.document_version = Some(deser.read_string(member)?);
         437  +
                    }
         438  +
                }
         439  +
                Some(7) => {
         440  +
                    if deser.is_null() {
         441  +
                        deser.read_null()?;
         442  +
                    } else {
         443  +
                        builder.document_type = Some(crate::types::DocumentType::from(deser.read_string(member)?.as_str()));
         444  +
                    }
         445  +
                }
         446  +
                Some(8) => {
         447  +
                    if deser.is_null() {
         448  +
                        deser.read_null()?;
         449  +
                    } else {
         450  +
                        builder.schema_version = Some(deser.read_string(member)?);
         451  +
                    }
         452  +
                }
         453  +
                Some(9) => {
         454  +
                    if deser.is_null() {
         455  +
                        deser.read_null()?;
         456  +
                    } else {
         457  +
                        builder.document_format = Some(crate::types::DocumentFormat::from(deser.read_string(member)?.as_str()));
         458  +
                    }
         459  +
                }
         460  +
                Some(10) => {
         461  +
                    if deser.is_null() {
         462  +
                        deser.read_null()?;
         463  +
                    } else {
         464  +
                        builder.target_type = Some(deser.read_string(member)?);
         465  +
                    }
         466  +
                }
         467  +
                Some(11) => {
         468  +
                    if deser.is_null() {
         469  +
                        deser.read_null()?;
         470  +
                    } else {
         471  +
                        builder.tags = Some({
         472  +
                            let mut container = Vec::new();
         473  +
                            deser.read_list(member, &mut |deser| {
         474  +
                                container.push(crate::types::Tag::deserialize(deser)?);
         475  +
                                Ok(())
         476  +
                            })?;
         477  +
                            container
         478  +
                        });
         479  +
                    }
         480  +
                }
         481  +
                Some(12) => {
         482  +
                    if deser.is_null() {
         483  +
                        deser.read_null()?;
         484  +
                    } else {
         485  +
                        builder.requires = Some({
         486  +
                            let mut container = Vec::new();
         487  +
                            deser.read_list(member, &mut |deser| {
         488  +
                                container.push(crate::types::DocumentRequires::deserialize(deser)?);
         489  +
                                Ok(())
         490  +
                            })?;
         491  +
                            container
         492  +
                        });
         493  +
                    }
         494  +
                }
         495  +
                Some(13) => {
         496  +
                    if deser.is_null() {
         497  +
                        deser.read_null()?;
         498  +
                    } else {
         499  +
                        builder.review_status = Some(crate::types::ReviewStatus::from(deser.read_string(member)?.as_str()));
         500  +
                    }
         501  +
                }
         502  +
                Some(14) => {
         503  +
                    if deser.is_null() {
         504  +
                        deser.read_null()?;
         505  +
                    } else {
         506  +
                        builder.author = Some(deser.read_string(member)?);
         507  +
                    }
         508  +
                }
         509  +
                _ => {}
         510  +
            }
         511  +
            Ok(())
         512  +
        })?;
         513  +
        Ok(builder.build())
         514  +
    }
         515  +
}
         516  +
impl DocumentIdentifier {
         517  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         518  +
    pub fn deserialize_with_response(
         519  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         520  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         521  +
        _status: u16,
         522  +
        _body: &[u8],
         523  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         524  +
        Self::deserialize(deserializer)
         525  +
    }
         526  +
}
         527  +
impl DocumentIdentifier {
         528  +
    /// Creates a new builder-style object to manufacture [`DocumentIdentifier`](crate::types::DocumentIdentifier).
         529  +
    pub fn builder() -> crate::types::builders::DocumentIdentifierBuilder {
         530  +
        crate::types::builders::DocumentIdentifierBuilder::default()
         531  +
    }
         532  +
}
         533  +
         534  +
/// A builder for [`DocumentIdentifier`](crate::types::DocumentIdentifier).
         535  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         536  +
#[non_exhaustive]
         537  +
pub struct DocumentIdentifierBuilder {
         538  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         539  +
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         540  +
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
         541  +
    pub(crate) owner: ::std::option::Option<::std::string::String>,
         542  +
    pub(crate) version_name: ::std::option::Option<::std::string::String>,
         543  +
    pub(crate) platform_types: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>,
         544  +
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
         545  +
    pub(crate) document_type: ::std::option::Option<crate::types::DocumentType>,
         546  +
    pub(crate) schema_version: ::std::option::Option<::std::string::String>,
         547  +
    pub(crate) document_format: ::std::option::Option<crate::types::DocumentFormat>,
         548  +
    pub(crate) target_type: ::std::option::Option<::std::string::String>,
         549  +
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
         550  +
    pub(crate) requires: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>,
         551  +
    pub(crate) review_status: ::std::option::Option<crate::types::ReviewStatus>,
         552  +
    pub(crate) author: ::std::option::Option<::std::string::String>,
         553  +
}
         554  +
impl DocumentIdentifierBuilder {
         555  +
    /// <p>The name of the SSM document.</p>
         556  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         557  +
        self.name = ::std::option::Option::Some(input.into());
         558  +
        self
         559  +
    }
         560  +
    /// <p>The name of the SSM document.</p>
         561  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         562  +
        self.name = input;
         563  +
        self
         564  +
    }
         565  +
    /// <p>The name of the SSM document.</p>
         566  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         567  +
        &self.name
         568  +
    }
         569  +
    /// <p>The date the SSM document was created.</p>
         570  +
    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         571  +
        self.created_date = ::std::option::Option::Some(input);
         572  +
        self
         573  +
    }
         574  +
    /// <p>The date the SSM document was created.</p>
         575  +
    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         576  +
        self.created_date = input;
         577  +
        self
         578  +
    }
         579  +
    /// <p>The date the SSM document was created.</p>
         580  +
    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         581  +
        &self.created_date
         582  +
    }
         583  +
    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
         584  +
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         585  +
        self.display_name = ::std::option::Option::Some(input.into());
         586  +
        self
         587  +
    }
         588  +
    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
         589  +
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         590  +
        self.display_name = input;
         591  +
        self
         592  +
    }
         593  +
    /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
         594  +
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
         595  +
        &self.display_name
         596  +
    }
         597  +
    /// <p>The Amazon Web Services user that created the document.</p>
         598  +
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         599  +
        self.owner = ::std::option::Option::Some(input.into());
         600  +
        self
         601  +
    }
         602  +
    /// <p>The Amazon Web Services user that created the document.</p>
         603  +
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         604  +
        self.owner = input;
         605  +
        self
         606  +
    }
         607  +
    /// <p>The Amazon Web Services user that created the document.</p>
         608  +
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
         609  +
        &self.owner
         610  +
    }
         611  +
    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
         612  +
    pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         613  +
        self.version_name = ::std::option::Option::Some(input.into());
         614  +
        self
         615  +
    }
         616  +
    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
         617  +
    pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         618  +
        self.version_name = input;
         619  +
        self
         620  +
    }
         621  +
    /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
         622  +
    pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
         623  +
        &self.version_name
         624  +
    }
         625  +
    /// Appends an item to `platform_types`.
         626  +
    ///
         627  +
    /// To override the contents of this collection use [`set_platform_types`](Self::set_platform_types).
         628  +
    ///
         629  +
    /// <p>The operating system platform.</p>
         630  +
    pub fn platform_types(mut self, input: crate::types::PlatformType) -> Self {
         631  +
        let mut v = self.platform_types.unwrap_or_default();
         632  +
        v.push(input);
         633  +
        self.platform_types = ::std::option::Option::Some(v);
         634  +
        self
         635  +
    }
         636  +
    /// <p>The operating system platform.</p>
         637  +
    pub fn set_platform_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>) -> Self {
         638  +
        self.platform_types = input;
         639  +
        self
         640  +
    }
         641  +
    /// <p>The operating system platform.</p>
         642  +
    pub fn get_platform_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlatformType>> {
         643  +
        &self.platform_types
         644  +
    }
         645  +
    /// <p>The document version.</p>
         646  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         647  +
        self.document_version = ::std::option::Option::Some(input.into());
         648  +
        self
         649  +
    }
         650  +
    /// <p>The document version.</p>
         651  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         652  +
        self.document_version = input;
         653  +
        self
         654  +
    }
         655  +
    /// <p>The document version.</p>
         656  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         657  +
        &self.document_version
         658  +
    }
         659  +
    /// <p>The document type.</p>
         660  +
    pub fn document_type(mut self, input: crate::types::DocumentType) -> Self {
         661  +
        self.document_type = ::std::option::Option::Some(input);
         662  +
        self
         663  +
    }
         664  +
    /// <p>The document type.</p>
         665  +
    pub fn set_document_type(mut self, input: ::std::option::Option<crate::types::DocumentType>) -> Self {
         666  +
        self.document_type = input;
         667  +
        self
         668  +
    }
         669  +
    /// <p>The document type.</p>
         670  +
    pub fn get_document_type(&self) -> &::std::option::Option<crate::types::DocumentType> {
         671  +
        &self.document_type
         672  +
    }
         673  +
    /// <p>The schema version.</p>
         674  +
    pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         675  +
        self.schema_version = ::std::option::Option::Some(input.into());
         676  +
        self
         677  +
    }
         678  +
    /// <p>The schema version.</p>
         679  +
    pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         680  +
        self.schema_version = input;
         681  +
        self
         682  +
    }
         683  +
    /// <p>The schema version.</p>
         684  +
    pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
         685  +
        &self.schema_version
         686  +
    }
         687  +
    /// <p>The document format, either JSON or YAML.</p>
         688  +
    pub fn document_format(mut self, input: crate::types::DocumentFormat) -> Self {
         689  +
        self.document_format = ::std::option::Option::Some(input);
         690  +
        self
         691  +
    }
         692  +
    /// <p>The document format, either JSON or YAML.</p>
         693  +
    pub fn set_document_format(mut self, input: ::std::option::Option<crate::types::DocumentFormat>) -> Self {
         694  +
        self.document_format = input;
         695  +
        self
         696  +
    }
         697  +
    /// <p>The document format, either JSON or YAML.</p>
         698  +
    pub fn get_document_format(&self) -> &::std::option::Option<crate::types::DocumentFormat> {
         699  +
        &self.document_format
         700  +
    }
         701  +
    /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
         702  +
    pub fn target_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         703  +
        self.target_type = ::std::option::Option::Some(input.into());
         704  +
        self
         705  +
    }
         706  +
    /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
         707  +
    pub fn set_target_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         708  +
        self.target_type = input;
         709  +
        self
         710  +
    }
         711  +
    /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
         712  +
    pub fn get_target_type(&self) -> &::std::option::Option<::std::string::String> {
         713  +
        &self.target_type
         714  +
    }
         715  +
    /// Appends an item to `tags`.
         716  +
    ///
         717  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         718  +
    ///
         719  +
    /// <p>The tags, or metadata, that have been applied to the document.</p>
         720  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         721  +
        let mut v = self.tags.unwrap_or_default();
         722  +
        v.push(input);
         723  +
        self.tags = ::std::option::Option::Some(v);
         724  +
        self
         725  +
    }
         726  +
    /// <p>The tags, or metadata, that have been applied to the document.</p>
         727  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         728  +
        self.tags = input;
         729  +
        self
         730  +
    }
         731  +
    /// <p>The tags, or metadata, that have been applied to the document.</p>
         732  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         733  +
        &self.tags
         734  +
    }
         735  +
    /// Appends an item to `requires`.
         736  +
    ///
         737  +
    /// To override the contents of this collection use [`set_requires`](Self::set_requires).
         738  +
    ///
         739  +
    /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
         740  +
    pub fn requires(mut self, input: crate::types::DocumentRequires) -> Self {
         741  +
        let mut v = self.requires.unwrap_or_default();
         742  +
        v.push(input);
         743  +
        self.requires = ::std::option::Option::Some(v);
         744  +
        self
         745  +
    }
         746  +
    /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
         747  +
    pub fn set_requires(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>) -> Self {
         748  +
        self.requires = input;
         749  +
        self
         750  +
    }
         751  +
    /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
         752  +
    pub fn get_requires(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>> {
         753  +
        &self.requires
         754  +
    }
         755  +
    /// <p>The current status of a document review.</p>
         756  +
    pub fn review_status(mut self, input: crate::types::ReviewStatus) -> Self {
         757  +
        self.review_status = ::std::option::Option::Some(input);
         758  +
        self
         759  +
    }
         760  +
    /// <p>The current status of a document review.</p>
         761  +
    pub fn set_review_status(mut self, input: ::std::option::Option<crate::types::ReviewStatus>) -> Self {
         762  +
        self.review_status = input;
         763  +
        self
         764  +
    }
         765  +
    /// <p>The current status of a document review.</p>
         766  +
    pub fn get_review_status(&self) -> &::std::option::Option<crate::types::ReviewStatus> {
         767  +
        &self.review_status
         768  +
    }
         769  +
    /// <p>The user in your organization who created the document.</p>
         770  +
    pub fn author(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         771  +
        self.author = ::std::option::Option::Some(input.into());
         772  +
        self
         773  +
    }
         774  +
    /// <p>The user in your organization who created the document.</p>
         775  +
    pub fn set_author(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         776  +
        self.author = input;
         777  +
        self
         778  +
    }
         779  +
    /// <p>The user in your organization who created the document.</p>
         780  +
    pub fn get_author(&self) -> &::std::option::Option<::std::string::String> {
         781  +
        &self.author
         782  +
    }
         783  +
    /// Consumes the builder and constructs a [`DocumentIdentifier`](crate::types::DocumentIdentifier).
         784  +
    pub fn build(self) -> crate::types::DocumentIdentifier {
         785  +
        crate::types::DocumentIdentifier {
         786  +
            name: self.name,
         787  +
            created_date: self.created_date,
         788  +
            display_name: self.display_name,
         789  +
            owner: self.owner,
         790  +
            version_name: self.version_name,
         791  +
            platform_types: self.platform_types,
         792  +
            document_version: self.document_version,
         793  +
            document_type: self.document_type,
         794  +
            schema_version: self.schema_version,
         795  +
            document_format: self.document_format,
         796  +
            target_type: self.target_type,
         797  +
            tags: self.tags,
         798  +
            requires: self.requires,
         799  +
            review_status: self.review_status,
         800  +
            author: self.author,
         801  +
        }
         802  +
    }
         803  +
}