AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/add_tags_to_resource/_add_tags_to_resource_input.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 AddTagsToResourceInput {
           6  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
           7  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
           8  +
    /// </note>
           9  +
    pub resource_type: ::std::option::Option<crate::types::ResourceTypeForTagging>,
          10  +
    /// <p>The resource ID you want to tag.</p>
          11  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
          12  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
          13  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
          14  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
          15  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
          16  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
          17  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
          18  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
          19  +
    /// </note>
          20  +
    pub resource_id: ::std::option::Option<::std::string::String>,
          21  +
    /// <p>One or more tags. The value parameter is required.</p><important>
          22  +
    /// <p>Don't enter personally identifiable information in this field.</p>
          23  +
    /// </important>
          24  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
          25  +
}
          26  +
impl AddTagsToResourceInput {
          27  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
          28  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
          29  +
    /// </note>
          30  +
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceTypeForTagging> {
          31  +
        self.resource_type.as_ref()
          32  +
    }
          33  +
    /// <p>The resource ID you want to tag.</p>
          34  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
          35  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
          36  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
          37  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
          38  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
          39  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
          40  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
          41  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
          42  +
    /// </note>
          43  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          44  +
        self.resource_id.as_deref()
          45  +
    }
          46  +
    /// <p>One or more tags. The value parameter is required.</p><important>
          47  +
    /// <p>Don't enter personally identifiable information in this field.</p>
          48  +
    /// </important>
          49  +
    ///
          50  +
    /// 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()`.
          51  +
    pub fn tags(&self) -> &[crate::types::Tag] {
          52  +
        self.tags.as_deref().unwrap_or_default()
          53  +
    }
          54  +
}
          55  +
static ADDTAGSTORESOURCEINPUT_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts(
          57  +
        "com.amazonaws.ssm.synthetic#AddTagsToResourceInput$ResourceType",
          58  +
        "com.amazonaws.ssm.synthetic",
          59  +
        "AddTagsToResourceInput",
          60  +
    ),
          61  +
    ::aws_smithy_schema::ShapeType::String,
          62  +
    "ResourceType",
          63  +
    0,
          64  +
);
          65  +
static ADDTAGSTORESOURCEINPUT_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          66  +
    ::aws_smithy_schema::ShapeId::from_parts(
          67  +
        "com.amazonaws.ssm.synthetic#AddTagsToResourceInput$ResourceId",
          68  +
        "com.amazonaws.ssm.synthetic",
          69  +
        "AddTagsToResourceInput",
          70  +
    ),
          71  +
    ::aws_smithy_schema::ShapeType::String,
          72  +
    "ResourceId",
          73  +
    1,
          74  +
);
          75  +
static ADDTAGSTORESOURCEINPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          76  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
          77  +
    ::aws_smithy_schema::ShapeType::Structure,
          78  +
    "member",
          79  +
    0,
          80  +
);
          81  +
static ADDTAGSTORESOURCEINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          82  +
    ::aws_smithy_schema::ShapeId::from_parts(
          83  +
        "com.amazonaws.ssm.synthetic#AddTagsToResourceInput$Tags",
          84  +
        "com.amazonaws.ssm.synthetic",
          85  +
        "AddTagsToResourceInput",
          86  +
    ),
          87  +
    ::aws_smithy_schema::ShapeType::List,
          88  +
    "Tags",
          89  +
    2,
          90  +
)
          91  +
.with_list_member(&ADDTAGSTORESOURCEINPUT_MEMBER_TAGS_MEMBER);
          92  +
static ADDTAGSTORESOURCEINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          93  +
    ::aws_smithy_schema::ShapeId::from_parts(
          94  +
        "com.amazonaws.ssm.synthetic#AddTagsToResourceInput",
          95  +
        "com.amazonaws.ssm.synthetic",
          96  +
        "AddTagsToResourceInput",
          97  +
    ),
          98  +
    ::aws_smithy_schema::ShapeType::Structure,
          99  +
    &[
         100  +
        &ADDTAGSTORESOURCEINPUT_MEMBER_RESOURCE_TYPE,
         101  +
        &ADDTAGSTORESOURCEINPUT_MEMBER_RESOURCE_ID,
         102  +
        &ADDTAGSTORESOURCEINPUT_MEMBER_TAGS,
         103  +
    ],
         104  +
)
         105  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         106  +
.with_original_name("AddTagsToResourceRequest");
         107  +
impl AddTagsToResourceInput {
         108  +
    /// The schema for this shape.
         109  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ADDTAGSTORESOURCEINPUT_SCHEMA;
         110  +
}
         111  +
impl ::aws_smithy_schema::serde::SerializableStruct for AddTagsToResourceInput {
         112  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         113  +
    fn serialize_members(
         114  +
        &self,
         115  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         116  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         117  +
        if let Some(ref val) = self.resource_type {
         118  +
            ser.write_string(&ADDTAGSTORESOURCEINPUT_MEMBER_RESOURCE_TYPE, val.as_str())?;
         119  +
        }
         120  +
        if let Some(ref val) = self.resource_id {
         121  +
            ser.write_string(&ADDTAGSTORESOURCEINPUT_MEMBER_RESOURCE_ID, val)?;
         122  +
        }
         123  +
        if let Some(ref val) = self.tags {
         124  +
            ser.write_list(
         125  +
                &ADDTAGSTORESOURCEINPUT_MEMBER_TAGS,
         126  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         127  +
                    for item in val {
         128  +
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
         129  +
                    }
         130  +
                    Ok(())
         131  +
                },
         132  +
            )?;
         133  +
        }
         134  +
        Ok(())
         135  +
    }
         136  +
}
         137  +
impl AddTagsToResourceInput {
         138  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         139  +
    pub fn deserialize(
         140  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         141  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         142  +
        #[allow(unused_variables, unused_mut)]
         143  +
        let mut builder = Self::builder();
         144  +
        #[allow(
         145  +
            unused_variables,
         146  +
            unreachable_code,
         147  +
            clippy::single_match,
         148  +
            clippy::match_single_binding,
         149  +
            clippy::diverging_sub_expression
         150  +
        )]
         151  +
        deserializer.read_struct(&ADDTAGSTORESOURCEINPUT_SCHEMA, &mut |member, deser| {
         152  +
            match member.member_index() {
         153  +
                Some(0) => {
         154  +
                    if deser.is_null() {
         155  +
                        deser.read_null()?;
         156  +
                    } else {
         157  +
                        builder.resource_type = Some(crate::types::ResourceTypeForTagging::from(deser.read_string(member)?.as_str()));
         158  +
                    }
         159  +
                }
         160  +
                Some(1) => {
         161  +
                    if deser.is_null() {
         162  +
                        deser.read_null()?;
         163  +
                    } else {
         164  +
                        builder.resource_id = Some(deser.read_string(member)?);
         165  +
                    }
         166  +
                }
         167  +
                Some(2) => {
         168  +
                    if deser.is_null() {
         169  +
                        deser.read_null()?;
         170  +
                    } else {
         171  +
                        builder.tags = Some({
         172  +
                            let mut container = Vec::new();
         173  +
                            deser.read_list(member, &mut |deser| {
         174  +
                                container.push(crate::types::Tag::deserialize(deser)?);
         175  +
                                Ok(())
         176  +
                            })?;
         177  +
                            container
         178  +
                        });
         179  +
                    }
         180  +
                }
         181  +
                _ => {}
         182  +
            }
         183  +
            Ok(())
         184  +
        })?;
         185  +
        builder.resource_id = builder.resource_id.or(Some(String::new()));
         186  +
        builder.tags = builder.tags.or(Some(Vec::new()));
         187  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         188  +
    }
         189  +
}
         190  +
impl AddTagsToResourceInput {
         191  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         192  +
    pub fn deserialize_with_response(
         193  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         194  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         195  +
        _status: u16,
         196  +
        _body: &[u8],
         197  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         198  +
        Self::deserialize(deserializer)
         199  +
    }
         200  +
}
         201  +
impl AddTagsToResourceInput {
         202  +
    /// Creates a new builder-style object to manufacture [`AddTagsToResourceInput`](crate::operation::add_tags_to_resource::AddTagsToResourceInput).
         203  +
    pub fn builder() -> crate::operation::add_tags_to_resource::builders::AddTagsToResourceInputBuilder {
         204  +
        crate::operation::add_tags_to_resource::builders::AddTagsToResourceInputBuilder::default()
         205  +
    }
         206  +
}
         207  +
         208  +
/// A builder for [`AddTagsToResourceInput`](crate::operation::add_tags_to_resource::AddTagsToResourceInput).
         209  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         210  +
#[non_exhaustive]
         211  +
pub struct AddTagsToResourceInputBuilder {
         212  +
    pub(crate) resource_type: ::std::option::Option<crate::types::ResourceTypeForTagging>,
         213  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         214  +
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
         215  +
}
         216  +
impl AddTagsToResourceInputBuilder {
         217  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
         218  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         219  +
    /// </note>
         220  +
    /// This field is required.
         221  +
    pub fn resource_type(mut self, input: crate::types::ResourceTypeForTagging) -> Self {
         222  +
        self.resource_type = ::std::option::Option::Some(input);
         223  +
        self
         224  +
    }
         225  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
         226  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         227  +
    /// </note>
         228  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceTypeForTagging>) -> Self {
         229  +
        self.resource_type = input;
         230  +
        self
         231  +
    }
         232  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
         233  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         234  +
    /// </note>
         235  +
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceTypeForTagging> {
         236  +
        &self.resource_type
         237  +
    }
         238  +
    /// <p>The resource ID you want to tag.</p>
         239  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
         240  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
         241  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
         242  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
         243  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
         244  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
         245  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
         246  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         247  +
    /// </note>
         248  +
    /// This field is required.
         249  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         250  +
        self.resource_id = ::std::option::Option::Some(input.into());
         251  +
        self
         252  +
    }
         253  +
    /// <p>The resource ID you want to tag.</p>
         254  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
         255  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
         256  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
         257  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
         258  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
         259  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
         260  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
         261  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         262  +
    /// </note>
         263  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         264  +
        self.resource_id = input;
         265  +
        self
         266  +
    }
         267  +
    /// <p>The resource ID you want to tag.</p>
         268  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
         269  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
         270  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
         271  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
         272  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
         273  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
         274  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
         275  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         276  +
    /// </note>
         277  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         278  +
        &self.resource_id
         279  +
    }
         280  +
    /// Appends an item to `tags`.
         281  +
    ///
         282  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         283  +
    ///
         284  +
    /// <p>One or more tags. The value parameter is required.</p><important>
         285  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         286  +
    /// </important>
         287  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         288  +
        let mut v = self.tags.unwrap_or_default();
         289  +
        v.push(input);
         290  +
        self.tags = ::std::option::Option::Some(v);
         291  +
        self
         292  +
    }
         293  +
    /// <p>One or more tags. The value parameter is required.</p><important>
         294  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         295  +
    /// </important>
         296  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         297  +
        self.tags = input;
         298  +
        self
         299  +
    }
         300  +
    /// <p>One or more tags. The value parameter is required.</p><important>
         301  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         302  +
    /// </important>
         303  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         304  +
        &self.tags
         305  +
    }
         306  +
    /// Consumes the builder and constructs a [`AddTagsToResourceInput`](crate::operation::add_tags_to_resource::AddTagsToResourceInput).
         307  +
    pub fn build(
         308  +
        self,
         309  +
    ) -> ::std::result::Result<crate::operation::add_tags_to_resource::AddTagsToResourceInput, ::aws_smithy_types::error::operation::BuildError> {
         310  +
        ::std::result::Result::Ok(crate::operation::add_tags_to_resource::AddTagsToResourceInput {
         311  +
            resource_type: self.resource_type,
         312  +
            resource_id: self.resource_id,
         313  +
            tags: self.tags,
         314  +
        })
         315  +
    }
         316  +
}

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

@@ -0,1 +0,122 @@
           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 AddTagsToResourceOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static ADDTAGSTORESOURCEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
           9  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          10  +
    ::aws_smithy_schema::ShapeType::String,
          11  +
    "request_id",
          12  +
    0,
          13  +
)
          14  +
.with_http_header("x-amzn-requestid");
          15  +
static ADDTAGSTORESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#AddTagsToResourceOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "AddTagsToResourceOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&ADDTAGSTORESOURCEOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("AddTagsToResourceResult");
          25  +
impl AddTagsToResourceOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ADDTAGSTORESOURCEOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for AddTagsToResourceOutput {
          30  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          31  +
    fn serialize_members(
          32  +
        &self,
          33  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          34  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          35  +
        Ok(())
          36  +
    }
          37  +
}
          38  +
impl AddTagsToResourceOutput {
          39  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          42  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          43  +
        #[allow(unused_variables, unused_mut)]
          44  +
        let mut builder = Self::builder();
          45  +
        #[allow(
          46  +
            unused_variables,
          47  +
            unreachable_code,
          48  +
            clippy::single_match,
          49  +
            clippy::match_single_binding,
          50  +
            clippy::diverging_sub_expression
          51  +
        )]
          52  +
        deserializer.read_struct(&ADDTAGSTORESOURCEOUTPUT_SCHEMA, &mut |member, deser| {
          53  +
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
          57  +
                _ => {}
          58  +
            }
          59  +
            Ok(())
          60  +
        })?;
          61  +
        Ok(builder.build())
          62  +
    }
          63  +
}
          64  +
impl AddTagsToResourceOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
          82  +
impl ::aws_types::request_id::RequestId for AddTagsToResourceOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl AddTagsToResourceOutput {
          88  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
          89  +
        self._request_id = request_id;
          90  +
        self
          91  +
    }
          92  +
}
          93  +
impl AddTagsToResourceOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`AddTagsToResourceOutput`](crate::operation::add_tags_to_resource::AddTagsToResourceOutput).
          95  +
    pub fn builder() -> crate::operation::add_tags_to_resource::builders::AddTagsToResourceOutputBuilder {
          96  +
        crate::operation::add_tags_to_resource::builders::AddTagsToResourceOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`AddTagsToResourceOutput`](crate::operation::add_tags_to_resource::AddTagsToResourceOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct AddTagsToResourceOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl AddTagsToResourceOutputBuilder {
         107  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         108  +
        self._request_id = Some(request_id.into());
         109  +
        self
         110  +
    }
         111  +
         112  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         113  +
        self._request_id = request_id;
         114  +
        self
         115  +
    }
         116  +
    /// Consumes the builder and constructs a [`AddTagsToResourceOutput`](crate::operation::add_tags_to_resource::AddTagsToResourceOutput).
         117  +
    pub fn build(self) -> crate::operation::add_tags_to_resource::AddTagsToResourceOutput {
         118  +
        crate::operation::add_tags_to_resource::AddTagsToResourceOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,214 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::add_tags_to_resource::_add_tags_to_resource_input::AddTagsToResourceInputBuilder;
           3  +
           4  +
pub use crate::operation::add_tags_to_resource::_add_tags_to_resource_output::AddTagsToResourceOutputBuilder;
           5  +
           6  +
impl crate::operation::add_tags_to_resource::builders::AddTagsToResourceInputBuilder {
           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::add_tags_to_resource::AddTagsToResourceOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::add_tags_to_resource::AddTagsToResourceError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.add_tags_to_resource();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `AddTagsToResource`.
          24  +
///
          25  +
/// <p>Adds or overwrites one or more tags for the specified resource. <i>Tags</i> are metadata that you can assign to your automations, documents, managed nodes, maintenance windows, Parameter Store parameters, and patch baselines. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define. For example, you could define a set of tags for your account's managed nodes that helps you track each node's owner and stack level. For example:</p>
          26  +
/// <ul>
          27  +
/// <li>
          28  +
/// <p><code>Key=Owner,Value=DbAdmin</code></p></li>
          29  +
/// <li>
          30  +
/// <p><code>Key=Owner,Value=SysAdmin</code></p></li>
          31  +
/// <li>
          32  +
/// <p><code>Key=Owner,Value=Dev</code></p></li>
          33  +
/// <li>
          34  +
/// <p><code>Key=Stack,Value=Production</code></p></li>
          35  +
/// <li>
          36  +
/// <p><code>Key=Stack,Value=Pre-Production</code></p></li>
          37  +
/// <li>
          38  +
/// <p><code>Key=Stack,Value=Test</code></p></li>
          39  +
/// </ul>
          40  +
/// <p>Most resources can have a maximum of 50 tags. Automations can have a maximum of 5 tags.</p>
          41  +
/// <p>We recommend that you devise a set of tag keys that meets your needs for each resource type. Using a consistent set of tag keys makes it easier for you to manage your resources. You can search and filter the resources based on the tags you add. Tags don't have any semantic meaning to and are interpreted strictly as a string of characters.</p>
          42  +
/// <p>For more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tag your Amazon EC2 resources</a> in the <i>Amazon EC2 User Guide</i>.</p>
          43  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          44  +
pub struct AddTagsToResourceFluentBuilder {
          45  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          46  +
    inner: crate::operation::add_tags_to_resource::builders::AddTagsToResourceInputBuilder,
          47  +
    config_override: ::std::option::Option<crate::config::Builder>,
          48  +
}
          49  +
impl
          50  +
    crate::client::customize::internal::CustomizableSend<
          51  +
        crate::operation::add_tags_to_resource::AddTagsToResourceOutput,
          52  +
        crate::operation::add_tags_to_resource::AddTagsToResourceError,
          53  +
    > for AddTagsToResourceFluentBuilder
          54  +
{
          55  +
    fn send(
          56  +
        self,
          57  +
        config_override: crate::config::Builder,
          58  +
    ) -> crate::client::customize::internal::BoxFuture<
          59  +
        crate::client::customize::internal::SendResult<
          60  +
            crate::operation::add_tags_to_resource::AddTagsToResourceOutput,
          61  +
            crate::operation::add_tags_to_resource::AddTagsToResourceError,
          62  +
        >,
          63  +
    > {
          64  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          65  +
    }
          66  +
}
          67  +
impl AddTagsToResourceFluentBuilder {
          68  +
    /// Creates a new `AddTagsToResourceFluentBuilder`.
          69  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          70  +
        Self {
          71  +
            handle,
          72  +
            inner: ::std::default::Default::default(),
          73  +
            config_override: ::std::option::Option::None,
          74  +
        }
          75  +
    }
          76  +
    /// Access the AddTagsToResource as a reference.
          77  +
    pub fn as_input(&self) -> &crate::operation::add_tags_to_resource::builders::AddTagsToResourceInputBuilder {
          78  +
        &self.inner
          79  +
    }
          80  +
    /// Sends the request and returns the response.
          81  +
    ///
          82  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          83  +
    /// can be matched against.
          84  +
    ///
          85  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          86  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          87  +
    /// set when configuring the client.
          88  +
    pub async fn send(
          89  +
        self,
          90  +
    ) -> ::std::result::Result<
          91  +
        crate::operation::add_tags_to_resource::AddTagsToResourceOutput,
          92  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          93  +
            crate::operation::add_tags_to_resource::AddTagsToResourceError,
          94  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          95  +
        >,
          96  +
    > {
          97  +
        let input = self
          98  +
            .inner
          99  +
            .build()
         100  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
         101  +
        let runtime_plugins = crate::operation::add_tags_to_resource::AddTagsToResource::operation_runtime_plugins(
         102  +
            self.handle.runtime_plugins.clone(),
         103  +
            &self.handle.conf,
         104  +
            self.config_override,
         105  +
        );
         106  +
        crate::operation::add_tags_to_resource::AddTagsToResource::orchestrate(&runtime_plugins, input).await
         107  +
    }
         108  +
         109  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
         110  +
    pub fn customize(
         111  +
        self,
         112  +
    ) -> crate::client::customize::CustomizableOperation<
         113  +
        crate::operation::add_tags_to_resource::AddTagsToResourceOutput,
         114  +
        crate::operation::add_tags_to_resource::AddTagsToResourceError,
         115  +
        Self,
         116  +
    > {
         117  +
        crate::client::customize::CustomizableOperation::new(self)
         118  +
    }
         119  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         120  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         121  +
        self
         122  +
    }
         123  +
         124  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         125  +
        self.config_override = config_override;
         126  +
        self
         127  +
    }
         128  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
         129  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         130  +
    /// </note>
         131  +
    pub fn resource_type(mut self, input: crate::types::ResourceTypeForTagging) -> Self {
         132  +
        self.inner = self.inner.resource_type(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
         136  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         137  +
    /// </note>
         138  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceTypeForTagging>) -> Self {
         139  +
        self.inner = self.inner.set_resource_type(input);
         140  +
        self
         141  +
    }
         142  +
    /// <p>Specifies the type of resource you are tagging.</p><note>
         143  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         144  +
    /// </note>
         145  +
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceTypeForTagging> {
         146  +
        self.inner.get_resource_type()
         147  +
    }
         148  +
    /// <p>The resource ID you want to tag.</p>
         149  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
         150  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
         151  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
         152  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
         153  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
         154  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
         155  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
         156  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         157  +
    /// </note>
         158  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         159  +
        self.inner = self.inner.resource_id(input.into());
         160  +
        self
         161  +
    }
         162  +
    /// <p>The resource ID you want to tag.</p>
         163  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
         164  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
         165  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
         166  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
         167  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
         168  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
         169  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
         170  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         171  +
    /// </note>
         172  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         173  +
        self.inner = self.inner.set_resource_id(input);
         174  +
        self
         175  +
    }
         176  +
    /// <p>The resource ID you want to tag.</p>
         177  +
    /// <p>Use the ID of the resource. Here are some examples:</p>
         178  +
    /// <p><code>MaintenanceWindow</code>: <code>mw-012345abcde</code></p>
         179  +
    /// <p><code>PatchBaseline</code>: <code>pb-012345abcde</code></p>
         180  +
    /// <p><code>Automation</code>: <code>example-c160-4567-8519-012345abcde</code></p>
         181  +
    /// <p><code>OpsMetadata</code> object: <code>ResourceID</code> for tagging is created from the Amazon Resource Name (ARN) for the object. Specifically, <code>ResourceID</code> is created from the strings that come after the word <code>opsmetadata</code> in the ARN. For example, an OpsMetadata object with an ARN of <code>arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager</code> has a <code>ResourceID</code> of either <code>aws/ssm/MyGroup/appmanager</code> or <code>/aws/ssm/MyGroup/appmanager</code>.</p>
         182  +
    /// <p>For the <code>Document</code> and <code>Parameter</code> values, use the name of the resource. If you're tagging a shared document, you must use the full ARN of the document.</p>
         183  +
    /// <p><code>ManagedInstance</code>: <code>mi-012345abcde</code></p><note>
         184  +
    /// <p>The <code>ManagedInstance</code> type for this API operation is only for on-premises managed nodes. You must specify the name of the managed node in the following format: <code>mi-<i>ID_number</i> </code>. For example, <code>mi-1a2b3c4d5e6f</code>.</p>
         185  +
    /// </note>
         186  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         187  +
        self.inner.get_resource_id()
         188  +
    }
         189  +
    ///
         190  +
    /// Appends an item to `Tags`.
         191  +
    ///
         192  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         193  +
    ///
         194  +
    /// <p>One or more tags. The value parameter is required.</p><important>
         195  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         196  +
    /// </important>
         197  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         198  +
        self.inner = self.inner.tags(input);
         199  +
        self
         200  +
    }
         201  +
    /// <p>One or more tags. The value parameter is required.</p><important>
         202  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         203  +
    /// </important>
         204  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         205  +
        self.inner = self.inner.set_tags(input);
         206  +
        self
         207  +
    }
         208  +
    /// <p>One or more tags. The value parameter is required.</p><important>
         209  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         210  +
    /// </important>
         211  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         212  +
        self.inner.get_tags()
         213  +
    }
         214  +
}

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

@@ -0,1 +0,751 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `AssociateOpsItemRelatedItem`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct AssociateOpsItemRelatedItem;
           6  +
impl AssociateOpsItemRelatedItem {
           7  +
    /// Creates a new `AssociateOpsItemRelatedItem`
           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::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
          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::associate_ops_item_related_item::AssociateOpsItemRelatedItemError>()
          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::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput>()
          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::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput,
          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", "AssociateOpsItemRelatedItem", 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.AssociateOpsItemRelatedItem",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "AssociateOpsItemRelatedItem",
          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::InternalServerError::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::InternalServerError::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::InternalServerError::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::OpsItemConflictException::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::OpsItemConflictException::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::OpsItemConflictException::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
.insert_error_shape(
         123  +
                        crate::types::error::OpsItemInvalidParameterException::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::OpsItemInvalidParameterException::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::OpsItemInvalidParameterException::deserialize(d)?))
         129  +
                        },
         130  +
                    )
         131  +
.insert_error_shape(
         132  +
                        crate::types::error::OpsItemLimitExceededException::SCHEMA,
         133  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         134  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OpsItemLimitExceededException::deserialize(d)?))
         135  +
                        },
         136  +
                        |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> {
         137  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OpsItemLimitExceededException::deserialize(d)?))
         138  +
                        },
         139  +
                    )
         140  +
.insert_error_shape(
         141  +
                        crate::types::error::OpsItemNotFoundException::SCHEMA,
         142  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         143  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OpsItemNotFoundException::deserialize(d)?))
         144  +
                        },
         145  +
                        |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> {
         146  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OpsItemNotFoundException::deserialize(d)?))
         147  +
                        },
         148  +
                    )
         149  +
.insert_error_shape(
         150  +
                        crate::types::error::OpsItemRelatedItemAlreadyExistsException::SCHEMA,
         151  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         152  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OpsItemRelatedItemAlreadyExistsException::deserialize(d)?))
         153  +
                        },
         154  +
                        |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> {
         155  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OpsItemRelatedItemAlreadyExistsException::deserialize(d)?))
         156  +
                        },
         157  +
                    )
         158  +
                            .build()
         159  +
    });
         160  +
}
         161  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for AssociateOpsItemRelatedItem {
         162  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         163  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("AssociateOpsItemRelatedItem");
         164  +
         165  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         166  +
            AssociateOpsItemRelatedItemRequestSerializer,
         167  +
        ));
         168  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         169  +
            AssociateOpsItemRelatedItemResponseDeserializer,
         170  +
        ));
         171  +
         172  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         173  +
            crate::config::auth::Params::builder()
         174  +
                .operation_name("AssociateOpsItemRelatedItem")
         175  +
                .build()
         176  +
                .expect("required fields set"),
         177  +
        ));
         178  +
         179  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         180  +
            "AssociateOpsItemRelatedItem",
         181  +
            "SSM",
         182  +
        ));
         183  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         184  +
        signing_options.double_uri_encode = true;
         185  +
        signing_options.content_sha256_header = false;
         186  +
        signing_options.normalize_uri_path = true;
         187  +
        signing_options.payload_override = None;
         188  +
         189  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         190  +
            signing_options,
         191  +
            ..::std::default::Default::default()
         192  +
        });
         193  +
         194  +
        ::std::option::Option::Some(cfg.freeze())
         195  +
    }
         196  +
         197  +
    fn runtime_components(
         198  +
        &self,
         199  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         200  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         201  +
        #[allow(unused_mut)]
         202  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("AssociateOpsItemRelatedItem")
         203  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         204  +
                AssociateOpsItemRelatedItemTelemetryInputCaptureInterceptor,
         205  +
            ))
         206  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         207  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         208  +
            ))
         209  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         210  +
                AssociateOpsItemRelatedItemEndpointParamsInterceptor,
         211  +
            ))
         212  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         213  +
                crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
         214  +
            >::new())
         215  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         216  +
                crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
         217  +
            >::new())
         218  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         219  +
                crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
         220  +
            >::new())
         221  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         222  +
                crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError,
         223  +
            >::new());
         224  +
         225  +
        ::std::borrow::Cow::Owned(rcb)
         226  +
    }
         227  +
}
         228  +
         229  +
#[derive(Debug)]
         230  +
struct AssociateOpsItemRelatedItemTelemetryInputCaptureInterceptor;
         231  +
         232  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         233  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for AssociateOpsItemRelatedItemTelemetryInputCaptureInterceptor {
         234  +
    fn name(&self) -> &'static str {
         235  +
        "AssociateOpsItemRelatedItemTelemetryInputCaptureInterceptor"
         236  +
    }
         237  +
         238  +
    fn read_before_execution(
         239  +
        &self,
         240  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         241  +
            '_,
         242  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         243  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         244  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         245  +
        >,
         246  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         247  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         248  +
        // Nothing to do unless the customer opted in by naming members to record.
         249  +
        let ::std::option::Option::Some(requested) = cfg
         250  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         251  +
            .filter(|r| !r.is_empty())
         252  +
        else {
         253  +
            return ::std::result::Result::Ok(());
         254  +
        };
         255  +
         256  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<AssociateOpsItemRelatedItemInput>() else {
         257  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         258  +
            return ::std::result::Result::Ok(());
         259  +
        };
         260  +
         261  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         262  +
        if requested.should_capture("OpsItemId") {
         263  +
            if let ::std::option::Option::Some(value) = input.ops_item_id.as_deref() {
         264  +
                captured.insert("OpsItemId", value);
         265  +
            }
         266  +
        }
         267  +
        if requested.should_capture("AssociationType") {
         268  +
            if let ::std::option::Option::Some(value) = input.association_type.as_deref() {
         269  +
                captured.insert("AssociationType", value);
         270  +
            }
         271  +
        }
         272  +
        if requested.should_capture("ResourceType") {
         273  +
            if let ::std::option::Option::Some(value) = input.resource_type.as_deref() {
         274  +
                captured.insert("ResourceType", value);
         275  +
            }
         276  +
        }
         277  +
        if requested.should_capture("ResourceUri") {
         278  +
            if let ::std::option::Option::Some(value) = input.resource_uri.as_deref() {
         279  +
                captured.insert("ResourceUri", value);
         280  +
            }
         281  +
        }
         282  +
         283  +
        cfg.interceptor_state().store_put(captured);
         284  +
        ::std::result::Result::Ok(())
         285  +
    }
         286  +
}
         287  +
#[derive(Debug)]
         288  +
struct AssociateOpsItemRelatedItemResponseDeserializer;
         289  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AssociateOpsItemRelatedItemResponseDeserializer {
         290  +
    fn deserialize_nonstreaming_with_config(
         291  +
        &self,
         292  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         293  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         294  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         295  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         296  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         297  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         298  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         299  +
        // loads `body` before firing this hook.
         300  +
        let body = response.body().bytes().expect("body loaded");
         301  +
        let headers = response.headers();
         302  +
        #[allow(unused_mut)]
         303  +
        let mut force_error = false;
         304  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         305  +
        if !success && status != 200 || force_error {
         306  +
            let protocol = _cfg
         307  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         308  +
                .expect("a SharedClientProtocol is required");
         309  +
            #[allow(unused_mut)]
         310  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         311  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         312  +
            })?;
         313  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         314  +
            let generic = generic_builder.build();
         315  +
            let error_code = match generic.code() {
         316  +
                ::std::option::Option::Some(code) => code,
         317  +
                ::std::option::Option::None => {
         318  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         319  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         320  +
                            crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::unhandled(generic),
         321  +
                        ),
         322  +
                    ))
         323  +
                }
         324  +
            };
         325  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         326  +
            let err = match error_code {
         327  +
                "InternalServerError" => crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::InternalServerError({
         328  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         329  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         330  +
                            &mut *deser,
         331  +
                            response.headers(),
         332  +
                            response.status().into(),
         333  +
                            body,
         334  +
                        )
         335  +
                    }) {
         336  +
                        ::std::result::Result::Ok(val) => val,
         337  +
                        ::std::result::Result::Err(e) => {
         338  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         339  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         340  +
                            ))
         341  +
                        }
         342  +
                    };
         343  +
                    tmp.meta = generic;
         344  +
                    if tmp.message.is_none() {
         345  +
                        tmp.message = _error_message;
         346  +
                    }
         347  +
                    tmp
         348  +
                }),
         349  +
                "OpsItemConflictException" => {
         350  +
                    crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::OpsItemConflictException({
         351  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         352  +
                            crate::types::error::OpsItemConflictException::deserialize_with_response(
         353  +
                                &mut *deser,
         354  +
                                response.headers(),
         355  +
                                response.status().into(),
         356  +
                                body,
         357  +
                            )
         358  +
                        }) {
         359  +
                            ::std::result::Result::Ok(val) => val,
         360  +
                            ::std::result::Result::Err(e) => {
         361  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         362  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         363  +
                                ))
         364  +
                            }
         365  +
                        };
         366  +
                        tmp.meta = generic;
         367  +
                        if tmp.message.is_none() {
         368  +
                            tmp.message = _error_message;
         369  +
                        }
         370  +
                        tmp
         371  +
                    })
         372  +
                }
         373  +
                "OpsItemInvalidParameterException" => {
         374  +
                    crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::OpsItemInvalidParameterException({
         375  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         376  +
                            crate::types::error::OpsItemInvalidParameterException::deserialize_with_response(
         377  +
                                &mut *deser,
         378  +
                                response.headers(),
         379  +
                                response.status().into(),
         380  +
                                body,
         381  +
                            )
         382  +
                        }) {
         383  +
                            ::std::result::Result::Ok(val) => val,
         384  +
                            ::std::result::Result::Err(e) => {
         385  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         386  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         387  +
                                ))
         388  +
                            }
         389  +
                        };
         390  +
                        tmp.meta = generic;
         391  +
                        if tmp.message.is_none() {
         392  +
                            tmp.message = _error_message;
         393  +
                        }
         394  +
                        tmp
         395  +
                    })
         396  +
                }
         397  +
                "OpsItemLimitExceededException" => {
         398  +
                    crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::OpsItemLimitExceededException({
         399  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         400  +
                            crate::types::error::OpsItemLimitExceededException::deserialize_with_response(
         401  +
                                &mut *deser,
         402  +
                                response.headers(),
         403  +
                                response.status().into(),
         404  +
                                body,
         405  +
                            )
         406  +
                        }) {
         407  +
                            ::std::result::Result::Ok(val) => val,
         408  +
                            ::std::result::Result::Err(e) => {
         409  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         410  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         411  +
                                ))
         412  +
                            }
         413  +
                        };
         414  +
                        tmp.meta = generic;
         415  +
                        if tmp.message.is_none() {
         416  +
                            tmp.message = _error_message;
         417  +
                        }
         418  +
                        tmp
         419  +
                    })
         420  +
                }
         421  +
                "OpsItemNotFoundException" => {
         422  +
                    crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::OpsItemNotFoundException({
         423  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         424  +
                            crate::types::error::OpsItemNotFoundException::deserialize_with_response(
         425  +
                                &mut *deser,
         426  +
                                response.headers(),
         427  +
                                response.status().into(),
         428  +
                                body,
         429  +
                            )
         430  +
                        }) {
         431  +
                            ::std::result::Result::Ok(val) => val,
         432  +
                            ::std::result::Result::Err(e) => {
         433  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         434  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         435  +
                                ))
         436  +
                            }
         437  +
                        };
         438  +
                        tmp.meta = generic;
         439  +
                        if tmp.message.is_none() {
         440  +
                            tmp.message = _error_message;
         441  +
                        }
         442  +
                        tmp
         443  +
                    })
         444  +
                }
         445  +
                "OpsItemRelatedItemAlreadyExistsException" => {
         446  +
                    crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::OpsItemRelatedItemAlreadyExistsException({
         447  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         448  +
                            crate::types::error::OpsItemRelatedItemAlreadyExistsException::deserialize_with_response(
         449  +
                                &mut *deser,
         450  +
                                response.headers(),
         451  +
                                response.status().into(),
         452  +
                                body,
         453  +
                            )
         454  +
                        }) {
         455  +
                            ::std::result::Result::Ok(val) => val,
         456  +
                            ::std::result::Result::Err(e) => {
         457  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         458  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         459  +
                                ))
         460  +
                            }
         461  +
                        };
         462  +
                        tmp.meta = generic;
         463  +
                        if tmp.message.is_none() {
         464  +
                            tmp.message = _error_message;
         465  +
                        }
         466  +
                        tmp
         467  +
                    })
         468  +
                }
         469  +
                _ => {
         470  +
                    // Registry-backed, operation-scoped reification of an error whose
         471  +
                    // code this operation does not model directly: the operation's own
         472  +
                    // error registry is consulted first, then the lookup widens to the
         473  +
                    // service-wide error registry. On a hit, the reified error is attached
         474  +
                    // as the source of the returned unhandled error while its metadata
         475  +
                    // (code, message, request id) is preserved; on a miss the generic
         476  +
                    // error is returned unchanged.
         477  +
                    match protocol
         478  +
                        .deserialize_error_response(response, _cfg)
         479  +
                        .ok()
         480  +
                        .and_then(|mut deser| {
         481  +
                            ::aws_smithy_schema::registry::reify_error(
         482  +
                                crate::operation::associate_ops_item_related_item::error_registry::REGISTRY
         483  +
                                    .or(&crate::error_type_registry::REGISTRY),
         484  +
                                error_code,
         485  +
                                &mut *deser,
         486  +
                            )
         487  +
                        }) {
         488  +
                        ::std::option::Option::Some(source) => <crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         489  +
                        ::std::option::Option::None => crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError::generic(generic),
         490  +
                    }
         491  +
                }
         492  +
            };
         493  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         494  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         495  +
            ))
         496  +
        } else {
         497  +
            let protocol = _cfg
         498  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         499  +
                .expect("a SharedClientProtocol is required");
         500  +
            let mut deser = protocol
         501  +
                .deserialize_response(response, AssociateOpsItemRelatedItem::OUTPUT_SCHEMA, _cfg)
         502  +
                .map_err(|e| {
         503  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         504  +
                })?;
         505  +
            // body and headers are already in scope from the top of the function;
         506  +
            // alias `headers` as `_response_headers` so MutateOutput
         507  +
            // customizations have a stable name to read from.
         508  +
            let _response_headers = headers;
         509  +
            #[allow(unused_mut)]
         510  +
            let mut output = crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemOutput::deserialize_with_response(
         511  +
                &mut *deser,
         512  +
                _response_headers,
         513  +
                response.status().into(),
         514  +
                body,
         515  +
            )
         516  +
            .map_err(|e| {
         517  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         518  +
            })?;
         519  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         520  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         521  +
        }
         522  +
    }
         523  +
}
         524  +
#[derive(Debug)]
         525  +
struct AssociateOpsItemRelatedItemRequestSerializer;
         526  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for AssociateOpsItemRelatedItemRequestSerializer {
         527  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         528  +
    fn serialize_input(
         529  +
        &self,
         530  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         531  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         532  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         533  +
        let input = input
         534  +
            .downcast::<crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemInput>()
         535  +
            .expect("correct type");
         536  +
         537  +
        let protocol = _cfg
         538  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         539  +
            .expect("a SharedClientProtocol is required");
         540  +
        let mut request = protocol
         541  +
            .serialize_request(&input, AssociateOpsItemRelatedItem::INPUT_SCHEMA, "/", _cfg)
         542  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         543  +
         544  +
        return ::std::result::Result::Ok(request);
         545  +
    }
         546  +
}
         547  +
#[derive(Debug)]
         548  +
struct AssociateOpsItemRelatedItemEndpointParamsInterceptor;
         549  +
         550  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         551  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for AssociateOpsItemRelatedItemEndpointParamsInterceptor {
         552  +
    fn name(&self) -> &'static str {
         553  +
        "AssociateOpsItemRelatedItemEndpointParamsInterceptor"
         554  +
    }
         555  +
         556  +
    fn read_before_execution(
         557  +
        &self,
         558  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         559  +
            '_,
         560  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         561  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         562  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         563  +
        >,
         564  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         565  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         566  +
        let _input = context
         567  +
            .input()
         568  +
            .downcast_ref::<AssociateOpsItemRelatedItemInput>()
         569  +
            .ok_or("failed to downcast to AssociateOpsItemRelatedItemInput")?;
         570  +
         571  +
        let params = crate::config::endpoint::Params::builder()
         572  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         573  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         574  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         575  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         576  +
            .build()
         577  +
            .map_err(|err| {
         578  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         579  +
            })?;
         580  +
        cfg.interceptor_state()
         581  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         582  +
        ::std::result::Result::Ok(())
         583  +
    }
         584  +
}
         585  +
         586  +
// The get_* functions below are generated from JMESPath expressions in the
         587  +
// operationContextParams trait. They target the operation's input shape.
         588  +
         589  +
/// Error type for the `AssociateOpsItemRelatedItemError` operation.
         590  +
#[non_exhaustive]
         591  +
#[derive(::std::fmt::Debug)]
         592  +
pub enum AssociateOpsItemRelatedItemError {
         593  +
    /// <p>An error occurred on the server side.</p>
         594  +
    InternalServerError(crate::types::error::InternalServerError),
         595  +
    /// <p>The specified OpsItem is in the process of being deleted.</p>
         596  +
    OpsItemConflictException(crate::types::error::OpsItemConflictException),
         597  +
    /// <p>A specified parameter argument isn't valid. Verify the available arguments and try again.</p>
         598  +
    OpsItemInvalidParameterException(crate::types::error::OpsItemInvalidParameterException),
         599  +
    /// <p>The request caused OpsItems to exceed one or more quotas.</p>
         600  +
    OpsItemLimitExceededException(crate::types::error::OpsItemLimitExceededException),
         601  +
    /// <p>The specified OpsItem ID doesn't exist. Verify the ID and try again.</p>
         602  +
    OpsItemNotFoundException(crate::types::error::OpsItemNotFoundException),
         603  +
    /// <p>The Amazon Resource Name (ARN) is already associated with the OpsItem.</p>
         604  +
    OpsItemRelatedItemAlreadyExistsException(crate::types::error::OpsItemRelatedItemAlreadyExistsException),
         605  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         606  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         607  +
    variable wildcard pattern and check `.code()`:
         608  +
     \
         609  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         610  +
     \
         611  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AssociateOpsItemRelatedItemError) for what information is available for the error.")]
         612  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         613  +
}
         614  +
impl AssociateOpsItemRelatedItemError {
         615  +
    /// Creates the `AssociateOpsItemRelatedItemError::Unhandled` variant from any error type.
         616  +
    pub fn unhandled(
         617  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         618  +
    ) -> Self {
         619  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         620  +
            source: err.into(),
         621  +
            meta: ::std::default::Default::default(),
         622  +
        })
         623  +
    }
         624  +
         625  +
    /// Creates the `AssociateOpsItemRelatedItemError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         626  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         627  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         628  +
            source: err.clone().into(),
         629  +
            meta: err,
         630  +
        })
         631  +
    }
         632  +
    ///
         633  +
    /// Returns error metadata, which includes the error code, message,
         634  +
    /// request ID, and potentially additional information.
         635  +
    ///
         636  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         637  +
        match self {
         638  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         639  +
            Self::OpsItemConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         640  +
            Self::OpsItemInvalidParameterException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         641  +
            Self::OpsItemLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         642  +
            Self::OpsItemNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         643  +
            Self::OpsItemRelatedItemAlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         644  +
            Self::Unhandled(e) => &e.meta,
         645  +
        }
         646  +
    }
         647  +
    /// Returns `true` if the error kind is `AssociateOpsItemRelatedItemError::InternalServerError`.
         648  +
    pub fn is_internal_server_error(&self) -> bool {
         649  +
        matches!(self, Self::InternalServerError(_))
         650  +
    }
         651  +
    /// Returns `true` if the error kind is `AssociateOpsItemRelatedItemError::OpsItemConflictException`.
         652  +
    pub fn is_ops_item_conflict_exception(&self) -> bool {
         653  +
        matches!(self, Self::OpsItemConflictException(_))
         654  +
    }
         655  +
    /// Returns `true` if the error kind is `AssociateOpsItemRelatedItemError::OpsItemInvalidParameterException`.
         656  +
    pub fn is_ops_item_invalid_parameter_exception(&self) -> bool {
         657  +
        matches!(self, Self::OpsItemInvalidParameterException(_))
         658  +
    }
         659  +
    /// Returns `true` if the error kind is `AssociateOpsItemRelatedItemError::OpsItemLimitExceededException`.
         660  +
    pub fn is_ops_item_limit_exceeded_exception(&self) -> bool {
         661  +
        matches!(self, Self::OpsItemLimitExceededException(_))
         662  +
    }
         663  +
    /// Returns `true` if the error kind is `AssociateOpsItemRelatedItemError::OpsItemNotFoundException`.
         664  +
    pub fn is_ops_item_not_found_exception(&self) -> bool {
         665  +
        matches!(self, Self::OpsItemNotFoundException(_))
         666  +
    }
         667  +
    /// Returns `true` if the error kind is `AssociateOpsItemRelatedItemError::OpsItemRelatedItemAlreadyExistsException`.
         668  +
    pub fn is_ops_item_related_item_already_exists_exception(&self) -> bool {
         669  +
        matches!(self, Self::OpsItemRelatedItemAlreadyExistsException(_))
         670  +
    }
         671  +
}
         672  +
impl ::std::error::Error for AssociateOpsItemRelatedItemError {
         673  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         674  +
        match self {
         675  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         676  +
            Self::OpsItemConflictException(_inner) => ::std::option::Option::Some(_inner),
         677  +
            Self::OpsItemInvalidParameterException(_inner) => ::std::option::Option::Some(_inner),
         678  +
            Self::OpsItemLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
         679  +
            Self::OpsItemNotFoundException(_inner) => ::std::option::Option::Some(_inner),
         680  +
            Self::OpsItemRelatedItemAlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
         681  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         682  +
        }
         683  +
    }
         684  +
}
         685  +
impl ::std::fmt::Display for AssociateOpsItemRelatedItemError {
         686  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         687  +
        match self {
         688  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         689  +
            Self::OpsItemConflictException(_inner) => _inner.fmt(f),
         690  +
            Self::OpsItemInvalidParameterException(_inner) => _inner.fmt(f),
         691  +
            Self::OpsItemLimitExceededException(_inner) => _inner.fmt(f),
         692  +
            Self::OpsItemNotFoundException(_inner) => _inner.fmt(f),
         693  +
            Self::OpsItemRelatedItemAlreadyExistsException(_inner) => _inner.fmt(f),
         694  +
            Self::Unhandled(_inner) => {
         695  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         696  +
                    write!(f, "unhandled error ({code})")
         697  +
                } else {
         698  +
                    f.write_str("unhandled error")
         699  +
                }
         700  +
            }
         701  +
        }
         702  +
    }
         703  +
}
         704  +
impl ::aws_smithy_types::retry::ProvideErrorKind for AssociateOpsItemRelatedItemError {
         705  +
    fn code(&self) -> ::std::option::Option<&str> {
         706  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         707  +
    }
         708  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         709  +
        ::std::option::Option::None
         710  +
    }
         711  +
}
         712  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AssociateOpsItemRelatedItemError {
         713  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         714  +
        match self {
         715  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         716  +
            Self::OpsItemConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         717  +
            Self::OpsItemInvalidParameterException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         718  +
            Self::OpsItemLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         719  +
            Self::OpsItemNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         720  +
            Self::OpsItemRelatedItemAlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         721  +
            Self::Unhandled(_inner) => &_inner.meta,
         722  +
        }
         723  +
    }
         724  +
}
         725  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AssociateOpsItemRelatedItemError {
         726  +
    fn create_unhandled_error(
         727  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         728  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         729  +
    ) -> Self {
         730  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         731  +
            source,
         732  +
            meta: meta.unwrap_or_default(),
         733  +
        })
         734  +
    }
         735  +
}
         736  +
impl ::aws_types::request_id::RequestId for crate::operation::associate_ops_item_related_item::AssociateOpsItemRelatedItemError {
         737  +
    fn request_id(&self) -> Option<&str> {
         738  +
        self.meta().request_id()
         739  +
    }
         740  +
}
         741  +
         742  +
pub use crate::operation::associate_ops_item_related_item::_associate_ops_item_related_item_input::AssociateOpsItemRelatedItemInput;
         743  +
         744  +
pub use crate::operation::associate_ops_item_related_item::_associate_ops_item_related_item_output::AssociateOpsItemRelatedItemOutput;
         745  +
         746  +
mod _associate_ops_item_related_item_input;
         747  +
         748  +
mod _associate_ops_item_related_item_output;
         749  +
         750  +
/// Builders
         751  +
pub mod builders;