AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

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

@@ -0,1 +0,281 @@
           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 StartAccessRequestInput {
           6  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
           7  +
    pub reason: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The node you are requesting access to.</p>
           9  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          10  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
          11  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
          12  +
}
          13  +
impl StartAccessRequestInput {
          14  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
          15  +
    pub fn reason(&self) -> ::std::option::Option<&str> {
          16  +
        self.reason.as_deref()
          17  +
    }
          18  +
    /// <p>The node you are requesting access to.</p>
          19  +
    ///
          20  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
          21  +
    pub fn targets(&self) -> &[crate::types::Target] {
          22  +
        self.targets.as_deref().unwrap_or_default()
          23  +
    }
          24  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
          25  +
    ///
          26  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
          27  +
    pub fn tags(&self) -> &[crate::types::Tag] {
          28  +
        self.tags.as_deref().unwrap_or_default()
          29  +
    }
          30  +
}
          31  +
static STARTACCESSREQUESTINPUT_MEMBER_REASON: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_parts(
          33  +
        "com.amazonaws.ssm.synthetic#StartAccessRequestInput$Reason",
          34  +
        "com.amazonaws.ssm.synthetic",
          35  +
        "StartAccessRequestInput",
          36  +
    ),
          37  +
    ::aws_smithy_schema::ShapeType::String,
          38  +
    "Reason",
          39  +
    0,
          40  +
);
          41  +
static STARTACCESSREQUESTINPUT_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
          43  +
    ::aws_smithy_schema::ShapeType::Structure,
          44  +
    "member",
          45  +
    0,
          46  +
);
          47  +
static STARTACCESSREQUESTINPUT_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm.synthetic#StartAccessRequestInput$Targets",
          50  +
        "com.amazonaws.ssm.synthetic",
          51  +
        "StartAccessRequestInput",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::List,
          54  +
    "Targets",
          55  +
    1,
          56  +
)
          57  +
.with_list_member(&STARTACCESSREQUESTINPUT_MEMBER_TARGETS_MEMBER);
          58  +
static STARTACCESSREQUESTINPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
          60  +
    ::aws_smithy_schema::ShapeType::Structure,
          61  +
    "member",
          62  +
    0,
          63  +
);
          64  +
static STARTACCESSREQUESTINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          65  +
    ::aws_smithy_schema::ShapeId::from_parts(
          66  +
        "com.amazonaws.ssm.synthetic#StartAccessRequestInput$Tags",
          67  +
        "com.amazonaws.ssm.synthetic",
          68  +
        "StartAccessRequestInput",
          69  +
    ),
          70  +
    ::aws_smithy_schema::ShapeType::List,
          71  +
    "Tags",
          72  +
    2,
          73  +
)
          74  +
.with_list_member(&STARTACCESSREQUESTINPUT_MEMBER_TAGS_MEMBER);
          75  +
static STARTACCESSREQUESTINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          76  +
    ::aws_smithy_schema::ShapeId::from_parts(
          77  +
        "com.amazonaws.ssm.synthetic#StartAccessRequestInput",
          78  +
        "com.amazonaws.ssm.synthetic",
          79  +
        "StartAccessRequestInput",
          80  +
    ),
          81  +
    ::aws_smithy_schema::ShapeType::Structure,
          82  +
    &[
          83  +
        &STARTACCESSREQUESTINPUT_MEMBER_REASON,
          84  +
        &STARTACCESSREQUESTINPUT_MEMBER_TARGETS,
          85  +
        &STARTACCESSREQUESTINPUT_MEMBER_TAGS,
          86  +
    ],
          87  +
)
          88  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          89  +
.with_original_name("StartAccessRequestRequest");
          90  +
impl StartAccessRequestInput {
          91  +
    /// The schema for this shape.
          92  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &STARTACCESSREQUESTINPUT_SCHEMA;
          93  +
}
          94  +
impl ::aws_smithy_schema::serde::SerializableStruct for StartAccessRequestInput {
          95  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          96  +
    fn serialize_members(
          97  +
        &self,
          98  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          99  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         100  +
        if let Some(ref val) = self.reason {
         101  +
            ser.write_string(&STARTACCESSREQUESTINPUT_MEMBER_REASON, val)?;
         102  +
        }
         103  +
        if let Some(ref val) = self.targets {
         104  +
            ser.write_list(
         105  +
                &STARTACCESSREQUESTINPUT_MEMBER_TARGETS,
         106  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         107  +
                    for item in val {
         108  +
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
         109  +
                    }
         110  +
                    Ok(())
         111  +
                },
         112  +
            )?;
         113  +
        }
         114  +
        if let Some(ref val) = self.tags {
         115  +
            ser.write_list(
         116  +
                &STARTACCESSREQUESTINPUT_MEMBER_TAGS,
         117  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         118  +
                    for item in val {
         119  +
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
         120  +
                    }
         121  +
                    Ok(())
         122  +
                },
         123  +
            )?;
         124  +
        }
         125  +
        Ok(())
         126  +
    }
         127  +
}
         128  +
impl StartAccessRequestInput {
         129  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         130  +
    pub fn deserialize(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         133  +
        #[allow(unused_variables, unused_mut)]
         134  +
        let mut builder = Self::builder();
         135  +
        #[allow(
         136  +
            unused_variables,
         137  +
            unreachable_code,
         138  +
            clippy::single_match,
         139  +
            clippy::match_single_binding,
         140  +
            clippy::diverging_sub_expression
         141  +
        )]
         142  +
        deserializer.read_struct(&STARTACCESSREQUESTINPUT_SCHEMA, &mut |member, deser| {
         143  +
            match member.member_index() {
         144  +
                Some(0) => {
         145  +
                    if deser.is_null() {
         146  +
                        deser.read_null()?;
         147  +
                    } else {
         148  +
                        builder.reason = Some(deser.read_string(member)?);
         149  +
                    }
         150  +
                }
         151  +
                Some(1) => {
         152  +
                    if deser.is_null() {
         153  +
                        deser.read_null()?;
         154  +
                    } else {
         155  +
                        builder.targets = Some({
         156  +
                            let mut container = Vec::new();
         157  +
                            deser.read_list(member, &mut |deser| {
         158  +
                                container.push(crate::types::Target::deserialize(deser)?);
         159  +
                                Ok(())
         160  +
                            })?;
         161  +
                            container
         162  +
                        });
         163  +
                    }
         164  +
                }
         165  +
                Some(2) => {
         166  +
                    if deser.is_null() {
         167  +
                        deser.read_null()?;
         168  +
                    } else {
         169  +
                        builder.tags = Some({
         170  +
                            let mut container = Vec::new();
         171  +
                            deser.read_list(member, &mut |deser| {
         172  +
                                container.push(crate::types::Tag::deserialize(deser)?);
         173  +
                                Ok(())
         174  +
                            })?;
         175  +
                            container
         176  +
                        });
         177  +
                    }
         178  +
                }
         179  +
                _ => {}
         180  +
            }
         181  +
            Ok(())
         182  +
        })?;
         183  +
        builder.reason = builder.reason.or(Some(String::new()));
         184  +
        builder.targets = builder.targets.or(Some(Vec::new()));
         185  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         186  +
    }
         187  +
}
         188  +
impl StartAccessRequestInput {
         189  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         190  +
    pub fn deserialize_with_response(
         191  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         192  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         193  +
        _status: u16,
         194  +
        _body: &[u8],
         195  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         196  +
        Self::deserialize(deserializer)
         197  +
    }
         198  +
}
         199  +
impl StartAccessRequestInput {
         200  +
    /// Creates a new builder-style object to manufacture [`StartAccessRequestInput`](crate::operation::start_access_request::StartAccessRequestInput).
         201  +
    pub fn builder() -> crate::operation::start_access_request::builders::StartAccessRequestInputBuilder {
         202  +
        crate::operation::start_access_request::builders::StartAccessRequestInputBuilder::default()
         203  +
    }
         204  +
}
         205  +
         206  +
/// A builder for [`StartAccessRequestInput`](crate::operation::start_access_request::StartAccessRequestInput).
         207  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         208  +
#[non_exhaustive]
         209  +
pub struct StartAccessRequestInputBuilder {
         210  +
    pub(crate) reason: ::std::option::Option<::std::string::String>,
         211  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         212  +
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
         213  +
}
         214  +
impl StartAccessRequestInputBuilder {
         215  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
         216  +
    /// This field is required.
         217  +
    pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         218  +
        self.reason = ::std::option::Option::Some(input.into());
         219  +
        self
         220  +
    }
         221  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
         222  +
    pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         223  +
        self.reason = input;
         224  +
        self
         225  +
    }
         226  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
         227  +
    pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
         228  +
        &self.reason
         229  +
    }
         230  +
    /// Appends an item to `targets`.
         231  +
    ///
         232  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         233  +
    ///
         234  +
    /// <p>The node you are requesting access to.</p>
         235  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         236  +
        let mut v = self.targets.unwrap_or_default();
         237  +
        v.push(input);
         238  +
        self.targets = ::std::option::Option::Some(v);
         239  +
        self
         240  +
    }
         241  +
    /// <p>The node you are requesting access to.</p>
         242  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         243  +
        self.targets = input;
         244  +
        self
         245  +
    }
         246  +
    /// <p>The node you are requesting access to.</p>
         247  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         248  +
        &self.targets
         249  +
    }
         250  +
    /// Appends an item to `tags`.
         251  +
    ///
         252  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         253  +
    ///
         254  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
         255  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         256  +
        let mut v = self.tags.unwrap_or_default();
         257  +
        v.push(input);
         258  +
        self.tags = ::std::option::Option::Some(v);
         259  +
        self
         260  +
    }
         261  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
         262  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         263  +
        self.tags = input;
         264  +
        self
         265  +
    }
         266  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
         267  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         268  +
        &self.tags
         269  +
    }
         270  +
    /// Consumes the builder and constructs a [`StartAccessRequestInput`](crate::operation::start_access_request::StartAccessRequestInput).
         271  +
    pub fn build(
         272  +
        self,
         273  +
    ) -> ::std::result::Result<crate::operation::start_access_request::StartAccessRequestInput, ::aws_smithy_types::error::operation::BuildError>
         274  +
    {
         275  +
        ::std::result::Result::Ok(crate::operation::start_access_request::StartAccessRequestInput {
         276  +
            reason: self.reason,
         277  +
            targets: self.targets,
         278  +
            tags: self.tags,
         279  +
        })
         280  +
    }
         281  +
}

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

@@ -0,1 +0,186 @@
           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 StartAccessRequestOutput {
           6  +
    /// <p>The ID of the access request.</p>
           7  +
    pub access_request_id: ::std::option::Option<::std::string::String>,
           8  +
    _request_id: Option<String>,
           9  +
}
          10  +
impl StartAccessRequestOutput {
          11  +
    /// <p>The ID of the access request.</p>
          12  +
    pub fn access_request_id(&self) -> ::std::option::Option<&str> {
          13  +
        self.access_request_id.as_deref()
          14  +
    }
          15  +
}
          16  +
static STARTACCESSREQUESTOUTPUT_MEMBER_ACCESS_REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          17  +
    ::aws_smithy_schema::ShapeId::from_parts(
          18  +
        "com.amazonaws.ssm.synthetic#StartAccessRequestOutput$AccessRequestId",
          19  +
        "com.amazonaws.ssm.synthetic",
          20  +
        "StartAccessRequestOutput",
          21  +
    ),
          22  +
    ::aws_smithy_schema::ShapeType::String,
          23  +
    "AccessRequestId",
          24  +
    0,
          25  +
);
          26  +
static STARTACCESSREQUESTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          27  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "request_id",
          30  +
    1,
          31  +
)
          32  +
.with_http_header("x-amzn-requestid");
          33  +
static STARTACCESSREQUESTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#StartAccessRequestOutput",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "StartAccessRequestOutput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::Structure,
          40  +
    &[
          41  +
        &STARTACCESSREQUESTOUTPUT_MEMBER_ACCESS_REQUEST_ID,
          42  +
        &STARTACCESSREQUESTOUTPUT_MEMBER__REQUEST_ID,
          43  +
    ],
          44  +
)
          45  +
.with_original_name("StartAccessRequestResponse");
          46  +
impl StartAccessRequestOutput {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &STARTACCESSREQUESTOUTPUT_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for StartAccessRequestOutput {
          51  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          52  +
    fn serialize_members(
          53  +
        &self,
          54  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          55  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          56  +
        if let Some(ref val) = self.access_request_id {
          57  +
            ser.write_string(&STARTACCESSREQUESTOUTPUT_MEMBER_ACCESS_REQUEST_ID, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl StartAccessRequestOutput {
          63  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          66  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          67  +
        #[allow(unused_variables, unused_mut)]
          68  +
        let mut builder = Self::builder();
          69  +
        #[allow(
          70  +
            unused_variables,
          71  +
            unreachable_code,
          72  +
            clippy::single_match,
          73  +
            clippy::match_single_binding,
          74  +
            clippy::diverging_sub_expression
          75  +
        )]
          76  +
        deserializer.read_struct(&STARTACCESSREQUESTOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    if deser.is_null() {
          80  +
                        deser.read_null()?;
          81  +
                    } else {
          82  +
                        builder.access_request_id = Some(deser.read_string(member)?);
          83  +
                    }
          84  +
                }
          85  +
                Some(1) => {
          86  +
                    builder._request_id = Some(deser.read_string(member)?);
          87  +
                }
          88  +
                _ => {}
          89  +
            }
          90  +
            Ok(())
          91  +
        })?;
          92  +
        Ok(builder.build())
          93  +
    }
          94  +
}
          95  +
impl StartAccessRequestOutput {
          96  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          97  +
    /// Header-bound members are read directly from headers, avoiding runtime
          98  +
    /// member iteration overhead. Body members are read via the deserializer.
          99  +
    pub fn deserialize_with_response(
         100  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         101  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         102  +
        _status: u16,
         103  +
        _body: &[u8],
         104  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         105  +
        #[allow(unused_variables, unused_mut)]
         106  +
        let mut builder = Self::builder();
         107  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         108  +
            builder._request_id = Some(val.to_string());
         109  +
        }
         110  +
         111  +
        #[allow(
         112  +
            unused_variables,
         113  +
            unreachable_code,
         114  +
            clippy::single_match,
         115  +
            clippy::match_single_binding,
         116  +
            clippy::diverging_sub_expression
         117  +
        )]
         118  +
        deserializer.read_struct(&STARTACCESSREQUESTOUTPUT_SCHEMA, &mut |member, deser| {
         119  +
            match member.member_index() {
         120  +
                Some(0) => {
         121  +
                    builder.access_request_id = Some(deser.read_string(member)?);
         122  +
                }
         123  +
                _ => {}
         124  +
            }
         125  +
            Ok(())
         126  +
        })?;
         127  +
        Ok(builder.build())
         128  +
    }
         129  +
}
         130  +
impl ::aws_types::request_id::RequestId for StartAccessRequestOutput {
         131  +
    fn request_id(&self) -> Option<&str> {
         132  +
        self._request_id.as_deref()
         133  +
    }
         134  +
}
         135  +
impl StartAccessRequestOutput {
         136  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         137  +
        self._request_id = request_id;
         138  +
        self
         139  +
    }
         140  +
}
         141  +
impl StartAccessRequestOutput {
         142  +
    /// Creates a new builder-style object to manufacture [`StartAccessRequestOutput`](crate::operation::start_access_request::StartAccessRequestOutput).
         143  +
    pub fn builder() -> crate::operation::start_access_request::builders::StartAccessRequestOutputBuilder {
         144  +
        crate::operation::start_access_request::builders::StartAccessRequestOutputBuilder::default()
         145  +
    }
         146  +
}
         147  +
         148  +
/// A builder for [`StartAccessRequestOutput`](crate::operation::start_access_request::StartAccessRequestOutput).
         149  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         150  +
#[non_exhaustive]
         151  +
pub struct StartAccessRequestOutputBuilder {
         152  +
    pub(crate) access_request_id: ::std::option::Option<::std::string::String>,
         153  +
    _request_id: Option<String>,
         154  +
}
         155  +
impl StartAccessRequestOutputBuilder {
         156  +
    /// <p>The ID of the access request.</p>
         157  +
    pub fn access_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         158  +
        self.access_request_id = ::std::option::Option::Some(input.into());
         159  +
        self
         160  +
    }
         161  +
    /// <p>The ID of the access request.</p>
         162  +
    pub fn set_access_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         163  +
        self.access_request_id = input;
         164  +
        self
         165  +
    }
         166  +
    /// <p>The ID of the access request.</p>
         167  +
    pub fn get_access_request_id(&self) -> &::std::option::Option<::std::string::String> {
         168  +
        &self.access_request_id
         169  +
    }
         170  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         171  +
        self._request_id = Some(request_id.into());
         172  +
        self
         173  +
    }
         174  +
         175  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         176  +
        self._request_id = request_id;
         177  +
        self
         178  +
    }
         179  +
    /// Consumes the builder and constructs a [`StartAccessRequestOutput`](crate::operation::start_access_request::StartAccessRequestOutput).
         180  +
    pub fn build(self) -> crate::operation::start_access_request::StartAccessRequestOutput {
         181  +
        crate::operation::start_access_request::StartAccessRequestOutput {
         182  +
            access_request_id: self.access_request_id,
         183  +
            _request_id: self._request_id,
         184  +
        }
         185  +
    }
         186  +
}

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

@@ -0,1 +0,163 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::start_access_request::_start_access_request_input::StartAccessRequestInputBuilder;
           3  +
           4  +
pub use crate::operation::start_access_request::_start_access_request_output::StartAccessRequestOutputBuilder;
           5  +
           6  +
impl crate::operation::start_access_request::builders::StartAccessRequestInputBuilder {
           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::start_access_request::StartAccessRequestOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::start_access_request::StartAccessRequestError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.start_access_request();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `StartAccessRequest`.
          24  +
///
          25  +
/// <p>Starts the workflow for just-in-time node access sessions.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct StartAccessRequestFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::start_access_request::builders::StartAccessRequestInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::start_access_request::StartAccessRequestOutput,
          35  +
        crate::operation::start_access_request::StartAccessRequestError,
          36  +
    > for StartAccessRequestFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::start_access_request::StartAccessRequestOutput,
          44  +
            crate::operation::start_access_request::StartAccessRequestError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl StartAccessRequestFluentBuilder {
          51  +
    /// Creates a new `StartAccessRequestFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the StartAccessRequest as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::start_access_request::builders::StartAccessRequestInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::start_access_request::StartAccessRequestOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::start_access_request::StartAccessRequestError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::start_access_request::StartAccessRequest::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::start_access_request::StartAccessRequest::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::start_access_request::StartAccessRequestOutput,
          97  +
        crate::operation::start_access_request::StartAccessRequestError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
         112  +
    pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.reason(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
         117  +
    pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_reason(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>A brief description explaining why you are requesting access to the node.</p>
         122  +
    pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_reason()
         124  +
    }
         125  +
    ///
         126  +
    /// Appends an item to `Targets`.
         127  +
    ///
         128  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         129  +
    ///
         130  +
    /// <p>The node you are requesting access to.</p>
         131  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         132  +
        self.inner = self.inner.targets(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>The node you are requesting access to.</p>
         136  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         137  +
        self.inner = self.inner.set_targets(input);
         138  +
        self
         139  +
    }
         140  +
    /// <p>The node you are requesting access to.</p>
         141  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         142  +
        self.inner.get_targets()
         143  +
    }
         144  +
    ///
         145  +
    /// Appends an item to `Tags`.
         146  +
    ///
         147  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         148  +
    ///
         149  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
         150  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         151  +
        self.inner = self.inner.tags(input);
         152  +
        self
         153  +
    }
         154  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
         155  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         156  +
        self.inner = self.inner.set_tags(input);
         157  +
        self
         158  +
    }
         159  +
    /// <p>Key-value pairs of metadata you want to assign to the access request.</p>
         160  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         161  +
        self.inner.get_tags()
         162  +
    }
         163  +
}

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

@@ -0,1 +0,516 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `StartAssociationsOnce`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct StartAssociationsOnce;
           6  +
impl StartAssociationsOnce {
           7  +
    /// Creates a new `StartAssociationsOnce`
           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::start_associations_once::StartAssociationsOnceInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::start_associations_once::StartAssociationsOnceOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::start_associations_once::StartAssociationsOnceInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::start_associations_once::StartAssociationsOnceOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::start_associations_once::StartAssociationsOnceError,
          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::start_associations_once::StartAssociationsOnceError>()
          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::start_associations_once::StartAssociationsOnceOutput>()
          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::start_associations_once::StartAssociationsOnceInput,
          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", "StartAssociationsOnce", 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.StartAssociationsOnce",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "StartAssociationsOnce",
          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::AssociationDoesNotExist::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::AssociationDoesNotExist::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::AssociationDoesNotExist::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::InvalidAssociation::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::InvalidAssociation::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::InvalidAssociation::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
                            .build()
         123  +
    });
         124  +
}
         125  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for StartAssociationsOnce {
         126  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         127  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("StartAssociationsOnce");
         128  +
         129  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         130  +
            StartAssociationsOnceRequestSerializer,
         131  +
        ));
         132  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         133  +
            StartAssociationsOnceResponseDeserializer,
         134  +
        ));
         135  +
         136  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         137  +
            crate::config::auth::Params::builder()
         138  +
                .operation_name("StartAssociationsOnce")
         139  +
                .build()
         140  +
                .expect("required fields set"),
         141  +
        ));
         142  +
         143  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         144  +
            "StartAssociationsOnce",
         145  +
            "SSM",
         146  +
        ));
         147  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         148  +
        signing_options.double_uri_encode = true;
         149  +
        signing_options.content_sha256_header = false;
         150  +
        signing_options.normalize_uri_path = true;
         151  +
        signing_options.payload_override = None;
         152  +
         153  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         154  +
            signing_options,
         155  +
            ..::std::default::Default::default()
         156  +
        });
         157  +
         158  +
        ::std::option::Option::Some(cfg.freeze())
         159  +
    }
         160  +
         161  +
    fn runtime_components(
         162  +
        &self,
         163  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         164  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         165  +
        #[allow(unused_mut)]
         166  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("StartAssociationsOnce")
         167  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         168  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         169  +
            ))
         170  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         171  +
                StartAssociationsOnceEndpointParamsInterceptor,
         172  +
            ))
         173  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         174  +
                crate::operation::start_associations_once::StartAssociationsOnceError,
         175  +
            >::new())
         176  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         177  +
                crate::operation::start_associations_once::StartAssociationsOnceError,
         178  +
            >::new())
         179  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         180  +
                crate::operation::start_associations_once::StartAssociationsOnceError,
         181  +
            >::new())
         182  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         183  +
                crate::operation::start_associations_once::StartAssociationsOnceError,
         184  +
            >::new());
         185  +
         186  +
        ::std::borrow::Cow::Owned(rcb)
         187  +
    }
         188  +
}
         189  +
         190  +
#[derive(Debug)]
         191  +
struct StartAssociationsOnceResponseDeserializer;
         192  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StartAssociationsOnceResponseDeserializer {
         193  +
    fn deserialize_nonstreaming_with_config(
         194  +
        &self,
         195  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         196  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         197  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         198  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         199  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         200  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         201  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         202  +
        // loads `body` before firing this hook.
         203  +
        let body = response.body().bytes().expect("body loaded");
         204  +
        let headers = response.headers();
         205  +
        #[allow(unused_mut)]
         206  +
        let mut force_error = false;
         207  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         208  +
        if !success && status != 200 || force_error {
         209  +
            let protocol = _cfg
         210  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         211  +
                .expect("a SharedClientProtocol is required");
         212  +
            #[allow(unused_mut)]
         213  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         214  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         215  +
            })?;
         216  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         217  +
            let generic = generic_builder.build();
         218  +
            let error_code = match generic.code() {
         219  +
                ::std::option::Option::Some(code) => code,
         220  +
                ::std::option::Option::None => {
         221  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         222  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         223  +
                            crate::operation::start_associations_once::StartAssociationsOnceError::unhandled(generic),
         224  +
                        ),
         225  +
                    ))
         226  +
                }
         227  +
            };
         228  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         229  +
            let err = match error_code {
         230  +
                "AssociationDoesNotExist" => crate::operation::start_associations_once::StartAssociationsOnceError::AssociationDoesNotExist({
         231  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         232  +
                        crate::types::error::AssociationDoesNotExist::deserialize_with_response(
         233  +
                            &mut *deser,
         234  +
                            response.headers(),
         235  +
                            response.status().into(),
         236  +
                            body,
         237  +
                        )
         238  +
                    }) {
         239  +
                        ::std::result::Result::Ok(val) => val,
         240  +
                        ::std::result::Result::Err(e) => {
         241  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                            ))
         244  +
                        }
         245  +
                    };
         246  +
                    tmp.meta = generic;
         247  +
                    if tmp.message.is_none() {
         248  +
                        tmp.message = _error_message;
         249  +
                    }
         250  +
                    tmp
         251  +
                }),
         252  +
                "InvalidAssociation" => crate::operation::start_associations_once::StartAssociationsOnceError::InvalidAssociation({
         253  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         254  +
                        crate::types::error::InvalidAssociation::deserialize_with_response(
         255  +
                            &mut *deser,
         256  +
                            response.headers(),
         257  +
                            response.status().into(),
         258  +
                            body,
         259  +
                        )
         260  +
                    }) {
         261  +
                        ::std::result::Result::Ok(val) => val,
         262  +
                        ::std::result::Result::Err(e) => {
         263  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         264  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         265  +
                            ))
         266  +
                        }
         267  +
                    };
         268  +
                    tmp.meta = generic;
         269  +
                    if tmp.message.is_none() {
         270  +
                        tmp.message = _error_message;
         271  +
                    }
         272  +
                    tmp
         273  +
                }),
         274  +
                _ => {
         275  +
                    // Registry-backed, operation-scoped reification of an error whose
         276  +
                    // code this operation does not model directly: the operation's own
         277  +
                    // error registry is consulted first, then the lookup widens to the
         278  +
                    // service-wide error registry. On a hit, the reified error is attached
         279  +
                    // as the source of the returned unhandled error while its metadata
         280  +
                    // (code, message, request id) is preserved; on a miss the generic
         281  +
                    // error is returned unchanged.
         282  +
                    match protocol
         283  +
                        .deserialize_error_response(response, _cfg)
         284  +
                        .ok()
         285  +
                        .and_then(|mut deser| {
         286  +
                            ::aws_smithy_schema::registry::reify_error(
         287  +
                                crate::operation::start_associations_once::error_registry::REGISTRY
         288  +
                                    .or(&crate::error_type_registry::REGISTRY),
         289  +
                                error_code,
         290  +
                                &mut *deser,
         291  +
                            )
         292  +
                        }) {
         293  +
                        ::std::option::Option::Some(source) => <crate::operation::start_associations_once::StartAssociationsOnceError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         294  +
                        ::std::option::Option::None => crate::operation::start_associations_once::StartAssociationsOnceError::generic(generic),
         295  +
                    }
         296  +
                }
         297  +
            };
         298  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         299  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         300  +
            ))
         301  +
        } else {
         302  +
            let protocol = _cfg
         303  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         304  +
                .expect("a SharedClientProtocol is required");
         305  +
            let mut deser = protocol
         306  +
                .deserialize_response(response, StartAssociationsOnce::OUTPUT_SCHEMA, _cfg)
         307  +
                .map_err(|e| {
         308  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         309  +
                })?;
         310  +
            // body and headers are already in scope from the top of the function;
         311  +
            // alias `headers` as `_response_headers` so MutateOutput
         312  +
            // customizations have a stable name to read from.
         313  +
            let _response_headers = headers;
         314  +
            #[allow(unused_mut)]
         315  +
            let mut output = crate::operation::start_associations_once::StartAssociationsOnceOutput::deserialize_with_response(
         316  +
                &mut *deser,
         317  +
                _response_headers,
         318  +
                response.status().into(),
         319  +
                body,
         320  +
            )
         321  +
            .map_err(|e| {
         322  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         323  +
            })?;
         324  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         325  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         326  +
        }
         327  +
    }
         328  +
}
         329  +
#[derive(Debug)]
         330  +
struct StartAssociationsOnceRequestSerializer;
         331  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartAssociationsOnceRequestSerializer {
         332  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         333  +
    fn serialize_input(
         334  +
        &self,
         335  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         336  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         337  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         338  +
        let input = input
         339  +
            .downcast::<crate::operation::start_associations_once::StartAssociationsOnceInput>()
         340  +
            .expect("correct type");
         341  +
         342  +
        let protocol = _cfg
         343  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         344  +
            .expect("a SharedClientProtocol is required");
         345  +
        let mut request = protocol
         346  +
            .serialize_request(&input, StartAssociationsOnce::INPUT_SCHEMA, "/", _cfg)
         347  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         348  +
         349  +
        return ::std::result::Result::Ok(request);
         350  +
    }
         351  +
}
         352  +
#[derive(Debug)]
         353  +
struct StartAssociationsOnceEndpointParamsInterceptor;
         354  +
         355  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         356  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartAssociationsOnceEndpointParamsInterceptor {
         357  +
    fn name(&self) -> &'static str {
         358  +
        "StartAssociationsOnceEndpointParamsInterceptor"
         359  +
    }
         360  +
         361  +
    fn read_before_execution(
         362  +
        &self,
         363  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         364  +
            '_,
         365  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         366  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         367  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         368  +
        >,
         369  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         370  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         371  +
        let _input = context
         372  +
            .input()
         373  +
            .downcast_ref::<StartAssociationsOnceInput>()
         374  +
            .ok_or("failed to downcast to StartAssociationsOnceInput")?;
         375  +
         376  +
        let params = crate::config::endpoint::Params::builder()
         377  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         378  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         379  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         380  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         381  +
            .build()
         382  +
            .map_err(|err| {
         383  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         384  +
            })?;
         385  +
        cfg.interceptor_state()
         386  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         387  +
        ::std::result::Result::Ok(())
         388  +
    }
         389  +
}
         390  +
         391  +
// The get_* functions below are generated from JMESPath expressions in the
         392  +
// operationContextParams trait. They target the operation's input shape.
         393  +
         394  +
/// Error type for the `StartAssociationsOnceError` operation.
         395  +
#[non_exhaustive]
         396  +
#[derive(::std::fmt::Debug)]
         397  +
pub enum StartAssociationsOnceError {
         398  +
    /// <p>The specified association doesn't exist.</p>
         399  +
    AssociationDoesNotExist(crate::types::error::AssociationDoesNotExist),
         400  +
    /// <p>The association isn't valid or doesn't exist.</p>
         401  +
    InvalidAssociation(crate::types::error::InvalidAssociation),
         402  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         403  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         404  +
    variable wildcard pattern and check `.code()`:
         405  +
     \
         406  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         407  +
     \
         408  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StartAssociationsOnceError) for what information is available for the error.")]
         409  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         410  +
}
         411  +
impl StartAssociationsOnceError {
         412  +
    /// Creates the `StartAssociationsOnceError::Unhandled` variant from any error type.
         413  +
    pub fn unhandled(
         414  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         415  +
    ) -> Self {
         416  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         417  +
            source: err.into(),
         418  +
            meta: ::std::default::Default::default(),
         419  +
        })
         420  +
    }
         421  +
         422  +
    /// Creates the `StartAssociationsOnceError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         423  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         424  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         425  +
            source: err.clone().into(),
         426  +
            meta: err,
         427  +
        })
         428  +
    }
         429  +
    ///
         430  +
    /// Returns error metadata, which includes the error code, message,
         431  +
    /// request ID, and potentially additional information.
         432  +
    ///
         433  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         434  +
        match self {
         435  +
            Self::AssociationDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         436  +
            Self::InvalidAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         437  +
            Self::Unhandled(e) => &e.meta,
         438  +
        }
         439  +
    }
         440  +
    /// Returns `true` if the error kind is `StartAssociationsOnceError::AssociationDoesNotExist`.
         441  +
    pub fn is_association_does_not_exist(&self) -> bool {
         442  +
        matches!(self, Self::AssociationDoesNotExist(_))
         443  +
    }
         444  +
    /// Returns `true` if the error kind is `StartAssociationsOnceError::InvalidAssociation`.
         445  +
    pub fn is_invalid_association(&self) -> bool {
         446  +
        matches!(self, Self::InvalidAssociation(_))
         447  +
    }
         448  +
}
         449  +
impl ::std::error::Error for StartAssociationsOnceError {
         450  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         451  +
        match self {
         452  +
            Self::AssociationDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
         453  +
            Self::InvalidAssociation(_inner) => ::std::option::Option::Some(_inner),
         454  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         455  +
        }
         456  +
    }
         457  +
}
         458  +
impl ::std::fmt::Display for StartAssociationsOnceError {
         459  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         460  +
        match self {
         461  +
            Self::AssociationDoesNotExist(_inner) => _inner.fmt(f),
         462  +
            Self::InvalidAssociation(_inner) => _inner.fmt(f),
         463  +
            Self::Unhandled(_inner) => {
         464  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         465  +
                    write!(f, "unhandled error ({code})")
         466  +
                } else {
         467  +
                    f.write_str("unhandled error")
         468  +
                }
         469  +
            }
         470  +
        }
         471  +
    }
         472  +
}
         473  +
impl ::aws_smithy_types::retry::ProvideErrorKind for StartAssociationsOnceError {
         474  +
    fn code(&self) -> ::std::option::Option<&str> {
         475  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         476  +
    }
         477  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         478  +
        ::std::option::Option::None
         479  +
    }
         480  +
}
         481  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StartAssociationsOnceError {
         482  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         483  +
        match self {
         484  +
            Self::AssociationDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         485  +
            Self::InvalidAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         486  +
            Self::Unhandled(_inner) => &_inner.meta,
         487  +
        }
         488  +
    }
         489  +
}
         490  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for StartAssociationsOnceError {
         491  +
    fn create_unhandled_error(
         492  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         493  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         494  +
    ) -> Self {
         495  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         496  +
            source,
         497  +
            meta: meta.unwrap_or_default(),
         498  +
        })
         499  +
    }
         500  +
}
         501  +
impl ::aws_types::request_id::RequestId for crate::operation::start_associations_once::StartAssociationsOnceError {
         502  +
    fn request_id(&self) -> Option<&str> {
         503  +
        self.meta().request_id()
         504  +
    }
         505  +
}
         506  +
         507  +
pub use crate::operation::start_associations_once::_start_associations_once_input::StartAssociationsOnceInput;
         508  +
         509  +
pub use crate::operation::start_associations_once::_start_associations_once_output::StartAssociationsOnceOutput;
         510  +
         511  +
mod _start_associations_once_input;
         512  +
         513  +
mod _start_associations_once_output;
         514  +
         515  +
/// Builders
         516  +
pub mod builders;