AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b

Files changed:

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

@@ -0,1 +0,698 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about parameter usage.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
           6  +
pub struct ParameterHistory {
           7  +
    /// <p>The name of the parameter.</p>
           8  +
    pub name: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The type of parameter used.</p>
          10  +
    pub r#type: ::std::option::Option<crate::types::ParameterType>,
          11  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
          12  +
    pub key_id: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>Date the parameter was last changed or updated.</p>
          14  +
    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
          16  +
    pub last_modified_user: ::std::option::Option<::std::string::String>,
          17  +
    /// <p>Information about the parameter.</p>
          18  +
    pub description: ::std::option::Option<::std::string::String>,
          19  +
    /// <p>The parameter value.</p>
          20  +
    pub value: ::std::option::Option<::std::string::String>,
          21  +
    /// <p>Parameter names can include the following letters and symbols.</p>
          22  +
    /// <p>a-zA-Z0-9_.-</p>
          23  +
    pub allowed_pattern: ::std::option::Option<::std::string::String>,
          24  +
    /// <p>The parameter version.</p>
          25  +
    pub version: i64,
          26  +
    /// <p>Labels assigned to the parameter version.</p>
          27  +
    pub labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          28  +
    /// <p>The parameter tier.</p>
          29  +
    pub tier: ::std::option::Option<crate::types::ParameterTier>,
          30  +
    /// <p>Information about the policies assigned to a parameter.</p>
          31  +
    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          32  +
    pub policies: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>,
          33  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
          34  +
    pub data_type: ::std::option::Option<::std::string::String>,
          35  +
}
          36  +
impl ParameterHistory {
          37  +
    /// <p>The name of the parameter.</p>
          38  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          39  +
        self.name.as_deref()
          40  +
    }
          41  +
    /// <p>The type of parameter used.</p>
          42  +
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
          43  +
        self.r#type.as_ref()
          44  +
    }
          45  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
          46  +
    pub fn key_id(&self) -> ::std::option::Option<&str> {
          47  +
        self.key_id.as_deref()
          48  +
    }
          49  +
    /// <p>Date the parameter was last changed or updated.</p>
          50  +
    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          51  +
        self.last_modified_date.as_ref()
          52  +
    }
          53  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
          54  +
    pub fn last_modified_user(&self) -> ::std::option::Option<&str> {
          55  +
        self.last_modified_user.as_deref()
          56  +
    }
          57  +
    /// <p>Information about the parameter.</p>
          58  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          59  +
        self.description.as_deref()
          60  +
    }
          61  +
    /// <p>The parameter value.</p>
          62  +
    pub fn value(&self) -> ::std::option::Option<&str> {
          63  +
        self.value.as_deref()
          64  +
    }
          65  +
    /// <p>Parameter names can include the following letters and symbols.</p>
          66  +
    /// <p>a-zA-Z0-9_.-</p>
          67  +
    pub fn allowed_pattern(&self) -> ::std::option::Option<&str> {
          68  +
        self.allowed_pattern.as_deref()
          69  +
    }
          70  +
    /// <p>The parameter version.</p>
          71  +
    pub fn version(&self) -> i64 {
          72  +
        self.version
          73  +
    }
          74  +
    /// <p>Labels assigned to the parameter version.</p>
          75  +
    ///
          76  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.labels.is_none()`.
          77  +
    pub fn labels(&self) -> &[::std::string::String] {
          78  +
        self.labels.as_deref().unwrap_or_default()
          79  +
    }
          80  +
    /// <p>The parameter tier.</p>
          81  +
    pub fn tier(&self) -> ::std::option::Option<&crate::types::ParameterTier> {
          82  +
        self.tier.as_ref()
          83  +
    }
          84  +
    /// <p>Information about the policies assigned to a parameter.</p>
          85  +
    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</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 `.policies.is_none()`.
          88  +
    pub fn policies(&self) -> &[crate::types::ParameterInlinePolicy] {
          89  +
        self.policies.as_deref().unwrap_or_default()
          90  +
    }
          91  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
          92  +
    pub fn data_type(&self) -> ::std::option::Option<&str> {
          93  +
        self.data_type.as_deref()
          94  +
    }
          95  +
}
          96  +
impl ::std::fmt::Debug for ParameterHistory {
          97  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          98  +
        let mut formatter = f.debug_struct("ParameterHistory");
          99  +
        formatter.field("name", &self.name);
         100  +
        formatter.field("r#type", &self.r#type);
         101  +
        formatter.field("key_id", &self.key_id);
         102  +
        formatter.field("last_modified_date", &self.last_modified_date);
         103  +
        formatter.field("last_modified_user", &self.last_modified_user);
         104  +
        formatter.field("description", &self.description);
         105  +
        formatter.field("value", &"*** Sensitive Data Redacted ***");
         106  +
        formatter.field("allowed_pattern", &self.allowed_pattern);
         107  +
        formatter.field("version", &self.version);
         108  +
        formatter.field("labels", &self.labels);
         109  +
        formatter.field("tier", &self.tier);
         110  +
        formatter.field("policies", &self.policies);
         111  +
        formatter.field("data_type", &self.data_type);
         112  +
        formatter.finish()
         113  +
    }
         114  +
}
         115  +
static PARAMETERHISTORY_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         116  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Name", "com.amazonaws.ssm", "ParameterHistory"),
         117  +
    ::aws_smithy_schema::ShapeType::String,
         118  +
    "Name",
         119  +
    0,
         120  +
);
         121  +
static PARAMETERHISTORY_MEMBER_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         122  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Type", "com.amazonaws.ssm", "ParameterHistory"),
         123  +
    ::aws_smithy_schema::ShapeType::String,
         124  +
    "Type",
         125  +
    1,
         126  +
);
         127  +
static PARAMETERHISTORY_MEMBER_KEY_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         128  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$KeyId", "com.amazonaws.ssm", "ParameterHistory"),
         129  +
    ::aws_smithy_schema::ShapeType::String,
         130  +
    "KeyId",
         131  +
    2,
         132  +
);
         133  +
static PARAMETERHISTORY_MEMBER_LAST_MODIFIED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         134  +
    ::aws_smithy_schema::ShapeId::from_parts(
         135  +
        "com.amazonaws.ssm#ParameterHistory$LastModifiedDate",
         136  +
        "com.amazonaws.ssm",
         137  +
        "ParameterHistory",
         138  +
    ),
         139  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         140  +
    "LastModifiedDate",
         141  +
    3,
         142  +
);
         143  +
static PARAMETERHISTORY_MEMBER_LAST_MODIFIED_USER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         144  +
    ::aws_smithy_schema::ShapeId::from_parts(
         145  +
        "com.amazonaws.ssm#ParameterHistory$LastModifiedUser",
         146  +
        "com.amazonaws.ssm",
         147  +
        "ParameterHistory",
         148  +
    ),
         149  +
    ::aws_smithy_schema::ShapeType::String,
         150  +
    "LastModifiedUser",
         151  +
    4,
         152  +
);
         153  +
static PARAMETERHISTORY_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         154  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Description", "com.amazonaws.ssm", "ParameterHistory"),
         155  +
    ::aws_smithy_schema::ShapeType::String,
         156  +
    "Description",
         157  +
    5,
         158  +
);
         159  +
static PARAMETERHISTORY_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         160  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Value", "com.amazonaws.ssm", "ParameterHistory"),
         161  +
    ::aws_smithy_schema::ShapeType::String,
         162  +
    "Value",
         163  +
    6,
         164  +
);
         165  +
static PARAMETERHISTORY_MEMBER_ALLOWED_PATTERN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         166  +
    ::aws_smithy_schema::ShapeId::from_parts(
         167  +
        "com.amazonaws.ssm#ParameterHistory$AllowedPattern",
         168  +
        "com.amazonaws.ssm",
         169  +
        "ParameterHistory",
         170  +
    ),
         171  +
    ::aws_smithy_schema::ShapeType::String,
         172  +
    "AllowedPattern",
         173  +
    7,
         174  +
);
         175  +
static PARAMETERHISTORY_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         176  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Version", "com.amazonaws.ssm", "ParameterHistory"),
         177  +
    ::aws_smithy_schema::ShapeType::Long,
         178  +
    "Version",
         179  +
    8,
         180  +
);
         181  +
static PARAMETERHISTORY_MEMBER_LABELS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         182  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterLabelList$member", "com.amazonaws.ssm", "ParameterLabelList"),
         183  +
    ::aws_smithy_schema::ShapeType::String,
         184  +
    "member",
         185  +
    0,
         186  +
);
         187  +
static PARAMETERHISTORY_MEMBER_LABELS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         188  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Labels", "com.amazonaws.ssm", "ParameterHistory"),
         189  +
    ::aws_smithy_schema::ShapeType::List,
         190  +
    "Labels",
         191  +
    9,
         192  +
)
         193  +
.with_list_member(&PARAMETERHISTORY_MEMBER_LABELS_MEMBER);
         194  +
static PARAMETERHISTORY_MEMBER_TIER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         195  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Tier", "com.amazonaws.ssm", "ParameterHistory"),
         196  +
    ::aws_smithy_schema::ShapeType::String,
         197  +
    "Tier",
         198  +
    10,
         199  +
);
         200  +
static PARAMETERHISTORY_MEMBER_POLICIES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         201  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterPolicyList$member", "com.amazonaws.ssm", "ParameterPolicyList"),
         202  +
    ::aws_smithy_schema::ShapeType::Structure,
         203  +
    "member",
         204  +
    0,
         205  +
);
         206  +
static PARAMETERHISTORY_MEMBER_POLICIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         207  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Policies", "com.amazonaws.ssm", "ParameterHistory"),
         208  +
    ::aws_smithy_schema::ShapeType::List,
         209  +
    "Policies",
         210  +
    11,
         211  +
)
         212  +
.with_list_member(&PARAMETERHISTORY_MEMBER_POLICIES_MEMBER);
         213  +
static PARAMETERHISTORY_MEMBER_DATA_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         214  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$DataType", "com.amazonaws.ssm", "ParameterHistory"),
         215  +
    ::aws_smithy_schema::ShapeType::String,
         216  +
    "DataType",
         217  +
    12,
         218  +
);
         219  +
static PARAMETERHISTORY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         220  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory", "com.amazonaws.ssm", "ParameterHistory"),
         221  +
    ::aws_smithy_schema::ShapeType::Structure,
         222  +
    &[
         223  +
        &PARAMETERHISTORY_MEMBER_NAME,
         224  +
        &PARAMETERHISTORY_MEMBER_TYPE,
         225  +
        &PARAMETERHISTORY_MEMBER_KEY_ID,
         226  +
        &PARAMETERHISTORY_MEMBER_LAST_MODIFIED_DATE,
         227  +
        &PARAMETERHISTORY_MEMBER_LAST_MODIFIED_USER,
         228  +
        &PARAMETERHISTORY_MEMBER_DESCRIPTION,
         229  +
        &PARAMETERHISTORY_MEMBER_VALUE,
         230  +
        &PARAMETERHISTORY_MEMBER_ALLOWED_PATTERN,
         231  +
        &PARAMETERHISTORY_MEMBER_VERSION,
         232  +
        &PARAMETERHISTORY_MEMBER_LABELS,
         233  +
        &PARAMETERHISTORY_MEMBER_TIER,
         234  +
        &PARAMETERHISTORY_MEMBER_POLICIES,
         235  +
        &PARAMETERHISTORY_MEMBER_DATA_TYPE,
         236  +
    ],
         237  +
);
         238  +
impl ParameterHistory {
         239  +
    /// The schema for this shape.
         240  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARAMETERHISTORY_SCHEMA;
         241  +
}
         242  +
impl ::aws_smithy_schema::serde::SerializableStruct for ParameterHistory {
         243  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         244  +
    fn serialize_members(
         245  +
        &self,
         246  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         247  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         248  +
        if let Some(ref val) = self.name {
         249  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_NAME, val)?;
         250  +
        }
         251  +
        if let Some(ref val) = self.r#type {
         252  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_TYPE, val.as_str())?;
         253  +
        }
         254  +
        if let Some(ref val) = self.key_id {
         255  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_KEY_ID, val)?;
         256  +
        }
         257  +
        if let Some(ref val) = self.last_modified_date {
         258  +
            ser.write_timestamp(&PARAMETERHISTORY_MEMBER_LAST_MODIFIED_DATE, val)?;
         259  +
        }
         260  +
        if let Some(ref val) = self.last_modified_user {
         261  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_LAST_MODIFIED_USER, val)?;
         262  +
        }
         263  +
        if let Some(ref val) = self.description {
         264  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_DESCRIPTION, val)?;
         265  +
        }
         266  +
        if let Some(ref val) = self.value {
         267  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_VALUE, val)?;
         268  +
        }
         269  +
        if let Some(ref val) = self.allowed_pattern {
         270  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_ALLOWED_PATTERN, val)?;
         271  +
        }
         272  +
        {
         273  +
            let val = &self.version;
         274  +
            ser.write_long(&PARAMETERHISTORY_MEMBER_VERSION, *val)?;
         275  +
        }
         276  +
        if let Some(ref val) = self.labels {
         277  +
            ser.write_list(
         278  +
                &PARAMETERHISTORY_MEMBER_LABELS,
         279  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         280  +
                    for item in val {
         281  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         282  +
                    }
         283  +
                    Ok(())
         284  +
                },
         285  +
            )?;
         286  +
        }
         287  +
        if let Some(ref val) = self.tier {
         288  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_TIER, val.as_str())?;
         289  +
        }
         290  +
        if let Some(ref val) = self.policies {
         291  +
            ser.write_list(
         292  +
                &PARAMETERHISTORY_MEMBER_POLICIES,
         293  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         294  +
                    for item in val {
         295  +
                        ser.write_struct(crate::types::ParameterInlinePolicy::SCHEMA, item)?;
         296  +
                    }
         297  +
                    Ok(())
         298  +
                },
         299  +
            )?;
         300  +
        }
         301  +
        if let Some(ref val) = self.data_type {
         302  +
            ser.write_string(&PARAMETERHISTORY_MEMBER_DATA_TYPE, val)?;
         303  +
        }
         304  +
        Ok(())
         305  +
    }
         306  +
}
         307  +
impl ParameterHistory {
         308  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         309  +
    pub fn deserialize(
         310  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         311  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         312  +
        #[allow(unused_variables, unused_mut)]
         313  +
        let mut builder = Self::builder();
         314  +
        #[allow(
         315  +
            unused_variables,
         316  +
            unreachable_code,
         317  +
            clippy::single_match,
         318  +
            clippy::match_single_binding,
         319  +
            clippy::diverging_sub_expression
         320  +
        )]
         321  +
        deserializer.read_struct(&PARAMETERHISTORY_SCHEMA, &mut |member, deser| {
         322  +
            match member.member_index() {
         323  +
                Some(0) => {
         324  +
                    if deser.is_null() {
         325  +
                        deser.read_null()?;
         326  +
                    } else {
         327  +
                        builder.name = Some(deser.read_string(member)?);
         328  +
                    }
         329  +
                }
         330  +
                Some(1) => {
         331  +
                    if deser.is_null() {
         332  +
                        deser.read_null()?;
         333  +
                    } else {
         334  +
                        builder.r#type = Some(crate::types::ParameterType::from(deser.read_string(member)?.as_str()));
         335  +
                    }
         336  +
                }
         337  +
                Some(2) => {
         338  +
                    if deser.is_null() {
         339  +
                        deser.read_null()?;
         340  +
                    } else {
         341  +
                        builder.key_id = Some(deser.read_string(member)?);
         342  +
                    }
         343  +
                }
         344  +
                Some(3) => {
         345  +
                    if deser.is_null() {
         346  +
                        deser.read_null()?;
         347  +
                    } else {
         348  +
                        builder.last_modified_date = Some(deser.read_timestamp(member)?);
         349  +
                    }
         350  +
                }
         351  +
                Some(4) => {
         352  +
                    if deser.is_null() {
         353  +
                        deser.read_null()?;
         354  +
                    } else {
         355  +
                        builder.last_modified_user = Some(deser.read_string(member)?);
         356  +
                    }
         357  +
                }
         358  +
                Some(5) => {
         359  +
                    if deser.is_null() {
         360  +
                        deser.read_null()?;
         361  +
                    } else {
         362  +
                        builder.description = Some(deser.read_string(member)?);
         363  +
                    }
         364  +
                }
         365  +
                Some(6) => {
         366  +
                    if deser.is_null() {
         367  +
                        deser.read_null()?;
         368  +
                    } else {
         369  +
                        builder.value = Some(deser.read_string(member)?);
         370  +
                    }
         371  +
                }
         372  +
                Some(7) => {
         373  +
                    if deser.is_null() {
         374  +
                        deser.read_null()?;
         375  +
                    } else {
         376  +
                        builder.allowed_pattern = Some(deser.read_string(member)?);
         377  +
                    }
         378  +
                }
         379  +
                Some(8) => {
         380  +
                    builder.version = Some(deser.read_long(member)?);
         381  +
                }
         382  +
                Some(9) => {
         383  +
                    if deser.is_null() {
         384  +
                        deser.read_null()?;
         385  +
                    } else {
         386  +
                        builder.labels = Some(deser.read_string_list(member)?);
         387  +
                    }
         388  +
                }
         389  +
                Some(10) => {
         390  +
                    if deser.is_null() {
         391  +
                        deser.read_null()?;
         392  +
                    } else {
         393  +
                        builder.tier = Some(crate::types::ParameterTier::from(deser.read_string(member)?.as_str()));
         394  +
                    }
         395  +
                }
         396  +
                Some(11) => {
         397  +
                    if deser.is_null() {
         398  +
                        deser.read_null()?;
         399  +
                    } else {
         400  +
                        builder.policies = Some({
         401  +
                            let mut container = Vec::new();
         402  +
                            deser.read_list(member, &mut |deser| {
         403  +
                                container.push(crate::types::ParameterInlinePolicy::deserialize(deser)?);
         404  +
                                Ok(())
         405  +
                            })?;
         406  +
                            container
         407  +
                        });
         408  +
                    }
         409  +
                }
         410  +
                Some(12) => {
         411  +
                    if deser.is_null() {
         412  +
                        deser.read_null()?;
         413  +
                    } else {
         414  +
                        builder.data_type = Some(deser.read_string(member)?);
         415  +
                    }
         416  +
                }
         417  +
                _ => {}
         418  +
            }
         419  +
            Ok(())
         420  +
        })?;
         421  +
        Ok(builder.build())
         422  +
    }
         423  +
}
         424  +
impl ParameterHistory {
         425  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         426  +
    pub fn deserialize_with_response(
         427  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         428  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         429  +
        _status: u16,
         430  +
        _body: &[u8],
         431  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         432  +
        Self::deserialize(deserializer)
         433  +
    }
         434  +
}
         435  +
impl ParameterHistory {
         436  +
    /// Creates a new builder-style object to manufacture [`ParameterHistory`](crate::types::ParameterHistory).
         437  +
    pub fn builder() -> crate::types::builders::ParameterHistoryBuilder {
         438  +
        crate::types::builders::ParameterHistoryBuilder::default()
         439  +
    }
         440  +
}
         441  +
         442  +
/// A builder for [`ParameterHistory`](crate::types::ParameterHistory).
         443  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         444  +
#[non_exhaustive]
         445  +
pub struct ParameterHistoryBuilder {
         446  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         447  +
    pub(crate) r#type: ::std::option::Option<crate::types::ParameterType>,
         448  +
    pub(crate) key_id: ::std::option::Option<::std::string::String>,
         449  +
    pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         450  +
    pub(crate) last_modified_user: ::std::option::Option<::std::string::String>,
         451  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         452  +
    pub(crate) value: ::std::option::Option<::std::string::String>,
         453  +
    pub(crate) allowed_pattern: ::std::option::Option<::std::string::String>,
         454  +
    pub(crate) version: ::std::option::Option<i64>,
         455  +
    pub(crate) labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         456  +
    pub(crate) tier: ::std::option::Option<crate::types::ParameterTier>,
         457  +
    pub(crate) policies: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>,
         458  +
    pub(crate) data_type: ::std::option::Option<::std::string::String>,
         459  +
}
         460  +
impl ParameterHistoryBuilder {
         461  +
    /// <p>The name of the parameter.</p>
         462  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         463  +
        self.name = ::std::option::Option::Some(input.into());
         464  +
        self
         465  +
    }
         466  +
    /// <p>The name of the parameter.</p>
         467  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         468  +
        self.name = input;
         469  +
        self
         470  +
    }
         471  +
    /// <p>The name of the parameter.</p>
         472  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         473  +
        &self.name
         474  +
    }
         475  +
    /// <p>The type of parameter used.</p>
         476  +
    pub fn r#type(mut self, input: crate::types::ParameterType) -> Self {
         477  +
        self.r#type = ::std::option::Option::Some(input);
         478  +
        self
         479  +
    }
         480  +
    /// <p>The type of parameter used.</p>
         481  +
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
         482  +
        self.r#type = input;
         483  +
        self
         484  +
    }
         485  +
    /// <p>The type of parameter used.</p>
         486  +
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
         487  +
        &self.r#type
         488  +
    }
         489  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
         490  +
    pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         491  +
        self.key_id = ::std::option::Option::Some(input.into());
         492  +
        self
         493  +
    }
         494  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
         495  +
    pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         496  +
        self.key_id = input;
         497  +
        self
         498  +
    }
         499  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
         500  +
    pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
         501  +
        &self.key_id
         502  +
    }
         503  +
    /// <p>Date the parameter was last changed or updated.</p>
         504  +
    pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         505  +
        self.last_modified_date = ::std::option::Option::Some(input);
         506  +
        self
         507  +
    }
         508  +
    /// <p>Date the parameter was last changed or updated.</p>
         509  +
    pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         510  +
        self.last_modified_date = input;
         511  +
        self
         512  +
    }
         513  +
    /// <p>Date the parameter was last changed or updated.</p>
         514  +
    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         515  +
        &self.last_modified_date
         516  +
    }
         517  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
         518  +
    pub fn last_modified_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         519  +
        self.last_modified_user = ::std::option::Option::Some(input.into());
         520  +
        self
         521  +
    }
         522  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
         523  +
    pub fn set_last_modified_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         524  +
        self.last_modified_user = input;
         525  +
        self
         526  +
    }
         527  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
         528  +
    pub fn get_last_modified_user(&self) -> &::std::option::Option<::std::string::String> {
         529  +
        &self.last_modified_user
         530  +
    }
         531  +
    /// <p>Information about the parameter.</p>
         532  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         533  +
        self.description = ::std::option::Option::Some(input.into());
         534  +
        self
         535  +
    }
         536  +
    /// <p>Information about the parameter.</p>
         537  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         538  +
        self.description = input;
         539  +
        self
         540  +
    }
         541  +
    /// <p>Information about the parameter.</p>
         542  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         543  +
        &self.description
         544  +
    }
         545  +
    /// <p>The parameter value.</p>
         546  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         547  +
        self.value = ::std::option::Option::Some(input.into());
         548  +
        self
         549  +
    }
         550  +
    /// <p>The parameter value.</p>
         551  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         552  +
        self.value = input;
         553  +
        self
         554  +
    }
         555  +
    /// <p>The parameter value.</p>
         556  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         557  +
        &self.value
         558  +
    }
         559  +
    /// <p>Parameter names can include the following letters and symbols.</p>
         560  +
    /// <p>a-zA-Z0-9_.-</p>
         561  +
    pub fn allowed_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         562  +
        self.allowed_pattern = ::std::option::Option::Some(input.into());
         563  +
        self
         564  +
    }
         565  +
    /// <p>Parameter names can include the following letters and symbols.</p>
         566  +
    /// <p>a-zA-Z0-9_.-</p>
         567  +
    pub fn set_allowed_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         568  +
        self.allowed_pattern = input;
         569  +
        self
         570  +
    }
         571  +
    /// <p>Parameter names can include the following letters and symbols.</p>
         572  +
    /// <p>a-zA-Z0-9_.-</p>
         573  +
    pub fn get_allowed_pattern(&self) -> &::std::option::Option<::std::string::String> {
         574  +
        &self.allowed_pattern
         575  +
    }
         576  +
    /// <p>The parameter version.</p>
         577  +
    pub fn version(mut self, input: i64) -> Self {
         578  +
        self.version = ::std::option::Option::Some(input);
         579  +
        self
         580  +
    }
         581  +
    /// <p>The parameter version.</p>
         582  +
    pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
         583  +
        self.version = input;
         584  +
        self
         585  +
    }
         586  +
    /// <p>The parameter version.</p>
         587  +
    pub fn get_version(&self) -> &::std::option::Option<i64> {
         588  +
        &self.version
         589  +
    }
         590  +
    /// Appends an item to `labels`.
         591  +
    ///
         592  +
    /// To override the contents of this collection use [`set_labels`](Self::set_labels).
         593  +
    ///
         594  +
    /// <p>Labels assigned to the parameter version.</p>
         595  +
    pub fn labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         596  +
        let mut v = self.labels.unwrap_or_default();
         597  +
        v.push(input.into());
         598  +
        self.labels = ::std::option::Option::Some(v);
         599  +
        self
         600  +
    }
         601  +
    /// <p>Labels assigned to the parameter version.</p>
         602  +
    pub fn set_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         603  +
        self.labels = input;
         604  +
        self
         605  +
    }
         606  +
    /// <p>Labels assigned to the parameter version.</p>
         607  +
    pub fn get_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         608  +
        &self.labels
         609  +
    }
         610  +
    /// <p>The parameter tier.</p>
         611  +
    pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
         612  +
        self.tier = ::std::option::Option::Some(input);
         613  +
        self
         614  +
    }
         615  +
    /// <p>The parameter tier.</p>
         616  +
    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
         617  +
        self.tier = input;
         618  +
        self
         619  +
    }
         620  +
    /// <p>The parameter tier.</p>
         621  +
    pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
         622  +
        &self.tier
         623  +
    }
         624  +
    /// Appends an item to `policies`.
         625  +
    ///
         626  +
    /// To override the contents of this collection use [`set_policies`](Self::set_policies).
         627  +
    ///
         628  +
    /// <p>Information about the policies assigned to a parameter.</p>
         629  +
    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         630  +
    pub fn policies(mut self, input: crate::types::ParameterInlinePolicy) -> Self {
         631  +
        let mut v = self.policies.unwrap_or_default();
         632  +
        v.push(input);
         633  +
        self.policies = ::std::option::Option::Some(v);
         634  +
        self
         635  +
    }
         636  +
    /// <p>Information about the policies assigned to a parameter.</p>
         637  +
    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         638  +
    pub fn set_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>) -> Self {
         639  +
        self.policies = input;
         640  +
        self
         641  +
    }
         642  +
    /// <p>Information about the policies assigned to a parameter.</p>
         643  +
    /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         644  +
    pub fn get_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>> {
         645  +
        &self.policies
         646  +
    }
         647  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
         648  +
    pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         649  +
        self.data_type = ::std::option::Option::Some(input.into());
         650  +
        self
         651  +
    }
         652  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
         653  +
    pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         654  +
        self.data_type = input;
         655  +
        self
         656  +
    }
         657  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
         658  +
    pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
         659  +
        &self.data_type
         660  +
    }
         661  +
    /// Consumes the builder and constructs a [`ParameterHistory`](crate::types::ParameterHistory).
         662  +
    pub fn build(self) -> crate::types::ParameterHistory {
         663  +
        crate::types::ParameterHistory {
         664  +
            name: self.name,
         665  +
            r#type: self.r#type,
         666  +
            key_id: self.key_id,
         667  +
            last_modified_date: self.last_modified_date,
         668  +
            last_modified_user: self.last_modified_user,
         669  +
            description: self.description,
         670  +
            value: self.value,
         671  +
            allowed_pattern: self.allowed_pattern,
         672  +
            version: self.version.unwrap_or_default(),
         673  +
            labels: self.labels,
         674  +
            tier: self.tier,
         675  +
            policies: self.policies,
         676  +
            data_type: self.data_type,
         677  +
        }
         678  +
    }
         679  +
}
         680  +
impl ::std::fmt::Debug for ParameterHistoryBuilder {
         681  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         682  +
        let mut formatter = f.debug_struct("ParameterHistoryBuilder");
         683  +
        formatter.field("name", &self.name);
         684  +
        formatter.field("r#type", &self.r#type);
         685  +
        formatter.field("key_id", &self.key_id);
         686  +
        formatter.field("last_modified_date", &self.last_modified_date);
         687  +
        formatter.field("last_modified_user", &self.last_modified_user);
         688  +
        formatter.field("description", &self.description);
         689  +
        formatter.field("value", &"*** Sensitive Data Redacted ***");
         690  +
        formatter.field("allowed_pattern", &self.allowed_pattern);
         691  +
        formatter.field("version", &self.version);
         692  +
        formatter.field("labels", &self.labels);
         693  +
        formatter.field("tier", &self.tier);
         694  +
        formatter.field("policies", &self.policies);
         695  +
        formatter.field("data_type", &self.data_type);
         696  +
        formatter.finish()
         697  +
    }
         698  +
}

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

@@ -0,1 +0,210 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>One or more policies assigned to a parameter.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ParameterInlinePolicy {
           7  +
    /// <p>The JSON text of the policy.</p>
           8  +
    pub policy_text: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The type of policy. Parameter Store, a tool in Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.</p>
          10  +
    pub policy_type: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't applied), or InProgress (the policy is being applied now).</p>
          12  +
    pub policy_status: ::std::option::Option<::std::string::String>,
          13  +
}
          14  +
impl ParameterInlinePolicy {
          15  +
    /// <p>The JSON text of the policy.</p>
          16  +
    pub fn policy_text(&self) -> ::std::option::Option<&str> {
          17  +
        self.policy_text.as_deref()
          18  +
    }
          19  +
    /// <p>The type of policy. Parameter Store, a tool in Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.</p>
          20  +
    pub fn policy_type(&self) -> ::std::option::Option<&str> {
          21  +
        self.policy_type.as_deref()
          22  +
    }
          23  +
    /// <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't applied), or InProgress (the policy is being applied now).</p>
          24  +
    pub fn policy_status(&self) -> ::std::option::Option<&str> {
          25  +
        self.policy_status.as_deref()
          26  +
    }
          27  +
}
          28  +
static PARAMETERINLINEPOLICY_MEMBER_POLICY_TEXT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          29  +
    ::aws_smithy_schema::ShapeId::from_parts(
          30  +
        "com.amazonaws.ssm#ParameterInlinePolicy$PolicyText",
          31  +
        "com.amazonaws.ssm",
          32  +
        "ParameterInlinePolicy",
          33  +
    ),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "PolicyText",
          36  +
    0,
          37  +
);
          38  +
static PARAMETERINLINEPOLICY_MEMBER_POLICY_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          39  +
    ::aws_smithy_schema::ShapeId::from_parts(
          40  +
        "com.amazonaws.ssm#ParameterInlinePolicy$PolicyType",
          41  +
        "com.amazonaws.ssm",
          42  +
        "ParameterInlinePolicy",
          43  +
    ),
          44  +
    ::aws_smithy_schema::ShapeType::String,
          45  +
    "PolicyType",
          46  +
    1,
          47  +
);
          48  +
static PARAMETERINLINEPOLICY_MEMBER_POLICY_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm#ParameterInlinePolicy$PolicyStatus",
          51  +
        "com.amazonaws.ssm",
          52  +
        "ParameterInlinePolicy",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::String,
          55  +
    "PolicyStatus",
          56  +
    2,
          57  +
);
          58  +
static PARAMETERINLINEPOLICY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterInlinePolicy", "com.amazonaws.ssm", "ParameterInlinePolicy"),
          60  +
    ::aws_smithy_schema::ShapeType::Structure,
          61  +
    &[
          62  +
        &PARAMETERINLINEPOLICY_MEMBER_POLICY_TEXT,
          63  +
        &PARAMETERINLINEPOLICY_MEMBER_POLICY_TYPE,
          64  +
        &PARAMETERINLINEPOLICY_MEMBER_POLICY_STATUS,
          65  +
    ],
          66  +
);
          67  +
impl ParameterInlinePolicy {
          68  +
    /// The schema for this shape.
          69  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARAMETERINLINEPOLICY_SCHEMA;
          70  +
}
          71  +
impl ::aws_smithy_schema::serde::SerializableStruct for ParameterInlinePolicy {
          72  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          73  +
    fn serialize_members(
          74  +
        &self,
          75  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          76  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          77  +
        if let Some(ref val) = self.policy_text {
          78  +
            ser.write_string(&PARAMETERINLINEPOLICY_MEMBER_POLICY_TEXT, val)?;
          79  +
        }
          80  +
        if let Some(ref val) = self.policy_type {
          81  +
            ser.write_string(&PARAMETERINLINEPOLICY_MEMBER_POLICY_TYPE, val)?;
          82  +
        }
          83  +
        if let Some(ref val) = self.policy_status {
          84  +
            ser.write_string(&PARAMETERINLINEPOLICY_MEMBER_POLICY_STATUS, val)?;
          85  +
        }
          86  +
        Ok(())
          87  +
    }
          88  +
}
          89  +
impl ParameterInlinePolicy {
          90  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          91  +
    pub fn deserialize(
          92  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          93  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          94  +
        #[allow(unused_variables, unused_mut)]
          95  +
        let mut builder = Self::builder();
          96  +
        #[allow(
          97  +
            unused_variables,
          98  +
            unreachable_code,
          99  +
            clippy::single_match,
         100  +
            clippy::match_single_binding,
         101  +
            clippy::diverging_sub_expression
         102  +
        )]
         103  +
        deserializer.read_struct(&PARAMETERINLINEPOLICY_SCHEMA, &mut |member, deser| {
         104  +
            match member.member_index() {
         105  +
                Some(0) => {
         106  +
                    if deser.is_null() {
         107  +
                        deser.read_null()?;
         108  +
                    } else {
         109  +
                        builder.policy_text = Some(deser.read_string(member)?);
         110  +
                    }
         111  +
                }
         112  +
                Some(1) => {
         113  +
                    if deser.is_null() {
         114  +
                        deser.read_null()?;
         115  +
                    } else {
         116  +
                        builder.policy_type = Some(deser.read_string(member)?);
         117  +
                    }
         118  +
                }
         119  +
                Some(2) => {
         120  +
                    if deser.is_null() {
         121  +
                        deser.read_null()?;
         122  +
                    } else {
         123  +
                        builder.policy_status = Some(deser.read_string(member)?);
         124  +
                    }
         125  +
                }
         126  +
                _ => {}
         127  +
            }
         128  +
            Ok(())
         129  +
        })?;
         130  +
        Ok(builder.build())
         131  +
    }
         132  +
}
         133  +
impl ParameterInlinePolicy {
         134  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        Self::deserialize(deserializer)
         142  +
    }
         143  +
}
         144  +
impl ParameterInlinePolicy {
         145  +
    /// Creates a new builder-style object to manufacture [`ParameterInlinePolicy`](crate::types::ParameterInlinePolicy).
         146  +
    pub fn builder() -> crate::types::builders::ParameterInlinePolicyBuilder {
         147  +
        crate::types::builders::ParameterInlinePolicyBuilder::default()
         148  +
    }
         149  +
}
         150  +
         151  +
/// A builder for [`ParameterInlinePolicy`](crate::types::ParameterInlinePolicy).
         152  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         153  +
#[non_exhaustive]
         154  +
pub struct ParameterInlinePolicyBuilder {
         155  +
    pub(crate) policy_text: ::std::option::Option<::std::string::String>,
         156  +
    pub(crate) policy_type: ::std::option::Option<::std::string::String>,
         157  +
    pub(crate) policy_status: ::std::option::Option<::std::string::String>,
         158  +
}
         159  +
impl ParameterInlinePolicyBuilder {
         160  +
    /// <p>The JSON text of the policy.</p>
         161  +
    pub fn policy_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         162  +
        self.policy_text = ::std::option::Option::Some(input.into());
         163  +
        self
         164  +
    }
         165  +
    /// <p>The JSON text of the policy.</p>
         166  +
    pub fn set_policy_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         167  +
        self.policy_text = input;
         168  +
        self
         169  +
    }
         170  +
    /// <p>The JSON text of the policy.</p>
         171  +
    pub fn get_policy_text(&self) -> &::std::option::Option<::std::string::String> {
         172  +
        &self.policy_text
         173  +
    }
         174  +
    /// <p>The type of policy. Parameter Store, a tool in Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.</p>
         175  +
    pub fn policy_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         176  +
        self.policy_type = ::std::option::Option::Some(input.into());
         177  +
        self
         178  +
    }
         179  +
    /// <p>The type of policy. Parameter Store, a tool in Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.</p>
         180  +
    pub fn set_policy_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         181  +
        self.policy_type = input;
         182  +
        self
         183  +
    }
         184  +
    /// <p>The type of policy. Parameter Store, a tool in Amazon Web Services Systems Manager, supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.</p>
         185  +
    pub fn get_policy_type(&self) -> &::std::option::Option<::std::string::String> {
         186  +
        &self.policy_type
         187  +
    }
         188  +
    /// <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't applied), or InProgress (the policy is being applied now).</p>
         189  +
    pub fn policy_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         190  +
        self.policy_status = ::std::option::Option::Some(input.into());
         191  +
        self
         192  +
    }
         193  +
    /// <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't applied), or InProgress (the policy is being applied now).</p>
         194  +
    pub fn set_policy_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         195  +
        self.policy_status = input;
         196  +
        self
         197  +
    }
         198  +
    /// <p>The status of the policy. Policies report the following statuses: Pending (the policy hasn't been enforced or applied yet), Finished (the policy was applied), Failed (the policy wasn't applied), or InProgress (the policy is being applied now).</p>
         199  +
    pub fn get_policy_status(&self) -> &::std::option::Option<::std::string::String> {
         200  +
        &self.policy_status
         201  +
    }
         202  +
    /// Consumes the builder and constructs a [`ParameterInlinePolicy`](crate::types::ParameterInlinePolicy).
         203  +
    pub fn build(self) -> crate::types::ParameterInlinePolicy {
         204  +
        crate::types::ParameterInlinePolicy {
         205  +
            policy_text: self.policy_text,
         206  +
            policy_type: self.policy_type,
         207  +
            policy_status: self.policy_status,
         208  +
        }
         209  +
    }
         210  +
}

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

@@ -0,1 +0,597 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Metadata includes information like the Amazon Resource Name (ARN) of the last user to update the parameter and the date and time the parameter was last used.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ParameterMetadata {
           7  +
    /// <p>The parameter name.</p>
           8  +
    pub name: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
          10  +
    pub arn: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The type of parameter. Valid parameter types include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p>
          12  +
    pub r#type: ::std::option::Option<crate::types::ParameterType>,
          13  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only.</p>
          14  +
    pub key_id: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>Date the parameter was last changed or updated.</p>
          16  +
    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          17  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
          18  +
    pub last_modified_user: ::std::option::Option<::std::string::String>,
          19  +
    /// <p>Description of the parameter actions.</p>
          20  +
    pub description: ::std::option::Option<::std::string::String>,
          21  +
    /// <p>A parameter name can include only the following letters and symbols.</p>
          22  +
    /// <p>a-zA-Z0-9_.-</p>
          23  +
    pub allowed_pattern: ::std::option::Option<::std::string::String>,
          24  +
    /// <p>The parameter version.</p>
          25  +
    pub version: i64,
          26  +
    /// <p>The parameter tier.</p>
          27  +
    pub tier: ::std::option::Option<crate::types::ParameterTier>,
          28  +
    /// <p>A list of policies associated with a parameter.</p>
          29  +
    pub policies: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>,
          30  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
          31  +
    pub data_type: ::std::option::Option<::std::string::String>,
          32  +
}
          33  +
impl ParameterMetadata {
          34  +
    /// <p>The parameter name.</p>
          35  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          36  +
        self.name.as_deref()
          37  +
    }
          38  +
    /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
          39  +
    pub fn arn(&self) -> ::std::option::Option<&str> {
          40  +
        self.arn.as_deref()
          41  +
    }
          42  +
    /// <p>The type of parameter. Valid parameter types include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p>
          43  +
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
          44  +
        self.r#type.as_ref()
          45  +
    }
          46  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only.</p>
          47  +
    pub fn key_id(&self) -> ::std::option::Option<&str> {
          48  +
        self.key_id.as_deref()
          49  +
    }
          50  +
    /// <p>Date the parameter was last changed or updated.</p>
          51  +
    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          52  +
        self.last_modified_date.as_ref()
          53  +
    }
          54  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
          55  +
    pub fn last_modified_user(&self) -> ::std::option::Option<&str> {
          56  +
        self.last_modified_user.as_deref()
          57  +
    }
          58  +
    /// <p>Description of the parameter actions.</p>
          59  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          60  +
        self.description.as_deref()
          61  +
    }
          62  +
    /// <p>A parameter name can include only the following letters and symbols.</p>
          63  +
    /// <p>a-zA-Z0-9_.-</p>
          64  +
    pub fn allowed_pattern(&self) -> ::std::option::Option<&str> {
          65  +
        self.allowed_pattern.as_deref()
          66  +
    }
          67  +
    /// <p>The parameter version.</p>
          68  +
    pub fn version(&self) -> i64 {
          69  +
        self.version
          70  +
    }
          71  +
    /// <p>The parameter tier.</p>
          72  +
    pub fn tier(&self) -> ::std::option::Option<&crate::types::ParameterTier> {
          73  +
        self.tier.as_ref()
          74  +
    }
          75  +
    /// <p>A list of policies associated with a parameter.</p>
          76  +
    ///
          77  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.policies.is_none()`.
          78  +
    pub fn policies(&self) -> &[crate::types::ParameterInlinePolicy] {
          79  +
        self.policies.as_deref().unwrap_or_default()
          80  +
    }
          81  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
          82  +
    pub fn data_type(&self) -> ::std::option::Option<&str> {
          83  +
        self.data_type.as_deref()
          84  +
    }
          85  +
}
          86  +
static PARAMETERMETADATA_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          87  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$Name", "com.amazonaws.ssm", "ParameterMetadata"),
          88  +
    ::aws_smithy_schema::ShapeType::String,
          89  +
    "Name",
          90  +
    0,
          91  +
);
          92  +
static PARAMETERMETADATA_MEMBER_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          93  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$ARN", "com.amazonaws.ssm", "ParameterMetadata"),
          94  +
    ::aws_smithy_schema::ShapeType::String,
          95  +
    "ARN",
          96  +
    1,
          97  +
);
          98  +
static PARAMETERMETADATA_MEMBER_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          99  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$Type", "com.amazonaws.ssm", "ParameterMetadata"),
         100  +
    ::aws_smithy_schema::ShapeType::String,
         101  +
    "Type",
         102  +
    2,
         103  +
);
         104  +
static PARAMETERMETADATA_MEMBER_KEY_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         105  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$KeyId", "com.amazonaws.ssm", "ParameterMetadata"),
         106  +
    ::aws_smithy_schema::ShapeType::String,
         107  +
    "KeyId",
         108  +
    3,
         109  +
);
         110  +
static PARAMETERMETADATA_MEMBER_LAST_MODIFIED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         111  +
    ::aws_smithy_schema::ShapeId::from_parts(
         112  +
        "com.amazonaws.ssm#ParameterMetadata$LastModifiedDate",
         113  +
        "com.amazonaws.ssm",
         114  +
        "ParameterMetadata",
         115  +
    ),
         116  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         117  +
    "LastModifiedDate",
         118  +
    4,
         119  +
);
         120  +
static PARAMETERMETADATA_MEMBER_LAST_MODIFIED_USER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         121  +
    ::aws_smithy_schema::ShapeId::from_parts(
         122  +
        "com.amazonaws.ssm#ParameterMetadata$LastModifiedUser",
         123  +
        "com.amazonaws.ssm",
         124  +
        "ParameterMetadata",
         125  +
    ),
         126  +
    ::aws_smithy_schema::ShapeType::String,
         127  +
    "LastModifiedUser",
         128  +
    5,
         129  +
);
         130  +
static PARAMETERMETADATA_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         131  +
    ::aws_smithy_schema::ShapeId::from_parts(
         132  +
        "com.amazonaws.ssm#ParameterMetadata$Description",
         133  +
        "com.amazonaws.ssm",
         134  +
        "ParameterMetadata",
         135  +
    ),
         136  +
    ::aws_smithy_schema::ShapeType::String,
         137  +
    "Description",
         138  +
    6,
         139  +
);
         140  +
static PARAMETERMETADATA_MEMBER_ALLOWED_PATTERN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         141  +
    ::aws_smithy_schema::ShapeId::from_parts(
         142  +
        "com.amazonaws.ssm#ParameterMetadata$AllowedPattern",
         143  +
        "com.amazonaws.ssm",
         144  +
        "ParameterMetadata",
         145  +
    ),
         146  +
    ::aws_smithy_schema::ShapeType::String,
         147  +
    "AllowedPattern",
         148  +
    7,
         149  +
);
         150  +
static PARAMETERMETADATA_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         151  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$Version", "com.amazonaws.ssm", "ParameterMetadata"),
         152  +
    ::aws_smithy_schema::ShapeType::Long,
         153  +
    "Version",
         154  +
    8,
         155  +
);
         156  +
static PARAMETERMETADATA_MEMBER_TIER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         157  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$Tier", "com.amazonaws.ssm", "ParameterMetadata"),
         158  +
    ::aws_smithy_schema::ShapeType::String,
         159  +
    "Tier",
         160  +
    9,
         161  +
);
         162  +
static PARAMETERMETADATA_MEMBER_POLICIES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         163  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterPolicyList$member", "com.amazonaws.ssm", "ParameterPolicyList"),
         164  +
    ::aws_smithy_schema::ShapeType::Structure,
         165  +
    "member",
         166  +
    0,
         167  +
);
         168  +
static PARAMETERMETADATA_MEMBER_POLICIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         169  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$Policies", "com.amazonaws.ssm", "ParameterMetadata"),
         170  +
    ::aws_smithy_schema::ShapeType::List,
         171  +
    "Policies",
         172  +
    10,
         173  +
)
         174  +
.with_list_member(&PARAMETERMETADATA_MEMBER_POLICIES_MEMBER);
         175  +
static PARAMETERMETADATA_MEMBER_DATA_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         176  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata$DataType", "com.amazonaws.ssm", "ParameterMetadata"),
         177  +
    ::aws_smithy_schema::ShapeType::String,
         178  +
    "DataType",
         179  +
    11,
         180  +
);
         181  +
static PARAMETERMETADATA_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         182  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterMetadata", "com.amazonaws.ssm", "ParameterMetadata"),
         183  +
    ::aws_smithy_schema::ShapeType::Structure,
         184  +
    &[
         185  +
        &PARAMETERMETADATA_MEMBER_NAME,
         186  +
        &PARAMETERMETADATA_MEMBER_ARN,
         187  +
        &PARAMETERMETADATA_MEMBER_TYPE,
         188  +
        &PARAMETERMETADATA_MEMBER_KEY_ID,
         189  +
        &PARAMETERMETADATA_MEMBER_LAST_MODIFIED_DATE,
         190  +
        &PARAMETERMETADATA_MEMBER_LAST_MODIFIED_USER,
         191  +
        &PARAMETERMETADATA_MEMBER_DESCRIPTION,
         192  +
        &PARAMETERMETADATA_MEMBER_ALLOWED_PATTERN,
         193  +
        &PARAMETERMETADATA_MEMBER_VERSION,
         194  +
        &PARAMETERMETADATA_MEMBER_TIER,
         195  +
        &PARAMETERMETADATA_MEMBER_POLICIES,
         196  +
        &PARAMETERMETADATA_MEMBER_DATA_TYPE,
         197  +
    ],
         198  +
);
         199  +
impl ParameterMetadata {
         200  +
    /// The schema for this shape.
         201  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARAMETERMETADATA_SCHEMA;
         202  +
}
         203  +
impl ::aws_smithy_schema::serde::SerializableStruct for ParameterMetadata {
         204  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         205  +
    fn serialize_members(
         206  +
        &self,
         207  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         208  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         209  +
        if let Some(ref val) = self.name {
         210  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_NAME, val)?;
         211  +
        }
         212  +
        if let Some(ref val) = self.arn {
         213  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_ARN, val)?;
         214  +
        }
         215  +
        if let Some(ref val) = self.r#type {
         216  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_TYPE, val.as_str())?;
         217  +
        }
         218  +
        if let Some(ref val) = self.key_id {
         219  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_KEY_ID, val)?;
         220  +
        }
         221  +
        if let Some(ref val) = self.last_modified_date {
         222  +
            ser.write_timestamp(&PARAMETERMETADATA_MEMBER_LAST_MODIFIED_DATE, val)?;
         223  +
        }
         224  +
        if let Some(ref val) = self.last_modified_user {
         225  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_LAST_MODIFIED_USER, val)?;
         226  +
        }
         227  +
        if let Some(ref val) = self.description {
         228  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_DESCRIPTION, val)?;
         229  +
        }
         230  +
        if let Some(ref val) = self.allowed_pattern {
         231  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_ALLOWED_PATTERN, val)?;
         232  +
        }
         233  +
        {
         234  +
            let val = &self.version;
         235  +
            ser.write_long(&PARAMETERMETADATA_MEMBER_VERSION, *val)?;
         236  +
        }
         237  +
        if let Some(ref val) = self.tier {
         238  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_TIER, val.as_str())?;
         239  +
        }
         240  +
        if let Some(ref val) = self.policies {
         241  +
            ser.write_list(
         242  +
                &PARAMETERMETADATA_MEMBER_POLICIES,
         243  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         244  +
                    for item in val {
         245  +
                        ser.write_struct(crate::types::ParameterInlinePolicy::SCHEMA, item)?;
         246  +
                    }
         247  +
                    Ok(())
         248  +
                },
         249  +
            )?;
         250  +
        }
         251  +
        if let Some(ref val) = self.data_type {
         252  +
            ser.write_string(&PARAMETERMETADATA_MEMBER_DATA_TYPE, val)?;
         253  +
        }
         254  +
        Ok(())
         255  +
    }
         256  +
}
         257  +
impl ParameterMetadata {
         258  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         259  +
    pub fn deserialize(
         260  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         261  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         262  +
        #[allow(unused_variables, unused_mut)]
         263  +
        let mut builder = Self::builder();
         264  +
        #[allow(
         265  +
            unused_variables,
         266  +
            unreachable_code,
         267  +
            clippy::single_match,
         268  +
            clippy::match_single_binding,
         269  +
            clippy::diverging_sub_expression
         270  +
        )]
         271  +
        deserializer.read_struct(&PARAMETERMETADATA_SCHEMA, &mut |member, deser| {
         272  +
            match member.member_index() {
         273  +
                Some(0) => {
         274  +
                    if deser.is_null() {
         275  +
                        deser.read_null()?;
         276  +
                    } else {
         277  +
                        builder.name = Some(deser.read_string(member)?);
         278  +
                    }
         279  +
                }
         280  +
                Some(1) => {
         281  +
                    if deser.is_null() {
         282  +
                        deser.read_null()?;
         283  +
                    } else {
         284  +
                        builder.arn = Some(deser.read_string(member)?);
         285  +
                    }
         286  +
                }
         287  +
                Some(2) => {
         288  +
                    if deser.is_null() {
         289  +
                        deser.read_null()?;
         290  +
                    } else {
         291  +
                        builder.r#type = Some(crate::types::ParameterType::from(deser.read_string(member)?.as_str()));
         292  +
                    }
         293  +
                }
         294  +
                Some(3) => {
         295  +
                    if deser.is_null() {
         296  +
                        deser.read_null()?;
         297  +
                    } else {
         298  +
                        builder.key_id = Some(deser.read_string(member)?);
         299  +
                    }
         300  +
                }
         301  +
                Some(4) => {
         302  +
                    if deser.is_null() {
         303  +
                        deser.read_null()?;
         304  +
                    } else {
         305  +
                        builder.last_modified_date = Some(deser.read_timestamp(member)?);
         306  +
                    }
         307  +
                }
         308  +
                Some(5) => {
         309  +
                    if deser.is_null() {
         310  +
                        deser.read_null()?;
         311  +
                    } else {
         312  +
                        builder.last_modified_user = Some(deser.read_string(member)?);
         313  +
                    }
         314  +
                }
         315  +
                Some(6) => {
         316  +
                    if deser.is_null() {
         317  +
                        deser.read_null()?;
         318  +
                    } else {
         319  +
                        builder.description = Some(deser.read_string(member)?);
         320  +
                    }
         321  +
                }
         322  +
                Some(7) => {
         323  +
                    if deser.is_null() {
         324  +
                        deser.read_null()?;
         325  +
                    } else {
         326  +
                        builder.allowed_pattern = Some(deser.read_string(member)?);
         327  +
                    }
         328  +
                }
         329  +
                Some(8) => {
         330  +
                    builder.version = Some(deser.read_long(member)?);
         331  +
                }
         332  +
                Some(9) => {
         333  +
                    if deser.is_null() {
         334  +
                        deser.read_null()?;
         335  +
                    } else {
         336  +
                        builder.tier = Some(crate::types::ParameterTier::from(deser.read_string(member)?.as_str()));
         337  +
                    }
         338  +
                }
         339  +
                Some(10) => {
         340  +
                    if deser.is_null() {
         341  +
                        deser.read_null()?;
         342  +
                    } else {
         343  +
                        builder.policies = Some({
         344  +
                            let mut container = Vec::new();
         345  +
                            deser.read_list(member, &mut |deser| {
         346  +
                                container.push(crate::types::ParameterInlinePolicy::deserialize(deser)?);
         347  +
                                Ok(())
         348  +
                            })?;
         349  +
                            container
         350  +
                        });
         351  +
                    }
         352  +
                }
         353  +
                Some(11) => {
         354  +
                    if deser.is_null() {
         355  +
                        deser.read_null()?;
         356  +
                    } else {
         357  +
                        builder.data_type = Some(deser.read_string(member)?);
         358  +
                    }
         359  +
                }
         360  +
                _ => {}
         361  +
            }
         362  +
            Ok(())
         363  +
        })?;
         364  +
        Ok(builder.build())
         365  +
    }
         366  +
}
         367  +
impl ParameterMetadata {
         368  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         369  +
    pub fn deserialize_with_response(
         370  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         371  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         372  +
        _status: u16,
         373  +
        _body: &[u8],
         374  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         375  +
        Self::deserialize(deserializer)
         376  +
    }
         377  +
}
         378  +
impl ParameterMetadata {
         379  +
    /// Creates a new builder-style object to manufacture [`ParameterMetadata`](crate::types::ParameterMetadata).
         380  +
    pub fn builder() -> crate::types::builders::ParameterMetadataBuilder {
         381  +
        crate::types::builders::ParameterMetadataBuilder::default()
         382  +
    }
         383  +
}
         384  +
         385  +
/// A builder for [`ParameterMetadata`](crate::types::ParameterMetadata).
         386  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         387  +
#[non_exhaustive]
         388  +
pub struct ParameterMetadataBuilder {
         389  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         390  +
    pub(crate) arn: ::std::option::Option<::std::string::String>,
         391  +
    pub(crate) r#type: ::std::option::Option<crate::types::ParameterType>,
         392  +
    pub(crate) key_id: ::std::option::Option<::std::string::String>,
         393  +
    pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         394  +
    pub(crate) last_modified_user: ::std::option::Option<::std::string::String>,
         395  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         396  +
    pub(crate) allowed_pattern: ::std::option::Option<::std::string::String>,
         397  +
    pub(crate) version: ::std::option::Option<i64>,
         398  +
    pub(crate) tier: ::std::option::Option<crate::types::ParameterTier>,
         399  +
    pub(crate) policies: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>,
         400  +
    pub(crate) data_type: ::std::option::Option<::std::string::String>,
         401  +
}
         402  +
impl ParameterMetadataBuilder {
         403  +
    /// <p>The parameter name.</p>
         404  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         405  +
        self.name = ::std::option::Option::Some(input.into());
         406  +
        self
         407  +
    }
         408  +
    /// <p>The parameter name.</p>
         409  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         410  +
        self.name = input;
         411  +
        self
         412  +
    }
         413  +
    /// <p>The parameter name.</p>
         414  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         415  +
        &self.name
         416  +
    }
         417  +
    /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
         418  +
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         419  +
        self.arn = ::std::option::Option::Some(input.into());
         420  +
        self
         421  +
    }
         422  +
    /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
         423  +
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         424  +
        self.arn = input;
         425  +
        self
         426  +
    }
         427  +
    /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
         428  +
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
         429  +
        &self.arn
         430  +
    }
         431  +
    /// <p>The type of parameter. Valid parameter types include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p>
         432  +
    pub fn r#type(mut self, input: crate::types::ParameterType) -> Self {
         433  +
        self.r#type = ::std::option::Option::Some(input);
         434  +
        self
         435  +
    }
         436  +
    /// <p>The type of parameter. Valid parameter types include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p>
         437  +
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
         438  +
        self.r#type = input;
         439  +
        self
         440  +
    }
         441  +
    /// <p>The type of parameter. Valid parameter types include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p>
         442  +
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
         443  +
        &self.r#type
         444  +
    }
         445  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only.</p>
         446  +
    pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         447  +
        self.key_id = ::std::option::Option::Some(input.into());
         448  +
        self
         449  +
    }
         450  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only.</p>
         451  +
    pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         452  +
        self.key_id = input;
         453  +
        self
         454  +
    }
         455  +
    /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only.</p>
         456  +
    pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
         457  +
        &self.key_id
         458  +
    }
         459  +
    /// <p>Date the parameter was last changed or updated.</p>
         460  +
    pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         461  +
        self.last_modified_date = ::std::option::Option::Some(input);
         462  +
        self
         463  +
    }
         464  +
    /// <p>Date the parameter was last changed or updated.</p>
         465  +
    pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         466  +
        self.last_modified_date = input;
         467  +
        self
         468  +
    }
         469  +
    /// <p>Date the parameter was last changed or updated.</p>
         470  +
    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         471  +
        &self.last_modified_date
         472  +
    }
         473  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
         474  +
    pub fn last_modified_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         475  +
        self.last_modified_user = ::std::option::Option::Some(input.into());
         476  +
        self
         477  +
    }
         478  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
         479  +
    pub fn set_last_modified_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         480  +
        self.last_modified_user = input;
         481  +
        self
         482  +
    }
         483  +
    /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
         484  +
    pub fn get_last_modified_user(&self) -> &::std::option::Option<::std::string::String> {
         485  +
        &self.last_modified_user
         486  +
    }
         487  +
    /// <p>Description of the parameter actions.</p>
         488  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         489  +
        self.description = ::std::option::Option::Some(input.into());
         490  +
        self
         491  +
    }
         492  +
    /// <p>Description of the parameter actions.</p>
         493  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         494  +
        self.description = input;
         495  +
        self
         496  +
    }
         497  +
    /// <p>Description of the parameter actions.</p>
         498  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         499  +
        &self.description
         500  +
    }
         501  +
    /// <p>A parameter name can include only the following letters and symbols.</p>
         502  +
    /// <p>a-zA-Z0-9_.-</p>
         503  +
    pub fn allowed_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         504  +
        self.allowed_pattern = ::std::option::Option::Some(input.into());
         505  +
        self
         506  +
    }
         507  +
    /// <p>A parameter name can include only the following letters and symbols.</p>
         508  +
    /// <p>a-zA-Z0-9_.-</p>
         509  +
    pub fn set_allowed_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         510  +
        self.allowed_pattern = input;
         511  +
        self
         512  +
    }
         513  +
    /// <p>A parameter name can include only the following letters and symbols.</p>
         514  +
    /// <p>a-zA-Z0-9_.-</p>
         515  +
    pub fn get_allowed_pattern(&self) -> &::std::option::Option<::std::string::String> {
         516  +
        &self.allowed_pattern
         517  +
    }
         518  +
    /// <p>The parameter version.</p>
         519  +
    pub fn version(mut self, input: i64) -> Self {
         520  +
        self.version = ::std::option::Option::Some(input);
         521  +
        self
         522  +
    }
         523  +
    /// <p>The parameter version.</p>
         524  +
    pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
         525  +
        self.version = input;
         526  +
        self
         527  +
    }
         528  +
    /// <p>The parameter version.</p>
         529  +
    pub fn get_version(&self) -> &::std::option::Option<i64> {
         530  +
        &self.version
         531  +
    }
         532  +
    /// <p>The parameter tier.</p>
         533  +
    pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
         534  +
        self.tier = ::std::option::Option::Some(input);
         535  +
        self
         536  +
    }
         537  +
    /// <p>The parameter tier.</p>
         538  +
    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
         539  +
        self.tier = input;
         540  +
        self
         541  +
    }
         542  +
    /// <p>The parameter tier.</p>
         543  +
    pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
         544  +
        &self.tier
         545  +
    }
         546  +
    /// Appends an item to `policies`.
         547  +
    ///
         548  +
    /// To override the contents of this collection use [`set_policies`](Self::set_policies).
         549  +
    ///
         550  +
    /// <p>A list of policies associated with a parameter.</p>
         551  +
    pub fn policies(mut self, input: crate::types::ParameterInlinePolicy) -> Self {
         552  +
        let mut v = self.policies.unwrap_or_default();
         553  +
        v.push(input);
         554  +
        self.policies = ::std::option::Option::Some(v);
         555  +
        self
         556  +
    }
         557  +
    /// <p>A list of policies associated with a parameter.</p>
         558  +
    pub fn set_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>) -> Self {
         559  +
        self.policies = input;
         560  +
        self
         561  +
    }
         562  +
    /// <p>A list of policies associated with a parameter.</p>
         563  +
    pub fn get_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>> {
         564  +
        &self.policies
         565  +
    }
         566  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
         567  +
    pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         568  +
        self.data_type = ::std::option::Option::Some(input.into());
         569  +
        self
         570  +
    }
         571  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
         572  +
    pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         573  +
        self.data_type = input;
         574  +
        self
         575  +
    }
         576  +
    /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
         577  +
    pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
         578  +
        &self.data_type
         579  +
    }
         580  +
    /// Consumes the builder and constructs a [`ParameterMetadata`](crate::types::ParameterMetadata).
         581  +
    pub fn build(self) -> crate::types::ParameterMetadata {
         582  +
        crate::types::ParameterMetadata {
         583  +
            name: self.name,
         584  +
            arn: self.arn,
         585  +
            r#type: self.r#type,
         586  +
            key_id: self.key_id,
         587  +
            last_modified_date: self.last_modified_date,
         588  +
            last_modified_user: self.last_modified_user,
         589  +
            description: self.description,
         590  +
            allowed_pattern: self.allowed_pattern,
         591  +
            version: self.version.unwrap_or_default(),
         592  +
            tier: self.tier,
         593  +
            policies: self.policies,
         594  +
            data_type: self.data_type,
         595  +
        }
         596  +
    }
         597  +
}