AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/create_association_batch/_create_association_batch_input.rs

@@ -0,1 +0,229 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct CreateAssociationBatchInput {
           6  +
    /// <p>One or more associations.</p>
           7  +
    pub entries: ::std::option::Option<::std::vec::Vec<crate::types::CreateAssociationBatchRequestEntry>>,
           8  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
           9  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
          10  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
          11  +
    /// </note>
          12  +
    pub association_dispatch_assume_role: ::std::option::Option<::std::string::String>,
          13  +
}
          14  +
impl CreateAssociationBatchInput {
          15  +
    /// <p>One or more associations.</p>
          16  +
    ///
          17  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.entries.is_none()`.
          18  +
    pub fn entries(&self) -> &[crate::types::CreateAssociationBatchRequestEntry] {
          19  +
        self.entries.as_deref().unwrap_or_default()
          20  +
    }
          21  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
          22  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
          23  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
          24  +
    /// </note>
          25  +
    pub fn association_dispatch_assume_role(&self) -> ::std::option::Option<&str> {
          26  +
        self.association_dispatch_assume_role.as_deref()
          27  +
    }
          28  +
}
          29  +
static CREATEASSOCIATIONBATCHINPUT_MEMBER_ENTRIES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          30  +
    ::aws_smithy_schema::ShapeId::from_parts(
          31  +
        "com.amazonaws.ssm#CreateAssociationBatchRequestEntries$member",
          32  +
        "com.amazonaws.ssm",
          33  +
        "CreateAssociationBatchRequestEntries",
          34  +
    ),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    "member",
          37  +
    0,
          38  +
)
          39  +
.with_xml_name("entries");
          40  +
static CREATEASSOCIATIONBATCHINPUT_MEMBER_ENTRIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts(
          42  +
        "com.amazonaws.ssm.synthetic#CreateAssociationBatchInput$Entries",
          43  +
        "com.amazonaws.ssm.synthetic",
          44  +
        "CreateAssociationBatchInput",
          45  +
    ),
          46  +
    ::aws_smithy_schema::ShapeType::List,
          47  +
    "Entries",
          48  +
    0,
          49  +
)
          50  +
.with_list_member(&CREATEASSOCIATIONBATCHINPUT_MEMBER_ENTRIES_MEMBER);
          51  +
static CREATEASSOCIATIONBATCHINPUT_MEMBER_ASSOCIATION_DISPATCH_ASSUME_ROLE: ::aws_smithy_schema::Schema<'static> =
          52  +
    ::aws_smithy_schema::Schema::new_member(
          53  +
        ::aws_smithy_schema::ShapeId::from_parts(
          54  +
            "com.amazonaws.ssm.synthetic#CreateAssociationBatchInput$AssociationDispatchAssumeRole",
          55  +
            "com.amazonaws.ssm.synthetic",
          56  +
            "CreateAssociationBatchInput",
          57  +
        ),
          58  +
        ::aws_smithy_schema::ShapeType::String,
          59  +
        "AssociationDispatchAssumeRole",
          60  +
        1,
          61  +
    );
          62  +
static CREATEASSOCIATIONBATCHINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm.synthetic#CreateAssociationBatchInput",
          65  +
        "com.amazonaws.ssm.synthetic",
          66  +
        "CreateAssociationBatchInput",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::Structure,
          69  +
    &[
          70  +
        &CREATEASSOCIATIONBATCHINPUT_MEMBER_ENTRIES,
          71  +
        &CREATEASSOCIATIONBATCHINPUT_MEMBER_ASSOCIATION_DISPATCH_ASSUME_ROLE,
          72  +
    ],
          73  +
)
          74  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          75  +
.with_original_name("CreateAssociationBatchRequest");
          76  +
impl CreateAssociationBatchInput {
          77  +
    /// The schema for this shape.
          78  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEASSOCIATIONBATCHINPUT_SCHEMA;
          79  +
}
          80  +
impl ::aws_smithy_schema::serde::SerializableStruct for CreateAssociationBatchInput {
          81  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          82  +
    fn serialize_members(
          83  +
        &self,
          84  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          85  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          86  +
        if let Some(ref val) = self.entries {
          87  +
            ser.write_list(
          88  +
                &CREATEASSOCIATIONBATCHINPUT_MEMBER_ENTRIES,
          89  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          90  +
                    for item in val {
          91  +
                        ser.write_struct(crate::types::CreateAssociationBatchRequestEntry::SCHEMA, item)?;
          92  +
                    }
          93  +
                    Ok(())
          94  +
                },
          95  +
            )?;
          96  +
        }
          97  +
        if let Some(ref val) = self.association_dispatch_assume_role {
          98  +
            ser.write_string(&CREATEASSOCIATIONBATCHINPUT_MEMBER_ASSOCIATION_DISPATCH_ASSUME_ROLE, val)?;
          99  +
        }
         100  +
        Ok(())
         101  +
    }
         102  +
}
         103  +
impl CreateAssociationBatchInput {
         104  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         105  +
    pub fn deserialize(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         107  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         108  +
        #[allow(unused_variables, unused_mut)]
         109  +
        let mut builder = Self::builder();
         110  +
        #[allow(
         111  +
            unused_variables,
         112  +
            unreachable_code,
         113  +
            clippy::single_match,
         114  +
            clippy::match_single_binding,
         115  +
            clippy::diverging_sub_expression
         116  +
        )]
         117  +
        deserializer.read_struct(&CREATEASSOCIATIONBATCHINPUT_SCHEMA, &mut |member, deser| {
         118  +
            match member.member_index() {
         119  +
                Some(0) => {
         120  +
                    if deser.is_null() {
         121  +
                        deser.read_null()?;
         122  +
                    } else {
         123  +
                        builder.entries = Some({
         124  +
                            let mut container = Vec::new();
         125  +
                            deser.read_list(member, &mut |deser| {
         126  +
                                container.push(crate::types::CreateAssociationBatchRequestEntry::deserialize(deser)?);
         127  +
                                Ok(())
         128  +
                            })?;
         129  +
                            container
         130  +
                        });
         131  +
                    }
         132  +
                }
         133  +
                Some(1) => {
         134  +
                    if deser.is_null() {
         135  +
                        deser.read_null()?;
         136  +
                    } else {
         137  +
                        builder.association_dispatch_assume_role = Some(deser.read_string(member)?);
         138  +
                    }
         139  +
                }
         140  +
                _ => {}
         141  +
            }
         142  +
            Ok(())
         143  +
        })?;
         144  +
        builder.entries = builder.entries.or(Some(Vec::new()));
         145  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         146  +
    }
         147  +
}
         148  +
impl CreateAssociationBatchInput {
         149  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         150  +
    pub fn deserialize_with_response(
         151  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         152  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         153  +
        _status: u16,
         154  +
        _body: &[u8],
         155  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         156  +
        Self::deserialize(deserializer)
         157  +
    }
         158  +
}
         159  +
impl CreateAssociationBatchInput {
         160  +
    /// Creates a new builder-style object to manufacture [`CreateAssociationBatchInput`](crate::operation::create_association_batch::CreateAssociationBatchInput).
         161  +
    pub fn builder() -> crate::operation::create_association_batch::builders::CreateAssociationBatchInputBuilder {
         162  +
        crate::operation::create_association_batch::builders::CreateAssociationBatchInputBuilder::default()
         163  +
    }
         164  +
}
         165  +
         166  +
/// A builder for [`CreateAssociationBatchInput`](crate::operation::create_association_batch::CreateAssociationBatchInput).
         167  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         168  +
#[non_exhaustive]
         169  +
pub struct CreateAssociationBatchInputBuilder {
         170  +
    pub(crate) entries: ::std::option::Option<::std::vec::Vec<crate::types::CreateAssociationBatchRequestEntry>>,
         171  +
    pub(crate) association_dispatch_assume_role: ::std::option::Option<::std::string::String>,
         172  +
}
         173  +
impl CreateAssociationBatchInputBuilder {
         174  +
    /// Appends an item to `entries`.
         175  +
    ///
         176  +
    /// To override the contents of this collection use [`set_entries`](Self::set_entries).
         177  +
    ///
         178  +
    /// <p>One or more associations.</p>
         179  +
    pub fn entries(mut self, input: crate::types::CreateAssociationBatchRequestEntry) -> Self {
         180  +
        let mut v = self.entries.unwrap_or_default();
         181  +
        v.push(input);
         182  +
        self.entries = ::std::option::Option::Some(v);
         183  +
        self
         184  +
    }
         185  +
    /// <p>One or more associations.</p>
         186  +
    pub fn set_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateAssociationBatchRequestEntry>>) -> Self {
         187  +
        self.entries = input;
         188  +
        self
         189  +
    }
         190  +
    /// <p>One or more associations.</p>
         191  +
    pub fn get_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateAssociationBatchRequestEntry>> {
         192  +
        &self.entries
         193  +
    }
         194  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         195  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         196  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         197  +
    /// </note>
         198  +
    pub fn association_dispatch_assume_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         199  +
        self.association_dispatch_assume_role = ::std::option::Option::Some(input.into());
         200  +
        self
         201  +
    }
         202  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         203  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         204  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         205  +
    /// </note>
         206  +
    pub fn set_association_dispatch_assume_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         207  +
        self.association_dispatch_assume_role = input;
         208  +
        self
         209  +
    }
         210  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         211  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         212  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         213  +
    /// </note>
         214  +
    pub fn get_association_dispatch_assume_role(&self) -> &::std::option::Option<::std::string::String> {
         215  +
        &self.association_dispatch_assume_role
         216  +
    }
         217  +
    /// Consumes the builder and constructs a [`CreateAssociationBatchInput`](crate::operation::create_association_batch::CreateAssociationBatchInput).
         218  +
    pub fn build(
         219  +
        self,
         220  +
    ) -> ::std::result::Result<
         221  +
        crate::operation::create_association_batch::CreateAssociationBatchInput,
         222  +
        ::aws_smithy_types::error::operation::BuildError,
         223  +
    > {
         224  +
        ::std::result::Result::Ok(crate::operation::create_association_batch::CreateAssociationBatchInput {
         225  +
            entries: self.entries,
         226  +
            association_dispatch_assume_role: self.association_dispatch_assume_role,
         227  +
        })
         228  +
    }
         229  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/create_association_batch/_create_association_batch_output.rs

@@ -0,1 +0,316 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct CreateAssociationBatchOutput {
           6  +
    /// <p>Information about the associations that succeeded.</p>
           7  +
    pub successful: ::std::option::Option<::std::vec::Vec<crate::types::AssociationDescription>>,
           8  +
    /// <p>Information about the associations that failed.</p>
           9  +
    pub failed: ::std::option::Option<::std::vec::Vec<crate::types::FailedCreateAssociation>>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl CreateAssociationBatchOutput {
          13  +
    /// <p>Information about the associations that succeeded.</p>
          14  +
    ///
          15  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.successful.is_none()`.
          16  +
    pub fn successful(&self) -> &[crate::types::AssociationDescription] {
          17  +
        self.successful.as_deref().unwrap_or_default()
          18  +
    }
          19  +
    /// <p>Information about the associations that failed.</p>
          20  +
    ///
          21  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.failed.is_none()`.
          22  +
    pub fn failed(&self) -> &[crate::types::FailedCreateAssociation] {
          23  +
        self.failed.as_deref().unwrap_or_default()
          24  +
    }
          25  +
}
          26  +
static CREATEASSOCIATIONBATCHOUTPUT_MEMBER_SUCCESSFUL_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          27  +
    ::aws_smithy_schema::ShapeId::from_parts(
          28  +
        "com.amazonaws.ssm#AssociationDescriptionList$member",
          29  +
        "com.amazonaws.ssm",
          30  +
        "AssociationDescriptionList",
          31  +
    ),
          32  +
    ::aws_smithy_schema::ShapeType::Structure,
          33  +
    "member",
          34  +
    0,
          35  +
)
          36  +
.with_xml_name("AssociationDescription");
          37  +
static CREATEASSOCIATIONBATCHOUTPUT_MEMBER_SUCCESSFUL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          38  +
    ::aws_smithy_schema::ShapeId::from_parts(
          39  +
        "com.amazonaws.ssm.synthetic#CreateAssociationBatchOutput$Successful",
          40  +
        "com.amazonaws.ssm.synthetic",
          41  +
        "CreateAssociationBatchOutput",
          42  +
    ),
          43  +
    ::aws_smithy_schema::ShapeType::List,
          44  +
    "Successful",
          45  +
    0,
          46  +
)
          47  +
.with_list_member(&CREATEASSOCIATIONBATCHOUTPUT_MEMBER_SUCCESSFUL_MEMBER);
          48  +
static CREATEASSOCIATIONBATCHOUTPUT_MEMBER_FAILED_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm#FailedCreateAssociationList$member",
          51  +
        "com.amazonaws.ssm",
          52  +
        "FailedCreateAssociationList",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::Structure,
          55  +
    "member",
          56  +
    0,
          57  +
)
          58  +
.with_xml_name("FailedCreateAssociationEntry");
          59  +
static CREATEASSOCIATIONBATCHOUTPUT_MEMBER_FAILED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm.synthetic#CreateAssociationBatchOutput$Failed",
          62  +
        "com.amazonaws.ssm.synthetic",
          63  +
        "CreateAssociationBatchOutput",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::List,
          66  +
    "Failed",
          67  +
    1,
          68  +
)
          69  +
.with_list_member(&CREATEASSOCIATIONBATCHOUTPUT_MEMBER_FAILED_MEMBER);
          70  +
static CREATEASSOCIATIONBATCHOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          71  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          72  +
    ::aws_smithy_schema::ShapeType::String,
          73  +
    "request_id",
          74  +
    2,
          75  +
)
          76  +
.with_http_header("x-amzn-requestid");
          77  +
static CREATEASSOCIATIONBATCHOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          78  +
    ::aws_smithy_schema::ShapeId::from_parts(
          79  +
        "com.amazonaws.ssm.synthetic#CreateAssociationBatchOutput",
          80  +
        "com.amazonaws.ssm.synthetic",
          81  +
        "CreateAssociationBatchOutput",
          82  +
    ),
          83  +
    ::aws_smithy_schema::ShapeType::Structure,
          84  +
    &[
          85  +
        &CREATEASSOCIATIONBATCHOUTPUT_MEMBER_SUCCESSFUL,
          86  +
        &CREATEASSOCIATIONBATCHOUTPUT_MEMBER_FAILED,
          87  +
        &CREATEASSOCIATIONBATCHOUTPUT_MEMBER__REQUEST_ID,
          88  +
    ],
          89  +
)
          90  +
.with_original_name("CreateAssociationBatchResult");
          91  +
impl CreateAssociationBatchOutput {
          92  +
    /// The schema for this shape.
          93  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEASSOCIATIONBATCHOUTPUT_SCHEMA;
          94  +
}
          95  +
impl ::aws_smithy_schema::serde::SerializableStruct for CreateAssociationBatchOutput {
          96  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          97  +
    fn serialize_members(
          98  +
        &self,
          99  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         100  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         101  +
        if let Some(ref val) = self.successful {
         102  +
            ser.write_list(
         103  +
                &CREATEASSOCIATIONBATCHOUTPUT_MEMBER_SUCCESSFUL,
         104  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         105  +
                    for item in val {
         106  +
                        ser.write_struct(crate::types::AssociationDescription::SCHEMA, item)?;
         107  +
                    }
         108  +
                    Ok(())
         109  +
                },
         110  +
            )?;
         111  +
        }
         112  +
        if let Some(ref val) = self.failed {
         113  +
            ser.write_list(
         114  +
                &CREATEASSOCIATIONBATCHOUTPUT_MEMBER_FAILED,
         115  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         116  +
                    for item in val {
         117  +
                        ser.write_struct(crate::types::FailedCreateAssociation::SCHEMA, item)?;
         118  +
                    }
         119  +
                    Ok(())
         120  +
                },
         121  +
            )?;
         122  +
        }
         123  +
        Ok(())
         124  +
    }
         125  +
}
         126  +
impl CreateAssociationBatchOutput {
         127  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         128  +
    pub fn deserialize(
         129  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         130  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         131  +
        #[allow(unused_variables, unused_mut)]
         132  +
        let mut builder = Self::builder();
         133  +
        #[allow(
         134  +
            unused_variables,
         135  +
            unreachable_code,
         136  +
            clippy::single_match,
         137  +
            clippy::match_single_binding,
         138  +
            clippy::diverging_sub_expression
         139  +
        )]
         140  +
        deserializer.read_struct(&CREATEASSOCIATIONBATCHOUTPUT_SCHEMA, &mut |member, deser| {
         141  +
            match member.member_index() {
         142  +
                Some(0) => {
         143  +
                    if deser.is_null() {
         144  +
                        deser.read_null()?;
         145  +
                    } else {
         146  +
                        builder.successful = Some({
         147  +
                            let mut container = Vec::new();
         148  +
                            deser.read_list(member, &mut |deser| {
         149  +
                                container.push(crate::types::AssociationDescription::deserialize(deser)?);
         150  +
                                Ok(())
         151  +
                            })?;
         152  +
                            container
         153  +
                        });
         154  +
                    }
         155  +
                }
         156  +
                Some(1) => {
         157  +
                    if deser.is_null() {
         158  +
                        deser.read_null()?;
         159  +
                    } else {
         160  +
                        builder.failed = Some({
         161  +
                            let mut container = Vec::new();
         162  +
                            deser.read_list(member, &mut |deser| {
         163  +
                                container.push(crate::types::FailedCreateAssociation::deserialize(deser)?);
         164  +
                                Ok(())
         165  +
                            })?;
         166  +
                            container
         167  +
                        });
         168  +
                    }
         169  +
                }
         170  +
                Some(2) => {
         171  +
                    builder._request_id = Some(deser.read_string(member)?);
         172  +
                }
         173  +
                _ => {}
         174  +
            }
         175  +
            Ok(())
         176  +
        })?;
         177  +
        Ok(builder.build())
         178  +
    }
         179  +
}
         180  +
impl CreateAssociationBatchOutput {
         181  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         182  +
    /// Header-bound members are read directly from headers, avoiding runtime
         183  +
    /// member iteration overhead. Body members are read via the deserializer.
         184  +
    pub fn deserialize_with_response(
         185  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         186  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         187  +
        _status: u16,
         188  +
        _body: &[u8],
         189  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         190  +
        #[allow(unused_variables, unused_mut)]
         191  +
        let mut builder = Self::builder();
         192  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         193  +
            builder._request_id = Some(val.to_string());
         194  +
        }
         195  +
         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(&CREATEASSOCIATIONBATCHOUTPUT_SCHEMA, &mut |member, deser| {
         204  +
            match member.member_index() {
         205  +
                Some(0) => {
         206  +
                    builder.successful = Some({
         207  +
                        let mut container = Vec::new();
         208  +
                        deser.read_list(member, &mut |deser| {
         209  +
                            container.push(crate::types::AssociationDescription::deserialize(deser)?);
         210  +
                            Ok(())
         211  +
                        })?;
         212  +
                        container
         213  +
                    });
         214  +
                }
         215  +
                Some(1) => {
         216  +
                    builder.failed = Some({
         217  +
                        let mut container = Vec::new();
         218  +
                        deser.read_list(member, &mut |deser| {
         219  +
                            container.push(crate::types::FailedCreateAssociation::deserialize(deser)?);
         220  +
                            Ok(())
         221  +
                        })?;
         222  +
                        container
         223  +
                    });
         224  +
                }
         225  +
                _ => {}
         226  +
            }
         227  +
            Ok(())
         228  +
        })?;
         229  +
        Ok(builder.build())
         230  +
    }
         231  +
}
         232  +
impl ::aws_types::request_id::RequestId for CreateAssociationBatchOutput {
         233  +
    fn request_id(&self) -> Option<&str> {
         234  +
        self._request_id.as_deref()
         235  +
    }
         236  +
}
         237  +
impl CreateAssociationBatchOutput {
         238  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         239  +
        self._request_id = request_id;
         240  +
        self
         241  +
    }
         242  +
}
         243  +
impl CreateAssociationBatchOutput {
         244  +
    /// Creates a new builder-style object to manufacture [`CreateAssociationBatchOutput`](crate::operation::create_association_batch::CreateAssociationBatchOutput).
         245  +
    pub fn builder() -> crate::operation::create_association_batch::builders::CreateAssociationBatchOutputBuilder {
         246  +
        crate::operation::create_association_batch::builders::CreateAssociationBatchOutputBuilder::default()
         247  +
    }
         248  +
}
         249  +
         250  +
/// A builder for [`CreateAssociationBatchOutput`](crate::operation::create_association_batch::CreateAssociationBatchOutput).
         251  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         252  +
#[non_exhaustive]
         253  +
pub struct CreateAssociationBatchOutputBuilder {
         254  +
    pub(crate) successful: ::std::option::Option<::std::vec::Vec<crate::types::AssociationDescription>>,
         255  +
    pub(crate) failed: ::std::option::Option<::std::vec::Vec<crate::types::FailedCreateAssociation>>,
         256  +
    _request_id: Option<String>,
         257  +
}
         258  +
impl CreateAssociationBatchOutputBuilder {
         259  +
    /// Appends an item to `successful`.
         260  +
    ///
         261  +
    /// To override the contents of this collection use [`set_successful`](Self::set_successful).
         262  +
    ///
         263  +
    /// <p>Information about the associations that succeeded.</p>
         264  +
    pub fn successful(mut self, input: crate::types::AssociationDescription) -> Self {
         265  +
        let mut v = self.successful.unwrap_or_default();
         266  +
        v.push(input);
         267  +
        self.successful = ::std::option::Option::Some(v);
         268  +
        self
         269  +
    }
         270  +
    /// <p>Information about the associations that succeeded.</p>
         271  +
    pub fn set_successful(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssociationDescription>>) -> Self {
         272  +
        self.successful = input;
         273  +
        self
         274  +
    }
         275  +
    /// <p>Information about the associations that succeeded.</p>
         276  +
    pub fn get_successful(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociationDescription>> {
         277  +
        &self.successful
         278  +
    }
         279  +
    /// Appends an item to `failed`.
         280  +
    ///
         281  +
    /// To override the contents of this collection use [`set_failed`](Self::set_failed).
         282  +
    ///
         283  +
    /// <p>Information about the associations that failed.</p>
         284  +
    pub fn failed(mut self, input: crate::types::FailedCreateAssociation) -> Self {
         285  +
        let mut v = self.failed.unwrap_or_default();
         286  +
        v.push(input);
         287  +
        self.failed = ::std::option::Option::Some(v);
         288  +
        self
         289  +
    }
         290  +
    /// <p>Information about the associations that failed.</p>
         291  +
    pub fn set_failed(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedCreateAssociation>>) -> Self {
         292  +
        self.failed = input;
         293  +
        self
         294  +
    }
         295  +
    /// <p>Information about the associations that failed.</p>
         296  +
    pub fn get_failed(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedCreateAssociation>> {
         297  +
        &self.failed
         298  +
    }
         299  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         300  +
        self._request_id = Some(request_id.into());
         301  +
        self
         302  +
    }
         303  +
         304  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         305  +
        self._request_id = request_id;
         306  +
        self
         307  +
    }
         308  +
    /// Consumes the builder and constructs a [`CreateAssociationBatchOutput`](crate::operation::create_association_batch::CreateAssociationBatchOutput).
         309  +
    pub fn build(self) -> crate::operation::create_association_batch::CreateAssociationBatchOutput {
         310  +
        crate::operation::create_association_batch::CreateAssociationBatchOutput {
         311  +
            successful: self.successful,
         312  +
            failed: self.failed,
         313  +
            _request_id: self._request_id,
         314  +
        }
         315  +
    }
         316  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/create_association_batch/builders.rs

@@ -0,1 +0,155 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::create_association_batch::_create_association_batch_input::CreateAssociationBatchInputBuilder;
           3  +
           4  +
pub use crate::operation::create_association_batch::_create_association_batch_output::CreateAssociationBatchOutputBuilder;
           5  +
           6  +
impl crate::operation::create_association_batch::builders::CreateAssociationBatchInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::create_association_batch::CreateAssociationBatchOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::create_association_batch::CreateAssociationBatchError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.create_association_batch();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `CreateAssociationBatch`.
          24  +
///
          25  +
/// <p>Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes or targets.</p>
          26  +
/// <p>When you associate a document with one or more managed nodes using IDs or tags, Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed node processes the document and configures the node as specified.</p>
          27  +
/// <p>If you associate a document with a managed node that already has an associated document, the system returns the AssociationAlreadyExists exception.</p>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct CreateAssociationBatchFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::create_association_batch::builders::CreateAssociationBatchInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::create_association_batch::CreateAssociationBatchOutput,
          37  +
        crate::operation::create_association_batch::CreateAssociationBatchError,
          38  +
    > for CreateAssociationBatchFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::create_association_batch::CreateAssociationBatchOutput,
          46  +
            crate::operation::create_association_batch::CreateAssociationBatchError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl CreateAssociationBatchFluentBuilder {
          53  +
    /// Creates a new `CreateAssociationBatchFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the CreateAssociationBatch as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::create_association_batch::builders::CreateAssociationBatchInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::create_association_batch::CreateAssociationBatchOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::create_association_batch::CreateAssociationBatchError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::create_association_batch::CreateAssociationBatch::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::create_association_batch::CreateAssociationBatch::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::create_association_batch::CreateAssociationBatchOutput,
          99  +
        crate::operation::create_association_batch::CreateAssociationBatchError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    ///
         114  +
    /// Appends an item to `Entries`.
         115  +
    ///
         116  +
    /// To override the contents of this collection use [`set_entries`](Self::set_entries).
         117  +
    ///
         118  +
    /// <p>One or more associations.</p>
         119  +
    pub fn entries(mut self, input: crate::types::CreateAssociationBatchRequestEntry) -> Self {
         120  +
        self.inner = self.inner.entries(input);
         121  +
        self
         122  +
    }
         123  +
    /// <p>One or more associations.</p>
         124  +
    pub fn set_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateAssociationBatchRequestEntry>>) -> Self {
         125  +
        self.inner = self.inner.set_entries(input);
         126  +
        self
         127  +
    }
         128  +
    /// <p>One or more associations.</p>
         129  +
    pub fn get_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateAssociationBatchRequestEntry>> {
         130  +
        self.inner.get_entries()
         131  +
    }
         132  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         133  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         134  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         135  +
    /// </note>
         136  +
    pub fn association_dispatch_assume_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         137  +
        self.inner = self.inner.association_dispatch_assume_role(input.into());
         138  +
        self
         139  +
    }
         140  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         141  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         142  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         143  +
    /// </note>
         144  +
    pub fn set_association_dispatch_assume_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         145  +
        self.inner = self.inner.set_association_dispatch_assume_role(input);
         146  +
        self
         147  +
    }
         148  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         149  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         150  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         151  +
    /// </note>
         152  +
    pub fn get_association_dispatch_assume_role(&self) -> &::std::option::Option<::std::string::String> {
         153  +
        self.inner.get_association_dispatch_assume_role()
         154  +
    }
         155  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/create_cloud_connector.rs

@@ -0,1 +0,617 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `CreateCloudConnector`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct CreateCloudConnector;
           6  +
impl CreateCloudConnector {
           7  +
    /// Creates a new `CreateCloudConnector`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          13  +
        crate::operation::create_cloud_connector::CreateCloudConnectorInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::create_cloud_connector::CreateCloudConnectorOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::create_cloud_connector::CreateCloudConnectorInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::create_cloud_connector::CreateCloudConnectorOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::create_cloud_connector::CreateCloudConnectorError,
          24  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          25  +
        >,
          26  +
    > {
          27  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          28  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          29  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          30  +
        >| {
          31  +
            err.map_service_error(|err| {
          32  +
                err.downcast::<crate::operation::create_cloud_connector::CreateCloudConnectorError>()
          33  +
                    .expect("correct error type")
          34  +
            })
          35  +
        };
          36  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          37  +
            .await
          38  +
            .map_err(map_err)?;
          39  +
        let output = context.finalize().map_err(map_err)?;
          40  +
        ::std::result::Result::Ok(
          41  +
            output
          42  +
                .downcast::<crate::operation::create_cloud_connector::CreateCloudConnectorOutput>()
          43  +
                .expect("correct output type"),
          44  +
        )
          45  +
    }
          46  +
          47  +
    pub(crate) async fn orchestrate_with_stop_point(
          48  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          49  +
        input: crate::operation::create_cloud_connector::CreateCloudConnectorInput,
          50  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          51  +
    ) -> ::std::result::Result<
          52  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          53  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          54  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          55  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          56  +
        >,
          57  +
    > {
          58  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          59  +
        use ::tracing::Instrument;
          60  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "CreateCloudConnector", input, runtime_plugins, stop_point)
          61  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          62  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          63  +
            .instrument(::tracing::debug_span!(
          64  +
                "SSM.CreateCloudConnector",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "CreateCloudConnector",
          67  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          68  +
                "rpc.system" = "aws-api",
          69  +
            ))
          70  +
            .await
          71  +
    }
          72  +
          73  +
    pub(crate) fn operation_runtime_plugins(
          74  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          75  +
        client_config: &crate::config::Config,
          76  +
        config_override: ::std::option::Option<crate::config::Builder>,
          77  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          78  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          79  +
          80  +
        if let ::std::option::Option::Some(config_override) = config_override {
          81  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          82  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          83  +
            }
          84  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          85  +
                config_override,
          86  +
                client_config.config.clone(),
          87  +
                &client_config.runtime_components,
          88  +
            ));
          89  +
        }
          90  +
        runtime_plugins
          91  +
    }
          92  +
}
          93  +
/// Per-operation error registry. Contains an entry for every modeled
          94  +
/// error this operation can throw.
          95  +
///
          96  +
/// Used by the schema-serde error path as the operation-scoped lookup
          97  +
/// for registry-backed error reification: an error code that does not
          98  +
/// match one of the operation's modeled errors directly is resolved
          99  +
/// against this registry first, then widened to the service-wide error
         100  +
/// registry.
         101  +
pub(crate) mod error_registry {
         102  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         103  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         104  +
                            .insert_error_shape(
         105  +
                        crate::types::error::ConflictException::SCHEMA,
         106  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         107  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ConflictException::deserialize(d)?))
         108  +
                        },
         109  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         110  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ConflictException::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::InternalServerError::SCHEMA,
         115  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         116  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         117  +
                        },
         118  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         119  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
.insert_error_shape(
         123  +
                        crate::types::error::ServiceQuotaExceededException::SCHEMA,
         124  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         125  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ServiceQuotaExceededException::deserialize(d)?))
         126  +
                        },
         127  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         128  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ServiceQuotaExceededException::deserialize(d)?))
         129  +
                        },
         130  +
                    )
         131  +
                            .build()
         132  +
    });
         133  +
}
         134  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateCloudConnector {
         135  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         136  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateCloudConnector");
         137  +
         138  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         139  +
            CreateCloudConnectorRequestSerializer,
         140  +
        ));
         141  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         142  +
            CreateCloudConnectorResponseDeserializer,
         143  +
        ));
         144  +
         145  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         146  +
            crate::config::auth::Params::builder()
         147  +
                .operation_name("CreateCloudConnector")
         148  +
                .build()
         149  +
                .expect("required fields set"),
         150  +
        ));
         151  +
         152  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         153  +
            "CreateCloudConnector",
         154  +
            "SSM",
         155  +
        ));
         156  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         157  +
        signing_options.double_uri_encode = true;
         158  +
        signing_options.content_sha256_header = false;
         159  +
        signing_options.normalize_uri_path = true;
         160  +
        signing_options.payload_override = None;
         161  +
         162  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         163  +
            signing_options,
         164  +
            ..::std::default::Default::default()
         165  +
        });
         166  +
         167  +
        ::std::option::Option::Some(cfg.freeze())
         168  +
    }
         169  +
         170  +
    fn runtime_components(
         171  +
        &self,
         172  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         173  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         174  +
        #[allow(unused_mut)]
         175  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateCloudConnector")
         176  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         177  +
                CreateCloudConnectorTelemetryInputCaptureInterceptor,
         178  +
            ))
         179  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         180  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         181  +
            ))
         182  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         183  +
                CreateCloudConnectorEndpointParamsInterceptor,
         184  +
            ))
         185  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         186  +
                crate::operation::create_cloud_connector::CreateCloudConnectorError,
         187  +
            >::new())
         188  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         189  +
                crate::operation::create_cloud_connector::CreateCloudConnectorError,
         190  +
            >::new())
         191  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         192  +
                crate::operation::create_cloud_connector::CreateCloudConnectorError,
         193  +
            >::new())
         194  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         195  +
                crate::operation::create_cloud_connector::CreateCloudConnectorError,
         196  +
            >::new());
         197  +
         198  +
        ::std::borrow::Cow::Owned(rcb)
         199  +
    }
         200  +
}
         201  +
         202  +
#[derive(Debug)]
         203  +
struct CreateCloudConnectorTelemetryInputCaptureInterceptor;
         204  +
         205  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         206  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateCloudConnectorTelemetryInputCaptureInterceptor {
         207  +
    fn name(&self) -> &'static str {
         208  +
        "CreateCloudConnectorTelemetryInputCaptureInterceptor"
         209  +
    }
         210  +
         211  +
    fn read_before_execution(
         212  +
        &self,
         213  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         214  +
            '_,
         215  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         216  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         217  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         218  +
        >,
         219  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         220  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         221  +
        // Nothing to do unless the customer opted in by naming members to record.
         222  +
        let ::std::option::Option::Some(requested) = cfg
         223  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         224  +
            .filter(|r| !r.is_empty())
         225  +
        else {
         226  +
            return ::std::result::Result::Ok(());
         227  +
        };
         228  +
         229  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateCloudConnectorInput>() else {
         230  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         231  +
            return ::std::result::Result::Ok(());
         232  +
        };
         233  +
         234  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         235  +
        if requested.should_capture("DisplayName") {
         236  +
            if let ::std::option::Option::Some(value) = input.display_name.as_deref() {
         237  +
                captured.insert("DisplayName", value);
         238  +
            }
         239  +
        }
         240  +
        if requested.should_capture("RoleArn") {
         241  +
            if let ::std::option::Option::Some(value) = input.role_arn.as_deref() {
         242  +
                captured.insert("RoleArn", value);
         243  +
            }
         244  +
        }
         245  +
        if requested.should_capture("Description") {
         246  +
            if let ::std::option::Option::Some(value) = input.description.as_deref() {
         247  +
                captured.insert("Description", value);
         248  +
            }
         249  +
        }
         250  +
        if requested.should_capture("ConfigConnectorArn") {
         251  +
            if let ::std::option::Option::Some(value) = input.config_connector_arn.as_deref() {
         252  +
                captured.insert("ConfigConnectorArn", value);
         253  +
            }
         254  +
        }
         255  +
         256  +
        cfg.interceptor_state().store_put(captured);
         257  +
        ::std::result::Result::Ok(())
         258  +
    }
         259  +
}
         260  +
#[derive(Debug)]
         261  +
struct CreateCloudConnectorResponseDeserializer;
         262  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateCloudConnectorResponseDeserializer {
         263  +
    fn deserialize_nonstreaming_with_config(
         264  +
        &self,
         265  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         266  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         267  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         268  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         269  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         270  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         271  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         272  +
        // loads `body` before firing this hook.
         273  +
        let body = response.body().bytes().expect("body loaded");
         274  +
        let headers = response.headers();
         275  +
        #[allow(unused_mut)]
         276  +
        let mut force_error = false;
         277  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         278  +
        if !success && status != 200 || force_error {
         279  +
            let protocol = _cfg
         280  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         281  +
                .expect("a SharedClientProtocol is required");
         282  +
            #[allow(unused_mut)]
         283  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         284  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         285  +
            })?;
         286  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         287  +
            let generic = generic_builder.build();
         288  +
            let error_code = match generic.code() {
         289  +
                ::std::option::Option::Some(code) => code,
         290  +
                ::std::option::Option::None => {
         291  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         293  +
                            crate::operation::create_cloud_connector::CreateCloudConnectorError::unhandled(generic),
         294  +
                        ),
         295  +
                    ))
         296  +
                }
         297  +
            };
         298  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         299  +
            let err = match error_code {
         300  +
                "ConflictException" => crate::operation::create_cloud_connector::CreateCloudConnectorError::ConflictException({
         301  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         302  +
                        crate::types::error::ConflictException::deserialize_with_response(
         303  +
                            &mut *deser,
         304  +
                            response.headers(),
         305  +
                            response.status().into(),
         306  +
                            body,
         307  +
                        )
         308  +
                    }) {
         309  +
                        ::std::result::Result::Ok(val) => val,
         310  +
                        ::std::result::Result::Err(e) => {
         311  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         312  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         313  +
                            ))
         314  +
                        }
         315  +
                    };
         316  +
                    tmp.meta = generic;
         317  +
                    if tmp.message.is_none() {
         318  +
                        tmp.message = _error_message;
         319  +
                    }
         320  +
                    tmp
         321  +
                }),
         322  +
                "InternalServerError" => crate::operation::create_cloud_connector::CreateCloudConnectorError::InternalServerError({
         323  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         324  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         325  +
                            &mut *deser,
         326  +
                            response.headers(),
         327  +
                            response.status().into(),
         328  +
                            body,
         329  +
                        )
         330  +
                    }) {
         331  +
                        ::std::result::Result::Ok(val) => val,
         332  +
                        ::std::result::Result::Err(e) => {
         333  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         334  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         335  +
                            ))
         336  +
                        }
         337  +
                    };
         338  +
                    tmp.meta = generic;
         339  +
                    if tmp.message.is_none() {
         340  +
                        tmp.message = _error_message;
         341  +
                    }
         342  +
                    tmp
         343  +
                }),
         344  +
                "ServiceQuotaExceededException" => {
         345  +
                    crate::operation::create_cloud_connector::CreateCloudConnectorError::ServiceQuotaExceededException({
         346  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         347  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         348  +
                                &mut *deser,
         349  +
                                response.headers(),
         350  +
                                response.status().into(),
         351  +
                                body,
         352  +
                            )
         353  +
                        }) {
         354  +
                            ::std::result::Result::Ok(val) => val,
         355  +
                            ::std::result::Result::Err(e) => {
         356  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         357  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         358  +
                                ))
         359  +
                            }
         360  +
                        };
         361  +
                        tmp.meta = generic;
         362  +
                        tmp
         363  +
                    })
         364  +
                }
         365  +
                _ => {
         366  +
                    // Registry-backed, operation-scoped reification of an error whose
         367  +
                    // code this operation does not model directly: the operation's own
         368  +
                    // error registry is consulted first, then the lookup widens to the
         369  +
                    // service-wide error registry. On a hit, the reified error is attached
         370  +
                    // as the source of the returned unhandled error while its metadata
         371  +
                    // (code, message, request id) is preserved; on a miss the generic
         372  +
                    // error is returned unchanged.
         373  +
                    match protocol
         374  +
                        .deserialize_error_response(response, _cfg)
         375  +
                        .ok()
         376  +
                        .and_then(|mut deser| {
         377  +
                            ::aws_smithy_schema::registry::reify_error(
         378  +
                                crate::operation::create_cloud_connector::error_registry::REGISTRY
         379  +
                                    .or(&crate::error_type_registry::REGISTRY),
         380  +
                                error_code,
         381  +
                                &mut *deser,
         382  +
                            )
         383  +
                        }) {
         384  +
                        ::std::option::Option::Some(source) => <crate::operation::create_cloud_connector::CreateCloudConnectorError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         385  +
                        ::std::option::Option::None => crate::operation::create_cloud_connector::CreateCloudConnectorError::generic(generic),
         386  +
                    }
         387  +
                }
         388  +
            };
         389  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         390  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         391  +
            ))
         392  +
        } else {
         393  +
            let protocol = _cfg
         394  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         395  +
                .expect("a SharedClientProtocol is required");
         396  +
            let mut deser = protocol
         397  +
                .deserialize_response(response, CreateCloudConnector::OUTPUT_SCHEMA, _cfg)
         398  +
                .map_err(|e| {
         399  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         400  +
                })?;
         401  +
            // body and headers are already in scope from the top of the function;
         402  +
            // alias `headers` as `_response_headers` so MutateOutput
         403  +
            // customizations have a stable name to read from.
         404  +
            let _response_headers = headers;
         405  +
            #[allow(unused_mut)]
         406  +
            let mut output = crate::operation::create_cloud_connector::CreateCloudConnectorOutput::deserialize_with_response(
         407  +
                &mut *deser,
         408  +
                _response_headers,
         409  +
                response.status().into(),
         410  +
                body,
         411  +
            )
         412  +
            .map_err(|e| {
         413  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         414  +
            })?;
         415  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         416  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         417  +
        }
         418  +
    }
         419  +
}
         420  +
#[derive(Debug)]
         421  +
struct CreateCloudConnectorRequestSerializer;
         422  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateCloudConnectorRequestSerializer {
         423  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         424  +
    fn serialize_input(
         425  +
        &self,
         426  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         427  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         428  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         429  +
        let input = input
         430  +
            .downcast::<crate::operation::create_cloud_connector::CreateCloudConnectorInput>()
         431  +
            .expect("correct type");
         432  +
         433  +
        let protocol = _cfg
         434  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         435  +
            .expect("a SharedClientProtocol is required");
         436  +
        let mut request = protocol
         437  +
            .serialize_request(&input, CreateCloudConnector::INPUT_SCHEMA, "/", _cfg)
         438  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         439  +
         440  +
        return ::std::result::Result::Ok(request);
         441  +
    }
         442  +
}
         443  +
#[derive(Debug)]
         444  +
struct CreateCloudConnectorEndpointParamsInterceptor;
         445  +
         446  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         447  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateCloudConnectorEndpointParamsInterceptor {
         448  +
    fn name(&self) -> &'static str {
         449  +
        "CreateCloudConnectorEndpointParamsInterceptor"
         450  +
    }
         451  +
         452  +
    fn read_before_execution(
         453  +
        &self,
         454  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         455  +
            '_,
         456  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         457  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         458  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         459  +
        >,
         460  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         461  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         462  +
        let _input = context
         463  +
            .input()
         464  +
            .downcast_ref::<CreateCloudConnectorInput>()
         465  +
            .ok_or("failed to downcast to CreateCloudConnectorInput")?;
         466  +
         467  +
        let params = crate::config::endpoint::Params::builder()
         468  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         469  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         470  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         471  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         472  +
            .build()
         473  +
            .map_err(|err| {
         474  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         475  +
            })?;
         476  +
        cfg.interceptor_state()
         477  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         478  +
        ::std::result::Result::Ok(())
         479  +
    }
         480  +
}
         481  +
         482  +
// The get_* functions below are generated from JMESPath expressions in the
         483  +
// operationContextParams trait. They target the operation's input shape.
         484  +
         485  +
/// Error type for the `CreateCloudConnectorError` operation.
         486  +
#[non_exhaustive]
         487  +
#[derive(::std::fmt::Debug)]
         488  +
pub enum CreateCloudConnectorError {
         489  +
    /// <p>An error occurred because of a conflict with a concurrent request or the current state of the resource. Retry your request.</p>
         490  +
    ConflictException(crate::types::error::ConflictException),
         491  +
    /// <p>An error occurred on the server side.</p>
         492  +
    InternalServerError(crate::types::error::InternalServerError),
         493  +
    /// <p>The request exceeds the service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
         494  +
    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
         495  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         496  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         497  +
    variable wildcard pattern and check `.code()`:
         498  +
     \
         499  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         500  +
     \
         501  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateCloudConnectorError) for what information is available for the error.")]
         502  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         503  +
}
         504  +
impl CreateCloudConnectorError {
         505  +
    /// Creates the `CreateCloudConnectorError::Unhandled` variant from any error type.
         506  +
    pub fn unhandled(
         507  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         508  +
    ) -> Self {
         509  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         510  +
            source: err.into(),
         511  +
            meta: ::std::default::Default::default(),
         512  +
        })
         513  +
    }
         514  +
         515  +
    /// Creates the `CreateCloudConnectorError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         516  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         517  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         518  +
            source: err.clone().into(),
         519  +
            meta: err,
         520  +
        })
         521  +
    }
         522  +
    ///
         523  +
    /// Returns error metadata, which includes the error code, message,
         524  +
    /// request ID, and potentially additional information.
         525  +
    ///
         526  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         527  +
        match self {
         528  +
            Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         529  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         530  +
            Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         531  +
            Self::Unhandled(e) => &e.meta,
         532  +
        }
         533  +
    }
         534  +
    /// Returns `true` if the error kind is `CreateCloudConnectorError::ConflictException`.
         535  +
    pub fn is_conflict_exception(&self) -> bool {
         536  +
        matches!(self, Self::ConflictException(_))
         537  +
    }
         538  +
    /// Returns `true` if the error kind is `CreateCloudConnectorError::InternalServerError`.
         539  +
    pub fn is_internal_server_error(&self) -> bool {
         540  +
        matches!(self, Self::InternalServerError(_))
         541  +
    }
         542  +
    /// Returns `true` if the error kind is `CreateCloudConnectorError::ServiceQuotaExceededException`.
         543  +
    pub fn is_service_quota_exceeded_exception(&self) -> bool {
         544  +
        matches!(self, Self::ServiceQuotaExceededException(_))
         545  +
    }
         546  +
}
         547  +
impl ::std::error::Error for CreateCloudConnectorError {
         548  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         549  +
        match self {
         550  +
            Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
         551  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         552  +
            Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
         553  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         554  +
        }
         555  +
    }
         556  +
}
         557  +
impl ::std::fmt::Display for CreateCloudConnectorError {
         558  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         559  +
        match self {
         560  +
            Self::ConflictException(_inner) => _inner.fmt(f),
         561  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         562  +
            Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
         563  +
            Self::Unhandled(_inner) => {
         564  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         565  +
                    write!(f, "unhandled error ({code})")
         566  +
                } else {
         567  +
                    f.write_str("unhandled error")
         568  +
                }
         569  +
            }
         570  +
        }
         571  +
    }
         572  +
}
         573  +
impl ::aws_smithy_types::retry::ProvideErrorKind for CreateCloudConnectorError {
         574  +
    fn code(&self) -> ::std::option::Option<&str> {
         575  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         576  +
    }
         577  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         578  +
        ::std::option::Option::None
         579  +
    }
         580  +
}
         581  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateCloudConnectorError {
         582  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         583  +
        match self {
         584  +
            Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         585  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         586  +
            Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         587  +
            Self::Unhandled(_inner) => &_inner.meta,
         588  +
        }
         589  +
    }
         590  +
}
         591  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateCloudConnectorError {
         592  +
    fn create_unhandled_error(
         593  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         594  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         595  +
    ) -> Self {
         596  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         597  +
            source,
         598  +
            meta: meta.unwrap_or_default(),
         599  +
        })
         600  +
    }
         601  +
}
         602  +
impl ::aws_types::request_id::RequestId for crate::operation::create_cloud_connector::CreateCloudConnectorError {
         603  +
    fn request_id(&self) -> Option<&str> {
         604  +
        self.meta().request_id()
         605  +
    }
         606  +
}
         607  +
         608  +
pub use crate::operation::create_cloud_connector::_create_cloud_connector_input::CreateCloudConnectorInput;
         609  +
         610  +
pub use crate::operation::create_cloud_connector::_create_cloud_connector_output::CreateCloudConnectorOutput;
         611  +
         612  +
mod _create_cloud_connector_input;
         613  +
         614  +
mod _create_cloud_connector_output;
         615  +
         616  +
/// Builders
         617  +
pub mod builders;