AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

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

@@ -0,1 +0,317 @@
           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 CreateOpsMetadataInput {
           6  +
    /// <p>A resource ID for a new Application Manager application.</p>
           7  +
    pub resource_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>Metadata for a new Application Manager application.</p>
           9  +
    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
          10  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
          11  +
    /// <ul>
          12  +
    /// <li>
          13  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
          14  +
    /// <li>
          15  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
          16  +
    /// </ul>
          17  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
          18  +
}
          19  +
impl CreateOpsMetadataInput {
          20  +
    /// <p>A resource ID for a new Application Manager application.</p>
          21  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          22  +
        self.resource_id.as_deref()
          23  +
    }
          24  +
    /// <p>Metadata for a new Application Manager application.</p>
          25  +
    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>> {
          26  +
        self.metadata.as_ref()
          27  +
    }
          28  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
          29  +
    /// <ul>
          30  +
    /// <li>
          31  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
          32  +
    /// <li>
          33  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
          34  +
    /// </ul>
          35  +
    ///
          36  +
    /// 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()`.
          37  +
    pub fn tags(&self) -> &[crate::types::Tag] {
          38  +
        self.tags.as_deref().unwrap_or_default()
          39  +
    }
          40  +
}
          41  +
static CREATEOPSMETADATAINPUT_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts(
          43  +
        "com.amazonaws.ssm.synthetic#CreateOpsMetadataInput$ResourceId",
          44  +
        "com.amazonaws.ssm.synthetic",
          45  +
        "CreateOpsMetadataInput",
          46  +
    ),
          47  +
    ::aws_smithy_schema::ShapeType::String,
          48  +
    "ResourceId",
          49  +
    0,
          50  +
);
          51  +
static CREATEOPSMETADATAINPUT_MEMBER_METADATA_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          52  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MetadataMap$key", "com.amazonaws.ssm", "MetadataMap"),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "key",
          55  +
    0,
          56  +
);
          57  +
static CREATEOPSMETADATAINPUT_MEMBER_METADATA_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MetadataMap$value", "com.amazonaws.ssm", "MetadataMap"),
          59  +
    ::aws_smithy_schema::ShapeType::Structure,
          60  +
    "value",
          61  +
    1,
          62  +
);
          63  +
static CREATEOPSMETADATAINPUT_MEMBER_METADATA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_parts(
          65  +
        "com.amazonaws.ssm.synthetic#CreateOpsMetadataInput$Metadata",
          66  +
        "com.amazonaws.ssm.synthetic",
          67  +
        "CreateOpsMetadataInput",
          68  +
    ),
          69  +
    ::aws_smithy_schema::ShapeType::Map,
          70  +
    "Metadata",
          71  +
    1,
          72  +
)
          73  +
.with_map_members(&CREATEOPSMETADATAINPUT_MEMBER_METADATA_KEY, &CREATEOPSMETADATAINPUT_MEMBER_METADATA_VALUE);
          74  +
static CREATEOPSMETADATAINPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
          76  +
    ::aws_smithy_schema::ShapeType::Structure,
          77  +
    "member",
          78  +
    0,
          79  +
);
          80  +
static CREATEOPSMETADATAINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts(
          82  +
        "com.amazonaws.ssm.synthetic#CreateOpsMetadataInput$Tags",
          83  +
        "com.amazonaws.ssm.synthetic",
          84  +
        "CreateOpsMetadataInput",
          85  +
    ),
          86  +
    ::aws_smithy_schema::ShapeType::List,
          87  +
    "Tags",
          88  +
    2,
          89  +
)
          90  +
.with_list_member(&CREATEOPSMETADATAINPUT_MEMBER_TAGS_MEMBER);
          91  +
static CREATEOPSMETADATAINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          92  +
    ::aws_smithy_schema::ShapeId::from_parts(
          93  +
        "com.amazonaws.ssm.synthetic#CreateOpsMetadataInput",
          94  +
        "com.amazonaws.ssm.synthetic",
          95  +
        "CreateOpsMetadataInput",
          96  +
    ),
          97  +
    ::aws_smithy_schema::ShapeType::Structure,
          98  +
    &[
          99  +
        &CREATEOPSMETADATAINPUT_MEMBER_RESOURCE_ID,
         100  +
        &CREATEOPSMETADATAINPUT_MEMBER_METADATA,
         101  +
        &CREATEOPSMETADATAINPUT_MEMBER_TAGS,
         102  +
    ],
         103  +
)
         104  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         105  +
.with_original_name("CreateOpsMetadataRequest");
         106  +
impl CreateOpsMetadataInput {
         107  +
    /// The schema for this shape.
         108  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEOPSMETADATAINPUT_SCHEMA;
         109  +
}
         110  +
impl ::aws_smithy_schema::serde::SerializableStruct for CreateOpsMetadataInput {
         111  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         112  +
    fn serialize_members(
         113  +
        &self,
         114  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         115  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         116  +
        if let Some(ref val) = self.resource_id {
         117  +
            ser.write_string(&CREATEOPSMETADATAINPUT_MEMBER_RESOURCE_ID, val)?;
         118  +
        }
         119  +
        if let Some(ref val) = self.metadata {
         120  +
            ser.write_map(
         121  +
                &CREATEOPSMETADATAINPUT_MEMBER_METADATA,
         122  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         123  +
                    for (key, value) in val {
         124  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         125  +
                        ser.write_struct(crate::types::MetadataValue::SCHEMA, value)?;
         126  +
                    }
         127  +
                    Ok(())
         128  +
                },
         129  +
            )?;
         130  +
        }
         131  +
        if let Some(ref val) = self.tags {
         132  +
            ser.write_list(
         133  +
                &CREATEOPSMETADATAINPUT_MEMBER_TAGS,
         134  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         135  +
                    for item in val {
         136  +
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
         137  +
                    }
         138  +
                    Ok(())
         139  +
                },
         140  +
            )?;
         141  +
        }
         142  +
        Ok(())
         143  +
    }
         144  +
}
         145  +
impl CreateOpsMetadataInput {
         146  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         147  +
    pub fn deserialize(
         148  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         149  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         150  +
        #[allow(unused_variables, unused_mut)]
         151  +
        let mut builder = Self::builder();
         152  +
        #[allow(
         153  +
            unused_variables,
         154  +
            unreachable_code,
         155  +
            clippy::single_match,
         156  +
            clippy::match_single_binding,
         157  +
            clippy::diverging_sub_expression
         158  +
        )]
         159  +
        deserializer.read_struct(&CREATEOPSMETADATAINPUT_SCHEMA, &mut |member, deser| {
         160  +
            match member.member_index() {
         161  +
                Some(0) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.resource_id = Some(deser.read_string(member)?);
         166  +
                    }
         167  +
                }
         168  +
                Some(1) => {
         169  +
                    if deser.is_null() {
         170  +
                        deser.read_null()?;
         171  +
                    } else {
         172  +
                        builder.metadata = Some({
         173  +
                            let mut container = std::collections::HashMap::new();
         174  +
                            deser.read_map(member, &mut |key, deser| {
         175  +
                                container.insert(key, crate::types::MetadataValue::deserialize(deser)?);
         176  +
                                Ok(())
         177  +
                            })?;
         178  +
                            container
         179  +
                        });
         180  +
                    }
         181  +
                }
         182  +
                Some(2) => {
         183  +
                    if deser.is_null() {
         184  +
                        deser.read_null()?;
         185  +
                    } else {
         186  +
                        builder.tags = Some({
         187  +
                            let mut container = Vec::new();
         188  +
                            deser.read_list(member, &mut |deser| {
         189  +
                                container.push(crate::types::Tag::deserialize(deser)?);
         190  +
                                Ok(())
         191  +
                            })?;
         192  +
                            container
         193  +
                        });
         194  +
                    }
         195  +
                }
         196  +
                _ => {}
         197  +
            }
         198  +
            Ok(())
         199  +
        })?;
         200  +
        builder.resource_id = builder.resource_id.or(Some(String::new()));
         201  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         202  +
    }
         203  +
}
         204  +
impl CreateOpsMetadataInput {
         205  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         206  +
    pub fn deserialize_with_response(
         207  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         208  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         209  +
        _status: u16,
         210  +
        _body: &[u8],
         211  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         212  +
        Self::deserialize(deserializer)
         213  +
    }
         214  +
}
         215  +
impl CreateOpsMetadataInput {
         216  +
    /// Creates a new builder-style object to manufacture [`CreateOpsMetadataInput`](crate::operation::create_ops_metadata::CreateOpsMetadataInput).
         217  +
    pub fn builder() -> crate::operation::create_ops_metadata::builders::CreateOpsMetadataInputBuilder {
         218  +
        crate::operation::create_ops_metadata::builders::CreateOpsMetadataInputBuilder::default()
         219  +
    }
         220  +
}
         221  +
         222  +
/// A builder for [`CreateOpsMetadataInput`](crate::operation::create_ops_metadata::CreateOpsMetadataInput).
         223  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         224  +
#[non_exhaustive]
         225  +
pub struct CreateOpsMetadataInputBuilder {
         226  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         227  +
    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
         228  +
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
         229  +
}
         230  +
impl CreateOpsMetadataInputBuilder {
         231  +
    /// <p>A resource ID for a new Application Manager application.</p>
         232  +
    /// This field is required.
         233  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         234  +
        self.resource_id = ::std::option::Option::Some(input.into());
         235  +
        self
         236  +
    }
         237  +
    /// <p>A resource ID for a new Application Manager application.</p>
         238  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         239  +
        self.resource_id = input;
         240  +
        self
         241  +
    }
         242  +
    /// <p>A resource ID for a new Application Manager application.</p>
         243  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         244  +
        &self.resource_id
         245  +
    }
         246  +
    /// Adds a key-value pair to `metadata`.
         247  +
    ///
         248  +
    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
         249  +
    ///
         250  +
    /// <p>Metadata for a new Application Manager application.</p>
         251  +
    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::MetadataValue) -> Self {
         252  +
        let mut hash_map = self.metadata.unwrap_or_default();
         253  +
        hash_map.insert(k.into(), v);
         254  +
        self.metadata = ::std::option::Option::Some(hash_map);
         255  +
        self
         256  +
    }
         257  +
    /// <p>Metadata for a new Application Manager application.</p>
         258  +
    pub fn set_metadata(
         259  +
        mut self,
         260  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
         261  +
    ) -> Self {
         262  +
        self.metadata = input;
         263  +
        self
         264  +
    }
         265  +
    /// <p>Metadata for a new Application Manager application.</p>
         266  +
    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>> {
         267  +
        &self.metadata
         268  +
    }
         269  +
    /// Appends an item to `tags`.
         270  +
    ///
         271  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         272  +
    ///
         273  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
         274  +
    /// <ul>
         275  +
    /// <li>
         276  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         277  +
    /// <li>
         278  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
         279  +
    /// </ul>
         280  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         281  +
        let mut v = self.tags.unwrap_or_default();
         282  +
        v.push(input);
         283  +
        self.tags = ::std::option::Option::Some(v);
         284  +
        self
         285  +
    }
         286  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
         287  +
    /// <ul>
         288  +
    /// <li>
         289  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         290  +
    /// <li>
         291  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
         292  +
    /// </ul>
         293  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         294  +
        self.tags = input;
         295  +
        self
         296  +
    }
         297  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
         298  +
    /// <ul>
         299  +
    /// <li>
         300  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         301  +
    /// <li>
         302  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
         303  +
    /// </ul>
         304  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         305  +
        &self.tags
         306  +
    }
         307  +
    /// Consumes the builder and constructs a [`CreateOpsMetadataInput`](crate::operation::create_ops_metadata::CreateOpsMetadataInput).
         308  +
    pub fn build(
         309  +
        self,
         310  +
    ) -> ::std::result::Result<crate::operation::create_ops_metadata::CreateOpsMetadataInput, ::aws_smithy_types::error::operation::BuildError> {
         311  +
        ::std::result::Result::Ok(crate::operation::create_ops_metadata::CreateOpsMetadataInput {
         312  +
            resource_id: self.resource_id,
         313  +
            metadata: self.metadata,
         314  +
            tags: self.tags,
         315  +
        })
         316  +
    }
         317  +
}

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

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

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

@@ -0,1 +0,184 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::create_ops_metadata::_create_ops_metadata_input::CreateOpsMetadataInputBuilder;
           3  +
           4  +
pub use crate::operation::create_ops_metadata::_create_ops_metadata_output::CreateOpsMetadataOutputBuilder;
           5  +
           6  +
impl crate::operation::create_ops_metadata::builders::CreateOpsMetadataInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::create_ops_metadata::CreateOpsMetadataOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::create_ops_metadata::CreateOpsMetadataError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.create_ops_metadata();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `CreateOpsMetadata`.
          24  +
///
          25  +
/// <p>If you create a new application in Application Manager, Amazon Web Services Systems Manager calls this API operation to specify information about the new application, including the application type.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct CreateOpsMetadataFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::create_ops_metadata::builders::CreateOpsMetadataInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::create_ops_metadata::CreateOpsMetadataOutput,
          35  +
        crate::operation::create_ops_metadata::CreateOpsMetadataError,
          36  +
    > for CreateOpsMetadataFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::create_ops_metadata::CreateOpsMetadataOutput,
          44  +
            crate::operation::create_ops_metadata::CreateOpsMetadataError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl CreateOpsMetadataFluentBuilder {
          51  +
    /// Creates a new `CreateOpsMetadataFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the CreateOpsMetadata as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::create_ops_metadata::builders::CreateOpsMetadataInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::create_ops_metadata::CreateOpsMetadataOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::create_ops_metadata::CreateOpsMetadataError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::create_ops_metadata::CreateOpsMetadata::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::create_ops_metadata::CreateOpsMetadata::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::create_ops_metadata::CreateOpsMetadataOutput,
          97  +
        crate::operation::create_ops_metadata::CreateOpsMetadataError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// <p>A resource ID for a new Application Manager application.</p>
         112  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.resource_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>A resource ID for a new Application Manager application.</p>
         117  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_resource_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>A resource ID for a new Application Manager application.</p>
         122  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_resource_id()
         124  +
    }
         125  +
    ///
         126  +
    /// Adds a key-value pair to `Metadata`.
         127  +
    ///
         128  +
    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
         129  +
    ///
         130  +
    /// <p>Metadata for a new Application Manager application.</p>
         131  +
    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::MetadataValue) -> Self {
         132  +
        self.inner = self.inner.metadata(k.into(), v);
         133  +
        self
         134  +
    }
         135  +
    /// <p>Metadata for a new Application Manager application.</p>
         136  +
    pub fn set_metadata(
         137  +
        mut self,
         138  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
         139  +
    ) -> Self {
         140  +
        self.inner = self.inner.set_metadata(input);
         141  +
        self
         142  +
    }
         143  +
    /// <p>Metadata for a new Application Manager application.</p>
         144  +
    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>> {
         145  +
        self.inner.get_metadata()
         146  +
    }
         147  +
    ///
         148  +
    /// Appends an item to `Tags`.
         149  +
    ///
         150  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         151  +
    ///
         152  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
         153  +
    /// <ul>
         154  +
    /// <li>
         155  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         156  +
    /// <li>
         157  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
         158  +
    /// </ul>
         159  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         160  +
        self.inner = self.inner.tags(input);
         161  +
        self
         162  +
    }
         163  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
         164  +
    /// <ul>
         165  +
    /// <li>
         166  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         167  +
    /// <li>
         168  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
         169  +
    /// </ul>
         170  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         171  +
        self.inner = self.inner.set_tags(input);
         172  +
        self
         173  +
    }
         174  +
    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for an OpsMetadata object. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an OpsMetadata object to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
         175  +
    /// <ul>
         176  +
    /// <li>
         177  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         178  +
    /// <li>
         179  +
    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
         180  +
    /// </ul>
         181  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         182  +
        self.inner.get_tags()
         183  +
    }
         184  +
}

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

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