AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,388 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the results of the execution preview.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct AutomationExecutionPreview {
           7  +
    /// <p>Information about the type of impact a runbook step would have on a resource.</p>
           8  +
    /// <ul>
           9  +
    /// <li>
          10  +
    /// <p><code>Mutating</code>: The runbook step would make changes to the targets through actions that create, modify, or delete resources.</p></li>
          11  +
    /// <li>
          12  +
    /// <p><code>Non_Mutating</code>: The runbook step would retrieve data about resources but not make changes to them. This category generally includes <code>Describe*</code>, <code>List*</code>, <code>Get*</code>, and similar read-only API actions.</p></li>
          13  +
    /// <li>
          14  +
    /// <p><code>Undetermined</code>: An undetermined step invokes executions performed by another orchestration service like Lambda, Step Functions, or Amazon Web Services Systems Manager Run Command. An undetermined step might also call a third-party API. Systems Manager Automation doesn't know the outcome of the orchestration processes or third-party API executions, so the results of the steps are undetermined.</p></li>
          15  +
    /// </ul>
          16  +
    pub step_previews: ::std::option::Option<::std::collections::HashMap<crate::types::ImpactType, i32>>,
          17  +
    /// <p>Information about the Amazon Web Services Regions targeted by the execution preview.</p>
          18  +
    pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          19  +
    /// <p>Information that provides a preview of what the impact of running the specified Automation runbook would be.</p>
          20  +
    pub target_previews: ::std::option::Option<::std::vec::Vec<crate::types::TargetPreview>>,
          21  +
    /// <p>Information about the Amazon Web Services accounts that were included in the execution preview.</p>
          22  +
    pub total_accounts: i32,
          23  +
}
          24  +
impl AutomationExecutionPreview {
          25  +
    /// <p>Information about the type of impact a runbook step would have on a resource.</p>
          26  +
    /// <ul>
          27  +
    /// <li>
          28  +
    /// <p><code>Mutating</code>: The runbook step would make changes to the targets through actions that create, modify, or delete resources.</p></li>
          29  +
    /// <li>
          30  +
    /// <p><code>Non_Mutating</code>: The runbook step would retrieve data about resources but not make changes to them. This category generally includes <code>Describe*</code>, <code>List*</code>, <code>Get*</code>, and similar read-only API actions.</p></li>
          31  +
    /// <li>
          32  +
    /// <p><code>Undetermined</code>: An undetermined step invokes executions performed by another orchestration service like Lambda, Step Functions, or Amazon Web Services Systems Manager Run Command. An undetermined step might also call a third-party API. Systems Manager Automation doesn't know the outcome of the orchestration processes or third-party API executions, so the results of the steps are undetermined.</p></li>
          33  +
    /// </ul>
          34  +
    pub fn step_previews(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::ImpactType, i32>> {
          35  +
        self.step_previews.as_ref()
          36  +
    }
          37  +
    /// <p>Information about the Amazon Web Services Regions targeted by the execution preview.</p>
          38  +
    ///
          39  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.regions.is_none()`.
          40  +
    pub fn regions(&self) -> &[::std::string::String] {
          41  +
        self.regions.as_deref().unwrap_or_default()
          42  +
    }
          43  +
    /// <p>Information that provides a preview of what the impact of running the specified Automation runbook would be.</p>
          44  +
    ///
          45  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_previews.is_none()`.
          46  +
    pub fn target_previews(&self) -> &[crate::types::TargetPreview] {
          47  +
        self.target_previews.as_deref().unwrap_or_default()
          48  +
    }
          49  +
    /// <p>Information about the Amazon Web Services accounts that were included in the execution preview.</p>
          50  +
    pub fn total_accounts(&self) -> i32 {
          51  +
        self.total_accounts
          52  +
    }
          53  +
}
          54  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          55  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StepPreviewMap$key", "com.amazonaws.ssm", "StepPreviewMap"),
          56  +
    ::aws_smithy_schema::ShapeType::String,
          57  +
    "key",
          58  +
    0,
          59  +
);
          60  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          61  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#StepPreviewMap$value", "com.amazonaws.ssm", "StepPreviewMap"),
          62  +
    ::aws_smithy_schema::ShapeType::Integer,
          63  +
    "value",
          64  +
    1,
          65  +
);
          66  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          67  +
    ::aws_smithy_schema::ShapeId::from_parts(
          68  +
        "com.amazonaws.ssm#AutomationExecutionPreview$StepPreviews",
          69  +
        "com.amazonaws.ssm",
          70  +
        "AutomationExecutionPreview",
          71  +
    ),
          72  +
    ::aws_smithy_schema::ShapeType::Map,
          73  +
    "StepPreviews",
          74  +
    0,
          75  +
)
          76  +
.with_map_members(
          77  +
    &AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS_KEY,
          78  +
    &AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS_VALUE,
          79  +
);
          80  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_REGIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#RegionList$member", "com.amazonaws.ssm", "RegionList"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "member",
          84  +
    0,
          85  +
);
          86  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_REGIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          87  +
    ::aws_smithy_schema::ShapeId::from_parts(
          88  +
        "com.amazonaws.ssm#AutomationExecutionPreview$Regions",
          89  +
        "com.amazonaws.ssm",
          90  +
        "AutomationExecutionPreview",
          91  +
    ),
          92  +
    ::aws_smithy_schema::ShapeType::List,
          93  +
    "Regions",
          94  +
    1,
          95  +
)
          96  +
.with_list_member(&AUTOMATIONEXECUTIONPREVIEW_MEMBER_REGIONS_MEMBER);
          97  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_TARGET_PREVIEWS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          98  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetPreviewList$member", "com.amazonaws.ssm", "TargetPreviewList"),
          99  +
    ::aws_smithy_schema::ShapeType::Structure,
         100  +
    "member",
         101  +
    0,
         102  +
);
         103  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_TARGET_PREVIEWS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         104  +
    ::aws_smithy_schema::ShapeId::from_parts(
         105  +
        "com.amazonaws.ssm#AutomationExecutionPreview$TargetPreviews",
         106  +
        "com.amazonaws.ssm",
         107  +
        "AutomationExecutionPreview",
         108  +
    ),
         109  +
    ::aws_smithy_schema::ShapeType::List,
         110  +
    "TargetPreviews",
         111  +
    2,
         112  +
)
         113  +
.with_list_member(&AUTOMATIONEXECUTIONPREVIEW_MEMBER_TARGET_PREVIEWS_MEMBER);
         114  +
static AUTOMATIONEXECUTIONPREVIEW_MEMBER_TOTAL_ACCOUNTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         115  +
    ::aws_smithy_schema::ShapeId::from_parts(
         116  +
        "com.amazonaws.ssm#AutomationExecutionPreview$TotalAccounts",
         117  +
        "com.amazonaws.ssm",
         118  +
        "AutomationExecutionPreview",
         119  +
    ),
         120  +
    ::aws_smithy_schema::ShapeType::Integer,
         121  +
    "TotalAccounts",
         122  +
    3,
         123  +
);
         124  +
static AUTOMATIONEXECUTIONPREVIEW_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         125  +
    ::aws_smithy_schema::ShapeId::from_parts(
         126  +
        "com.amazonaws.ssm#AutomationExecutionPreview",
         127  +
        "com.amazonaws.ssm",
         128  +
        "AutomationExecutionPreview",
         129  +
    ),
         130  +
    ::aws_smithy_schema::ShapeType::Structure,
         131  +
    &[
         132  +
        &AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS,
         133  +
        &AUTOMATIONEXECUTIONPREVIEW_MEMBER_REGIONS,
         134  +
        &AUTOMATIONEXECUTIONPREVIEW_MEMBER_TARGET_PREVIEWS,
         135  +
        &AUTOMATIONEXECUTIONPREVIEW_MEMBER_TOTAL_ACCOUNTS,
         136  +
    ],
         137  +
);
         138  +
impl AutomationExecutionPreview {
         139  +
    /// The schema for this shape.
         140  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &AUTOMATIONEXECUTIONPREVIEW_SCHEMA;
         141  +
}
         142  +
impl ::aws_smithy_schema::serde::SerializableStruct for AutomationExecutionPreview {
         143  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         144  +
    fn serialize_members(
         145  +
        &self,
         146  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         147  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         148  +
        if let Some(ref val) = self.step_previews {
         149  +
            ser.write_map(
         150  +
                &AUTOMATIONEXECUTIONPREVIEW_MEMBER_STEP_PREVIEWS,
         151  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         152  +
                    for (key, value) in val {
         153  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key.as_str())?;
         154  +
                        ser.write_integer(&::aws_smithy_schema::prelude::INTEGER, *value)?;
         155  +
                    }
         156  +
                    Ok(())
         157  +
                },
         158  +
            )?;
         159  +
        }
         160  +
        if let Some(ref val) = self.regions {
         161  +
            ser.write_list(
         162  +
                &AUTOMATIONEXECUTIONPREVIEW_MEMBER_REGIONS,
         163  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         164  +
                    for item in val {
         165  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         166  +
                    }
         167  +
                    Ok(())
         168  +
                },
         169  +
            )?;
         170  +
        }
         171  +
        if let Some(ref val) = self.target_previews {
         172  +
            ser.write_list(
         173  +
                &AUTOMATIONEXECUTIONPREVIEW_MEMBER_TARGET_PREVIEWS,
         174  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         175  +
                    for item in val {
         176  +
                        ser.write_struct(crate::types::TargetPreview::SCHEMA, item)?;
         177  +
                    }
         178  +
                    Ok(())
         179  +
                },
         180  +
            )?;
         181  +
        }
         182  +
        {
         183  +
            let val = &self.total_accounts;
         184  +
            ser.write_integer(&AUTOMATIONEXECUTIONPREVIEW_MEMBER_TOTAL_ACCOUNTS, *val)?;
         185  +
        }
         186  +
        Ok(())
         187  +
    }
         188  +
}
         189  +
impl AutomationExecutionPreview {
         190  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         191  +
    pub fn deserialize(
         192  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         193  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         194  +
        #[allow(unused_variables, unused_mut)]
         195  +
        let mut builder = Self::builder();
         196  +
        #[allow(
         197  +
            unused_variables,
         198  +
            unreachable_code,
         199  +
            clippy::single_match,
         200  +
            clippy::match_single_binding,
         201  +
            clippy::diverging_sub_expression
         202  +
        )]
         203  +
        deserializer.read_struct(&AUTOMATIONEXECUTIONPREVIEW_SCHEMA, &mut |member, deser| {
         204  +
            match member.member_index() {
         205  +
                Some(0) => {
         206  +
                    if deser.is_null() {
         207  +
                        deser.read_null()?;
         208  +
                    } else {
         209  +
                        builder.step_previews = Some({
         210  +
                            let mut container = std::collections::HashMap::new();
         211  +
                            deser.read_map(member, &mut |key, deser| {
         212  +
                                container.insert(
         213  +
                                    crate::types::ImpactType::from(key.as_str()),
         214  +
                                    deser.read_integer(&::aws_smithy_schema::prelude::INTEGER)?,
         215  +
                                );
         216  +
                                Ok(())
         217  +
                            })?;
         218  +
                            container
         219  +
                        });
         220  +
                    }
         221  +
                }
         222  +
                Some(1) => {
         223  +
                    if deser.is_null() {
         224  +
                        deser.read_null()?;
         225  +
                    } else {
         226  +
                        builder.regions = Some(deser.read_string_list(member)?);
         227  +
                    }
         228  +
                }
         229  +
                Some(2) => {
         230  +
                    if deser.is_null() {
         231  +
                        deser.read_null()?;
         232  +
                    } else {
         233  +
                        builder.target_previews = Some({
         234  +
                            let mut container = Vec::new();
         235  +
                            deser.read_list(member, &mut |deser| {
         236  +
                                container.push(crate::types::TargetPreview::deserialize(deser)?);
         237  +
                                Ok(())
         238  +
                            })?;
         239  +
                            container
         240  +
                        });
         241  +
                    }
         242  +
                }
         243  +
                Some(3) => {
         244  +
                    builder.total_accounts = Some(deser.read_integer(member)?);
         245  +
                }
         246  +
                _ => {}
         247  +
            }
         248  +
            Ok(())
         249  +
        })?;
         250  +
        Ok(builder.build())
         251  +
    }
         252  +
}
         253  +
impl AutomationExecutionPreview {
         254  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         255  +
    pub fn deserialize_with_response(
         256  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         257  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         258  +
        _status: u16,
         259  +
        _body: &[u8],
         260  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         261  +
        Self::deserialize(deserializer)
         262  +
    }
         263  +
}
         264  +
impl AutomationExecutionPreview {
         265  +
    /// Creates a new builder-style object to manufacture [`AutomationExecutionPreview`](crate::types::AutomationExecutionPreview).
         266  +
    pub fn builder() -> crate::types::builders::AutomationExecutionPreviewBuilder {
         267  +
        crate::types::builders::AutomationExecutionPreviewBuilder::default()
         268  +
    }
         269  +
}
         270  +
         271  +
/// A builder for [`AutomationExecutionPreview`](crate::types::AutomationExecutionPreview).
         272  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         273  +
#[non_exhaustive]
         274  +
pub struct AutomationExecutionPreviewBuilder {
         275  +
    pub(crate) step_previews: ::std::option::Option<::std::collections::HashMap<crate::types::ImpactType, i32>>,
         276  +
    pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         277  +
    pub(crate) target_previews: ::std::option::Option<::std::vec::Vec<crate::types::TargetPreview>>,
         278  +
    pub(crate) total_accounts: ::std::option::Option<i32>,
         279  +
}
         280  +
impl AutomationExecutionPreviewBuilder {
         281  +
    /// Adds a key-value pair to `step_previews`.
         282  +
    ///
         283  +
    /// To override the contents of this collection use [`set_step_previews`](Self::set_step_previews).
         284  +
    ///
         285  +
    /// <p>Information about the type of impact a runbook step would have on a resource.</p>
         286  +
    /// <ul>
         287  +
    /// <li>
         288  +
    /// <p><code>Mutating</code>: The runbook step would make changes to the targets through actions that create, modify, or delete resources.</p></li>
         289  +
    /// <li>
         290  +
    /// <p><code>Non_Mutating</code>: The runbook step would retrieve data about resources but not make changes to them. This category generally includes <code>Describe*</code>, <code>List*</code>, <code>Get*</code>, and similar read-only API actions.</p></li>
         291  +
    /// <li>
         292  +
    /// <p><code>Undetermined</code>: An undetermined step invokes executions performed by another orchestration service like Lambda, Step Functions, or Amazon Web Services Systems Manager Run Command. An undetermined step might also call a third-party API. Systems Manager Automation doesn't know the outcome of the orchestration processes or third-party API executions, so the results of the steps are undetermined.</p></li>
         293  +
    /// </ul>
         294  +
    pub fn step_previews(mut self, k: crate::types::ImpactType, v: i32) -> Self {
         295  +
        let mut hash_map = self.step_previews.unwrap_or_default();
         296  +
        hash_map.insert(k, v);
         297  +
        self.step_previews = ::std::option::Option::Some(hash_map);
         298  +
        self
         299  +
    }
         300  +
    /// <p>Information about the type of impact a runbook step would have on a resource.</p>
         301  +
    /// <ul>
         302  +
    /// <li>
         303  +
    /// <p><code>Mutating</code>: The runbook step would make changes to the targets through actions that create, modify, or delete resources.</p></li>
         304  +
    /// <li>
         305  +
    /// <p><code>Non_Mutating</code>: The runbook step would retrieve data about resources but not make changes to them. This category generally includes <code>Describe*</code>, <code>List*</code>, <code>Get*</code>, and similar read-only API actions.</p></li>
         306  +
    /// <li>
         307  +
    /// <p><code>Undetermined</code>: An undetermined step invokes executions performed by another orchestration service like Lambda, Step Functions, or Amazon Web Services Systems Manager Run Command. An undetermined step might also call a third-party API. Systems Manager Automation doesn't know the outcome of the orchestration processes or third-party API executions, so the results of the steps are undetermined.</p></li>
         308  +
    /// </ul>
         309  +
    pub fn set_step_previews(mut self, input: ::std::option::Option<::std::collections::HashMap<crate::types::ImpactType, i32>>) -> Self {
         310  +
        self.step_previews = input;
         311  +
        self
         312  +
    }
         313  +
    /// <p>Information about the type of impact a runbook step would have on a resource.</p>
         314  +
    /// <ul>
         315  +
    /// <li>
         316  +
    /// <p><code>Mutating</code>: The runbook step would make changes to the targets through actions that create, modify, or delete resources.</p></li>
         317  +
    /// <li>
         318  +
    /// <p><code>Non_Mutating</code>: The runbook step would retrieve data about resources but not make changes to them. This category generally includes <code>Describe*</code>, <code>List*</code>, <code>Get*</code>, and similar read-only API actions.</p></li>
         319  +
    /// <li>
         320  +
    /// <p><code>Undetermined</code>: An undetermined step invokes executions performed by another orchestration service like Lambda, Step Functions, or Amazon Web Services Systems Manager Run Command. An undetermined step might also call a third-party API. Systems Manager Automation doesn't know the outcome of the orchestration processes or third-party API executions, so the results of the steps are undetermined.</p></li>
         321  +
    /// </ul>
         322  +
    pub fn get_step_previews(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::ImpactType, i32>> {
         323  +
        &self.step_previews
         324  +
    }
         325  +
    /// Appends an item to `regions`.
         326  +
    ///
         327  +
    /// To override the contents of this collection use [`set_regions`](Self::set_regions).
         328  +
    ///
         329  +
    /// <p>Information about the Amazon Web Services Regions targeted by the execution preview.</p>
         330  +
    pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         331  +
        let mut v = self.regions.unwrap_or_default();
         332  +
        v.push(input.into());
         333  +
        self.regions = ::std::option::Option::Some(v);
         334  +
        self
         335  +
    }
         336  +
    /// <p>Information about the Amazon Web Services Regions targeted by the execution preview.</p>
         337  +
    pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         338  +
        self.regions = input;
         339  +
        self
         340  +
    }
         341  +
    /// <p>Information about the Amazon Web Services Regions targeted by the execution preview.</p>
         342  +
    pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         343  +
        &self.regions
         344  +
    }
         345  +
    /// Appends an item to `target_previews`.
         346  +
    ///
         347  +
    /// To override the contents of this collection use [`set_target_previews`](Self::set_target_previews).
         348  +
    ///
         349  +
    /// <p>Information that provides a preview of what the impact of running the specified Automation runbook would be.</p>
         350  +
    pub fn target_previews(mut self, input: crate::types::TargetPreview) -> Self {
         351  +
        let mut v = self.target_previews.unwrap_or_default();
         352  +
        v.push(input);
         353  +
        self.target_previews = ::std::option::Option::Some(v);
         354  +
        self
         355  +
    }
         356  +
    /// <p>Information that provides a preview of what the impact of running the specified Automation runbook would be.</p>
         357  +
    pub fn set_target_previews(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetPreview>>) -> Self {
         358  +
        self.target_previews = input;
         359  +
        self
         360  +
    }
         361  +
    /// <p>Information that provides a preview of what the impact of running the specified Automation runbook would be.</p>
         362  +
    pub fn get_target_previews(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetPreview>> {
         363  +
        &self.target_previews
         364  +
    }
         365  +
    /// <p>Information about the Amazon Web Services accounts that were included in the execution preview.</p>
         366  +
    pub fn total_accounts(mut self, input: i32) -> Self {
         367  +
        self.total_accounts = ::std::option::Option::Some(input);
         368  +
        self
         369  +
    }
         370  +
    /// <p>Information about the Amazon Web Services accounts that were included in the execution preview.</p>
         371  +
    pub fn set_total_accounts(mut self, input: ::std::option::Option<i32>) -> Self {
         372  +
        self.total_accounts = input;
         373  +
        self
         374  +
    }
         375  +
    /// <p>Information about the Amazon Web Services accounts that were included in the execution preview.</p>
         376  +
    pub fn get_total_accounts(&self) -> &::std::option::Option<i32> {
         377  +
        &self.total_accounts
         378  +
    }
         379  +
    /// Consumes the builder and constructs a [`AutomationExecutionPreview`](crate::types::AutomationExecutionPreview).
         380  +
    pub fn build(self) -> crate::types::AutomationExecutionPreview {
         381  +
        crate::types::AutomationExecutionPreview {
         382  +
            step_previews: self.step_previews,
         383  +
            regions: self.regions,
         384  +
            target_previews: self.target_previews,
         385  +
            total_accounts: self.total_accounts.unwrap_or_default(),
         386  +
        }
         387  +
    }
         388  +
}

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

@@ -0,1 +0,230 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `AutomationExecutionStatus`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let automationexecutionstatus = unimplemented!();
          14  +
/// match automationexecutionstatus {
          15  +
///     AutomationExecutionStatus::Approved => { /* ... */ },
          16  +
///     AutomationExecutionStatus::Cancelled => { /* ... */ },
          17  +
///     AutomationExecutionStatus::Cancelling => { /* ... */ },
          18  +
///     AutomationExecutionStatus::ChangeCalendarOverrideApproved => { /* ... */ },
          19  +
///     AutomationExecutionStatus::ChangeCalendarOverrideRejected => { /* ... */ },
          20  +
///     AutomationExecutionStatus::CompletedWithFailure => { /* ... */ },
          21  +
///     AutomationExecutionStatus::CompletedWithSuccess => { /* ... */ },
          22  +
///     AutomationExecutionStatus::Exited => { /* ... */ },
          23  +
///     AutomationExecutionStatus::Failed => { /* ... */ },
          24  +
///     AutomationExecutionStatus::Inprogress => { /* ... */ },
          25  +
///     AutomationExecutionStatus::Pending => { /* ... */ },
          26  +
///     AutomationExecutionStatus::PendingApproval => { /* ... */ },
          27  +
///     AutomationExecutionStatus::PendingChangeCalendarOverride => { /* ... */ },
          28  +
///     AutomationExecutionStatus::Rejected => { /* ... */ },
          29  +
///     AutomationExecutionStatus::RunbookInprogress => { /* ... */ },
          30  +
///     AutomationExecutionStatus::Scheduled => { /* ... */ },
          31  +
///     AutomationExecutionStatus::Success => { /* ... */ },
          32  +
///     AutomationExecutionStatus::Timedout => { /* ... */ },
          33  +
///     AutomationExecutionStatus::Waiting => { /* ... */ },
          34  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          35  +
///     _ => { /* ... */ },
          36  +
/// }
          37  +
/// ```
          38  +
/// The above code demonstrates that when `automationexecutionstatus` represents
          39  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          40  +
/// even though the enum does not contain a variant `AutomationExecutionStatus::NewFeature`
          41  +
/// in the current version of SDK. The reason is that the variable `other`,
          42  +
/// created by the `@` operator, is bound to
          43  +
/// `AutomationExecutionStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          44  +
/// and calling `as_str` on it yields `"NewFeature"`.
          45  +
/// This match expression is forward-compatible when executed with a newer
          46  +
/// version of SDK where the variant `AutomationExecutionStatus::NewFeature` is defined.
          47  +
/// Specifically, when `automationexecutionstatus` represents `NewFeature`,
          48  +
/// the execution path will hit the second last match arm as before by virtue of
          49  +
/// calling `as_str` on `AutomationExecutionStatus::NewFeature` also yielding `"NewFeature"`.
          50  +
///
          51  +
/// Explicitly matching on the `Unknown` variant should
          52  +
/// be avoided for two reasons:
          53  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          54  +
/// - It might inadvertently shadow other intended match arms.
          55  +
///
          56  +
#[allow(missing_docs)] // documentation missing in model
          57  +
#[non_exhaustive]
          58  +
#[derive(
          59  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          60  +
)]
          61  +
pub enum AutomationExecutionStatus {
          62  +
    #[allow(missing_docs)] // documentation missing in model
          63  +
    Approved,
          64  +
    #[allow(missing_docs)] // documentation missing in model
          65  +
    Cancelled,
          66  +
    #[allow(missing_docs)] // documentation missing in model
          67  +
    Cancelling,
          68  +
    #[allow(missing_docs)] // documentation missing in model
          69  +
    ChangeCalendarOverrideApproved,
          70  +
    #[allow(missing_docs)] // documentation missing in model
          71  +
    ChangeCalendarOverrideRejected,
          72  +
    #[allow(missing_docs)] // documentation missing in model
          73  +
    CompletedWithFailure,
          74  +
    #[allow(missing_docs)] // documentation missing in model
          75  +
    CompletedWithSuccess,
          76  +
    #[allow(missing_docs)] // documentation missing in model
          77  +
    Exited,
          78  +
    #[allow(missing_docs)] // documentation missing in model
          79  +
    Failed,
          80  +
    #[allow(missing_docs)] // documentation missing in model
          81  +
    Inprogress,
          82  +
    #[allow(missing_docs)] // documentation missing in model
          83  +
    Pending,
          84  +
    #[allow(missing_docs)] // documentation missing in model
          85  +
    PendingApproval,
          86  +
    #[allow(missing_docs)] // documentation missing in model
          87  +
    PendingChangeCalendarOverride,
          88  +
    #[allow(missing_docs)] // documentation missing in model
          89  +
    Rejected,
          90  +
    #[allow(missing_docs)] // documentation missing in model
          91  +
    RunbookInprogress,
          92  +
    #[allow(missing_docs)] // documentation missing in model
          93  +
    Scheduled,
          94  +
    #[allow(missing_docs)] // documentation missing in model
          95  +
    Success,
          96  +
    #[allow(missing_docs)] // documentation missing in model
          97  +
    Timedout,
          98  +
    #[allow(missing_docs)] // documentation missing in model
          99  +
    Waiting,
         100  +
    /// `Unknown` contains new variants that have been added since this code was generated.
         101  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
         102  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
         103  +
}
         104  +
impl ::std::convert::From<&str> for AutomationExecutionStatus {
         105  +
    fn from(s: &str) -> Self {
         106  +
        match s {
         107  +
            "Approved" => AutomationExecutionStatus::Approved,
         108  +
            "Cancelled" => AutomationExecutionStatus::Cancelled,
         109  +
            "Cancelling" => AutomationExecutionStatus::Cancelling,
         110  +
            "ChangeCalendarOverrideApproved" => AutomationExecutionStatus::ChangeCalendarOverrideApproved,
         111  +
            "ChangeCalendarOverrideRejected" => AutomationExecutionStatus::ChangeCalendarOverrideRejected,
         112  +
            "CompletedWithFailure" => AutomationExecutionStatus::CompletedWithFailure,
         113  +
            "CompletedWithSuccess" => AutomationExecutionStatus::CompletedWithSuccess,
         114  +
            "Exited" => AutomationExecutionStatus::Exited,
         115  +
            "Failed" => AutomationExecutionStatus::Failed,
         116  +
            "InProgress" => AutomationExecutionStatus::Inprogress,
         117  +
            "Pending" => AutomationExecutionStatus::Pending,
         118  +
            "PendingApproval" => AutomationExecutionStatus::PendingApproval,
         119  +
            "PendingChangeCalendarOverride" => AutomationExecutionStatus::PendingChangeCalendarOverride,
         120  +
            "Rejected" => AutomationExecutionStatus::Rejected,
         121  +
            "RunbookInProgress" => AutomationExecutionStatus::RunbookInprogress,
         122  +
            "Scheduled" => AutomationExecutionStatus::Scheduled,
         123  +
            "Success" => AutomationExecutionStatus::Success,
         124  +
            "TimedOut" => AutomationExecutionStatus::Timedout,
         125  +
            "Waiting" => AutomationExecutionStatus::Waiting,
         126  +
            other => AutomationExecutionStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
         127  +
        }
         128  +
    }
         129  +
}
         130  +
impl ::std::str::FromStr for AutomationExecutionStatus {
         131  +
    type Err = ::std::convert::Infallible;
         132  +
         133  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
         134  +
        ::std::result::Result::Ok(AutomationExecutionStatus::from(s))
         135  +
    }
         136  +
}
         137  +
impl AutomationExecutionStatus {
         138  +
    /// Returns the `&str` value of the enum member.
         139  +
    pub fn as_str(&self) -> &str {
         140  +
        match self {
         141  +
            AutomationExecutionStatus::Approved => "Approved",
         142  +
            AutomationExecutionStatus::Cancelled => "Cancelled",
         143  +
            AutomationExecutionStatus::Cancelling => "Cancelling",
         144  +
            AutomationExecutionStatus::ChangeCalendarOverrideApproved => "ChangeCalendarOverrideApproved",
         145  +
            AutomationExecutionStatus::ChangeCalendarOverrideRejected => "ChangeCalendarOverrideRejected",
         146  +
            AutomationExecutionStatus::CompletedWithFailure => "CompletedWithFailure",
         147  +
            AutomationExecutionStatus::CompletedWithSuccess => "CompletedWithSuccess",
         148  +
            AutomationExecutionStatus::Exited => "Exited",
         149  +
            AutomationExecutionStatus::Failed => "Failed",
         150  +
            AutomationExecutionStatus::Inprogress => "InProgress",
         151  +
            AutomationExecutionStatus::Pending => "Pending",
         152  +
            AutomationExecutionStatus::PendingApproval => "PendingApproval",
         153  +
            AutomationExecutionStatus::PendingChangeCalendarOverride => "PendingChangeCalendarOverride",
         154  +
            AutomationExecutionStatus::Rejected => "Rejected",
         155  +
            AutomationExecutionStatus::RunbookInprogress => "RunbookInProgress",
         156  +
            AutomationExecutionStatus::Scheduled => "Scheduled",
         157  +
            AutomationExecutionStatus::Success => "Success",
         158  +
            AutomationExecutionStatus::Timedout => "TimedOut",
         159  +
            AutomationExecutionStatus::Waiting => "Waiting",
         160  +
            AutomationExecutionStatus::Unknown(value) => value.as_str(),
         161  +
        }
         162  +
    }
         163  +
    /// Returns all the `&str` representations of the enum members.
         164  +
    pub const fn values() -> &'static [&'static str] {
         165  +
        &[
         166  +
            "Approved",
         167  +
            "Cancelled",
         168  +
            "Cancelling",
         169  +
            "ChangeCalendarOverrideApproved",
         170  +
            "ChangeCalendarOverrideRejected",
         171  +
            "CompletedWithFailure",
         172  +
            "CompletedWithSuccess",
         173  +
            "Exited",
         174  +
            "Failed",
         175  +
            "InProgress",
         176  +
            "Pending",
         177  +
            "PendingApproval",
         178  +
            "PendingChangeCalendarOverride",
         179  +
            "Rejected",
         180  +
            "RunbookInProgress",
         181  +
            "Scheduled",
         182  +
            "Success",
         183  +
            "TimedOut",
         184  +
            "Waiting",
         185  +
        ]
         186  +
    }
         187  +
}
         188  +
impl ::std::convert::AsRef<str> for AutomationExecutionStatus {
         189  +
    fn as_ref(&self) -> &str {
         190  +
        self.as_str()
         191  +
    }
         192  +
}
         193  +
impl AutomationExecutionStatus {
         194  +
    /// Parses the enum value while disallowing unknown variants.
         195  +
    ///
         196  +
    /// Unknown variants will result in an error.
         197  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
         198  +
        match Self::from(value) {
         199  +
            #[allow(deprecated)]
         200  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
         201  +
            known => Ok(known),
         202  +
        }
         203  +
    }
         204  +
}
         205  +
impl ::std::fmt::Display for AutomationExecutionStatus {
         206  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         207  +
        match self {
         208  +
            AutomationExecutionStatus::Approved => write!(f, "Approved"),
         209  +
            AutomationExecutionStatus::Cancelled => write!(f, "Cancelled"),
         210  +
            AutomationExecutionStatus::Cancelling => write!(f, "Cancelling"),
         211  +
            AutomationExecutionStatus::ChangeCalendarOverrideApproved => write!(f, "ChangeCalendarOverrideApproved"),
         212  +
            AutomationExecutionStatus::ChangeCalendarOverrideRejected => write!(f, "ChangeCalendarOverrideRejected"),
         213  +
            AutomationExecutionStatus::CompletedWithFailure => write!(f, "CompletedWithFailure"),
         214  +
            AutomationExecutionStatus::CompletedWithSuccess => write!(f, "CompletedWithSuccess"),
         215  +
            AutomationExecutionStatus::Exited => write!(f, "Exited"),
         216  +
            AutomationExecutionStatus::Failed => write!(f, "Failed"),
         217  +
            AutomationExecutionStatus::Inprogress => write!(f, "InProgress"),
         218  +
            AutomationExecutionStatus::Pending => write!(f, "Pending"),
         219  +
            AutomationExecutionStatus::PendingApproval => write!(f, "PendingApproval"),
         220  +
            AutomationExecutionStatus::PendingChangeCalendarOverride => write!(f, "PendingChangeCalendarOverride"),
         221  +
            AutomationExecutionStatus::Rejected => write!(f, "Rejected"),
         222  +
            AutomationExecutionStatus::RunbookInprogress => write!(f, "RunbookInProgress"),
         223  +
            AutomationExecutionStatus::Scheduled => write!(f, "Scheduled"),
         224  +
            AutomationExecutionStatus::Success => write!(f, "Success"),
         225  +
            AutomationExecutionStatus::Timedout => write!(f, "TimedOut"),
         226  +
            AutomationExecutionStatus::Waiting => write!(f, "Waiting"),
         227  +
            AutomationExecutionStatus::Unknown(value) => write!(f, "{value}"),
         228  +
        }
         229  +
    }
         230  +
}

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

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

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

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

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

@@ -0,1 +0,301 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The access details and targets for connecting to a Microsoft Azure tenant, including the application registration used for authentication and the subscriptions to target.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct AzureConfiguration {
           7  +
    /// <p>The ID of the Azure tenant.</p>
           8  +
    pub tenant_id: ::std::string::String,
           9  +
    /// <p>The display name of the Azure tenant.</p>
          10  +
    pub tenant_display_name: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The ID of the Azure application registration used for authentication.</p>
          12  +
    pub application_id: ::std::string::String,
          13  +
    /// <p>The display name of the Azure application registration.</p>
          14  +
    pub application_display_name: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>The target Azure subscriptions for the cloud connector.</p>
          16  +
    pub targets: ::std::option::Option<crate::types::ConfigurationTargets>,
          17  +
}
          18  +
impl AzureConfiguration {
          19  +
    /// <p>The ID of the Azure tenant.</p>
          20  +
    pub fn tenant_id(&self) -> &str {
          21  +
        use std::ops::Deref;
          22  +
        self.tenant_id.deref()
          23  +
    }
          24  +
    /// <p>The display name of the Azure tenant.</p>
          25  +
    pub fn tenant_display_name(&self) -> ::std::option::Option<&str> {
          26  +
        self.tenant_display_name.as_deref()
          27  +
    }
          28  +
    /// <p>The ID of the Azure application registration used for authentication.</p>
          29  +
    pub fn application_id(&self) -> &str {
          30  +
        use std::ops::Deref;
          31  +
        self.application_id.deref()
          32  +
    }
          33  +
    /// <p>The display name of the Azure application registration.</p>
          34  +
    pub fn application_display_name(&self) -> ::std::option::Option<&str> {
          35  +
        self.application_display_name.as_deref()
          36  +
    }
          37  +
    /// <p>The target Azure subscriptions for the cloud connector.</p>
          38  +
    pub fn targets(&self) -> ::std::option::Option<&crate::types::ConfigurationTargets> {
          39  +
        self.targets.as_ref()
          40  +
    }
          41  +
}
          42  +
static AZURECONFIGURATION_MEMBER_TENANT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AzureConfiguration$TenantId", "com.amazonaws.ssm", "AzureConfiguration"),
          44  +
    ::aws_smithy_schema::ShapeType::String,
          45  +
    "TenantId",
          46  +
    0,
          47  +
);
          48  +
static AZURECONFIGURATION_MEMBER_TENANT_DISPLAY_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm#AzureConfiguration$TenantDisplayName",
          51  +
        "com.amazonaws.ssm",
          52  +
        "AzureConfiguration",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::String,
          55  +
    "TenantDisplayName",
          56  +
    1,
          57  +
);
          58  +
static AZURECONFIGURATION_MEMBER_APPLICATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm#AzureConfiguration$ApplicationId",
          61  +
        "com.amazonaws.ssm",
          62  +
        "AzureConfiguration",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::String,
          65  +
    "ApplicationId",
          66  +
    2,
          67  +
);
          68  +
static AZURECONFIGURATION_MEMBER_APPLICATION_DISPLAY_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts(
          70  +
        "com.amazonaws.ssm#AzureConfiguration$ApplicationDisplayName",
          71  +
        "com.amazonaws.ssm",
          72  +
        "AzureConfiguration",
          73  +
    ),
          74  +
    ::aws_smithy_schema::ShapeType::String,
          75  +
    "ApplicationDisplayName",
          76  +
    3,
          77  +
);
          78  +
static AZURECONFIGURATION_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AzureConfiguration$Targets", "com.amazonaws.ssm", "AzureConfiguration"),
          80  +
    ::aws_smithy_schema::ShapeType::Union,
          81  +
    "Targets",
          82  +
    4,
          83  +
);
          84  +
static AZURECONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          85  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AzureConfiguration", "com.amazonaws.ssm", "AzureConfiguration"),
          86  +
    ::aws_smithy_schema::ShapeType::Structure,
          87  +
    &[
          88  +
        &AZURECONFIGURATION_MEMBER_TENANT_ID,
          89  +
        &AZURECONFIGURATION_MEMBER_TENANT_DISPLAY_NAME,
          90  +
        &AZURECONFIGURATION_MEMBER_APPLICATION_ID,
          91  +
        &AZURECONFIGURATION_MEMBER_APPLICATION_DISPLAY_NAME,
          92  +
        &AZURECONFIGURATION_MEMBER_TARGETS,
          93  +
    ],
          94  +
);
          95  +
impl AzureConfiguration {
          96  +
    /// The schema for this shape.
          97  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &AZURECONFIGURATION_SCHEMA;
          98  +
}
          99  +
impl ::aws_smithy_schema::serde::SerializableStruct for AzureConfiguration {
         100  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         101  +
    fn serialize_members(
         102  +
        &self,
         103  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         104  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         105  +
        {
         106  +
            let val = &self.tenant_id;
         107  +
            ser.write_string(&AZURECONFIGURATION_MEMBER_TENANT_ID, val)?;
         108  +
        }
         109  +
        if let Some(ref val) = self.tenant_display_name {
         110  +
            ser.write_string(&AZURECONFIGURATION_MEMBER_TENANT_DISPLAY_NAME, val)?;
         111  +
        }
         112  +
        {
         113  +
            let val = &self.application_id;
         114  +
            ser.write_string(&AZURECONFIGURATION_MEMBER_APPLICATION_ID, val)?;
         115  +
        }
         116  +
        if let Some(ref val) = self.application_display_name {
         117  +
            ser.write_string(&AZURECONFIGURATION_MEMBER_APPLICATION_DISPLAY_NAME, val)?;
         118  +
        }
         119  +
        if let Some(ref val) = self.targets {
         120  +
            ser.write_struct(&AZURECONFIGURATION_MEMBER_TARGETS, val)?;
         121  +
        }
         122  +
        Ok(())
         123  +
    }
         124  +
}
         125  +
impl AzureConfiguration {
         126  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         127  +
    pub fn deserialize(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         129  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         130  +
        #[allow(unused_variables, unused_mut)]
         131  +
        let mut builder = Self::builder();
         132  +
        #[allow(
         133  +
            unused_variables,
         134  +
            unreachable_code,
         135  +
            clippy::single_match,
         136  +
            clippy::match_single_binding,
         137  +
            clippy::diverging_sub_expression
         138  +
        )]
         139  +
        deserializer.read_struct(&AZURECONFIGURATION_SCHEMA, &mut |member, deser| {
         140  +
            match member.member_index() {
         141  +
                Some(0) => {
         142  +
                    builder.tenant_id = Some(deser.read_string(member)?);
         143  +
                }
         144  +
                Some(1) => {
         145  +
                    if deser.is_null() {
         146  +
                        deser.read_null()?;
         147  +
                    } else {
         148  +
                        builder.tenant_display_name = Some(deser.read_string(member)?);
         149  +
                    }
         150  +
                }
         151  +
                Some(2) => {
         152  +
                    builder.application_id = Some(deser.read_string(member)?);
         153  +
                }
         154  +
                Some(3) => {
         155  +
                    if deser.is_null() {
         156  +
                        deser.read_null()?;
         157  +
                    } else {
         158  +
                        builder.application_display_name = Some(deser.read_string(member)?);
         159  +
                    }
         160  +
                }
         161  +
                Some(4) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.targets = Some(crate::types::ConfigurationTargets::deserialize(deser)?);
         166  +
                    }
         167  +
                }
         168  +
                _ => {}
         169  +
            }
         170  +
            Ok(())
         171  +
        })?;
         172  +
        builder.tenant_id = builder.tenant_id.or(Some(String::new()));
         173  +
        builder.application_id = builder.application_id.or(Some(String::new()));
         174  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         175  +
    }
         176  +
}
         177  +
impl AzureConfiguration {
         178  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         179  +
    pub fn deserialize_with_response(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         181  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         182  +
        _status: u16,
         183  +
        _body: &[u8],
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        Self::deserialize(deserializer)
         186  +
    }
         187  +
}
         188  +
impl AzureConfiguration {
         189  +
    /// Creates a new builder-style object to manufacture [`AzureConfiguration`](crate::types::AzureConfiguration).
         190  +
    pub fn builder() -> crate::types::builders::AzureConfigurationBuilder {
         191  +
        crate::types::builders::AzureConfigurationBuilder::default()
         192  +
    }
         193  +
}
         194  +
         195  +
/// A builder for [`AzureConfiguration`](crate::types::AzureConfiguration).
         196  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         197  +
#[non_exhaustive]
         198  +
pub struct AzureConfigurationBuilder {
         199  +
    pub(crate) tenant_id: ::std::option::Option<::std::string::String>,
         200  +
    pub(crate) tenant_display_name: ::std::option::Option<::std::string::String>,
         201  +
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
         202  +
    pub(crate) application_display_name: ::std::option::Option<::std::string::String>,
         203  +
    pub(crate) targets: ::std::option::Option<crate::types::ConfigurationTargets>,
         204  +
}
         205  +
impl AzureConfigurationBuilder {
         206  +
    /// <p>The ID of the Azure tenant.</p>
         207  +
    /// This field is required.
         208  +
    pub fn tenant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         209  +
        self.tenant_id = ::std::option::Option::Some(input.into());
         210  +
        self
         211  +
    }
         212  +
    /// <p>The ID of the Azure tenant.</p>
         213  +
    pub fn set_tenant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         214  +
        self.tenant_id = input;
         215  +
        self
         216  +
    }
         217  +
    /// <p>The ID of the Azure tenant.</p>
         218  +
    pub fn get_tenant_id(&self) -> &::std::option::Option<::std::string::String> {
         219  +
        &self.tenant_id
         220  +
    }
         221  +
    /// <p>The display name of the Azure tenant.</p>
         222  +
    pub fn tenant_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         223  +
        self.tenant_display_name = ::std::option::Option::Some(input.into());
         224  +
        self
         225  +
    }
         226  +
    /// <p>The display name of the Azure tenant.</p>
         227  +
    pub fn set_tenant_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         228  +
        self.tenant_display_name = input;
         229  +
        self
         230  +
    }
         231  +
    /// <p>The display name of the Azure tenant.</p>
         232  +
    pub fn get_tenant_display_name(&self) -> &::std::option::Option<::std::string::String> {
         233  +
        &self.tenant_display_name
         234  +
    }
         235  +
    /// <p>The ID of the Azure application registration used for authentication.</p>
         236  +
    /// This field is required.
         237  +
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         238  +
        self.application_id = ::std::option::Option::Some(input.into());
         239  +
        self
         240  +
    }
         241  +
    /// <p>The ID of the Azure application registration used for authentication.</p>
         242  +
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         243  +
        self.application_id = input;
         244  +
        self
         245  +
    }
         246  +
    /// <p>The ID of the Azure application registration used for authentication.</p>
         247  +
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
         248  +
        &self.application_id
         249  +
    }
         250  +
    /// <p>The display name of the Azure application registration.</p>
         251  +
    pub fn application_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         252  +
        self.application_display_name = ::std::option::Option::Some(input.into());
         253  +
        self
         254  +
    }
         255  +
    /// <p>The display name of the Azure application registration.</p>
         256  +
    pub fn set_application_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         257  +
        self.application_display_name = input;
         258  +
        self
         259  +
    }
         260  +
    /// <p>The display name of the Azure application registration.</p>
         261  +
    pub fn get_application_display_name(&self) -> &::std::option::Option<::std::string::String> {
         262  +
        &self.application_display_name
         263  +
    }
         264  +
    /// <p>The target Azure subscriptions for the cloud connector.</p>
         265  +
    pub fn targets(mut self, input: crate::types::ConfigurationTargets) -> Self {
         266  +
        self.targets = ::std::option::Option::Some(input);
         267  +
        self
         268  +
    }
         269  +
    /// <p>The target Azure subscriptions for the cloud connector.</p>
         270  +
    pub fn set_targets(mut self, input: ::std::option::Option<crate::types::ConfigurationTargets>) -> Self {
         271  +
        self.targets = input;
         272  +
        self
         273  +
    }
         274  +
    /// <p>The target Azure subscriptions for the cloud connector.</p>
         275  +
    pub fn get_targets(&self) -> &::std::option::Option<crate::types::ConfigurationTargets> {
         276  +
        &self.targets
         277  +
    }
         278  +
    /// Consumes the builder and constructs a [`AzureConfiguration`](crate::types::AzureConfiguration).
         279  +
    /// This method will fail if any of the following fields are not set:
         280  +
    /// - [`tenant_id`](crate::types::builders::AzureConfigurationBuilder::tenant_id)
         281  +
    /// - [`application_id`](crate::types::builders::AzureConfigurationBuilder::application_id)
         282  +
    pub fn build(self) -> ::std::result::Result<crate::types::AzureConfiguration, ::aws_smithy_types::error::operation::BuildError> {
         283  +
        ::std::result::Result::Ok(crate::types::AzureConfiguration {
         284  +
            tenant_id: self.tenant_id.ok_or_else(|| {
         285  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         286  +
                    "tenant_id",
         287  +
                    "tenant_id was not specified but it is required when building AzureConfiguration",
         288  +
                )
         289  +
            })?,
         290  +
            tenant_display_name: self.tenant_display_name,
         291  +
            application_id: self.application_id.ok_or_else(|| {
         292  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         293  +
                    "application_id",
         294  +
                    "application_id was not specified but it is required when building AzureConfiguration",
         295  +
                )
         296  +
            })?,
         297  +
            application_display_name: self.application_display_name,
         298  +
            targets: self.targets,
         299  +
        })
         300  +
    }
         301  +
}