AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,191 @@
           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 UpdateManagedInstanceRoleInput {
           6  +
    /// <p>The ID of the managed node where you want to update the role.</p>
           7  +
    pub instance_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
           9  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
          10  +
    /// </note>
          11  +
    pub iam_role: ::std::option::Option<::std::string::String>,
          12  +
}
          13  +
impl UpdateManagedInstanceRoleInput {
          14  +
    /// <p>The ID of the managed node where you want to update the role.</p>
          15  +
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
          16  +
        self.instance_id.as_deref()
          17  +
    }
          18  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
          19  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
          20  +
    /// </note>
          21  +
    pub fn iam_role(&self) -> ::std::option::Option<&str> {
          22  +
        self.iam_role.as_deref()
          23  +
    }
          24  +
}
          25  +
static UPDATEMANAGEDINSTANCEROLEINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          26  +
    ::aws_smithy_schema::ShapeId::from_parts(
          27  +
        "com.amazonaws.ssm.synthetic#UpdateManagedInstanceRoleInput$InstanceId",
          28  +
        "com.amazonaws.ssm.synthetic",
          29  +
        "UpdateManagedInstanceRoleInput",
          30  +
    ),
          31  +
    ::aws_smithy_schema::ShapeType::String,
          32  +
    "InstanceId",
          33  +
    0,
          34  +
);
          35  +
static UPDATEMANAGEDINSTANCEROLEINPUT_MEMBER_IAM_ROLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          36  +
    ::aws_smithy_schema::ShapeId::from_parts(
          37  +
        "com.amazonaws.ssm.synthetic#UpdateManagedInstanceRoleInput$IamRole",
          38  +
        "com.amazonaws.ssm.synthetic",
          39  +
        "UpdateManagedInstanceRoleInput",
          40  +
    ),
          41  +
    ::aws_smithy_schema::ShapeType::String,
          42  +
    "IamRole",
          43  +
    1,
          44  +
);
          45  +
static UPDATEMANAGEDINSTANCEROLEINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts(
          47  +
        "com.amazonaws.ssm.synthetic#UpdateManagedInstanceRoleInput",
          48  +
        "com.amazonaws.ssm.synthetic",
          49  +
        "UpdateManagedInstanceRoleInput",
          50  +
    ),
          51  +
    ::aws_smithy_schema::ShapeType::Structure,
          52  +
    &[
          53  +
        &UPDATEMANAGEDINSTANCEROLEINPUT_MEMBER_INSTANCE_ID,
          54  +
        &UPDATEMANAGEDINSTANCEROLEINPUT_MEMBER_IAM_ROLE,
          55  +
    ],
          56  +
)
          57  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          58  +
.with_original_name("UpdateManagedInstanceRoleRequest");
          59  +
impl UpdateManagedInstanceRoleInput {
          60  +
    /// The schema for this shape.
          61  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEMANAGEDINSTANCEROLEINPUT_SCHEMA;
          62  +
}
          63  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateManagedInstanceRoleInput {
          64  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          65  +
    fn serialize_members(
          66  +
        &self,
          67  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          68  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          69  +
        if let Some(ref val) = self.instance_id {
          70  +
            ser.write_string(&UPDATEMANAGEDINSTANCEROLEINPUT_MEMBER_INSTANCE_ID, val)?;
          71  +
        }
          72  +
        if let Some(ref val) = self.iam_role {
          73  +
            ser.write_string(&UPDATEMANAGEDINSTANCEROLEINPUT_MEMBER_IAM_ROLE, val)?;
          74  +
        }
          75  +
        Ok(())
          76  +
    }
          77  +
}
          78  +
impl UpdateManagedInstanceRoleInput {
          79  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          80  +
    pub fn deserialize(
          81  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          82  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          83  +
        #[allow(unused_variables, unused_mut)]
          84  +
        let mut builder = Self::builder();
          85  +
        #[allow(
          86  +
            unused_variables,
          87  +
            unreachable_code,
          88  +
            clippy::single_match,
          89  +
            clippy::match_single_binding,
          90  +
            clippy::diverging_sub_expression
          91  +
        )]
          92  +
        deserializer.read_struct(&UPDATEMANAGEDINSTANCEROLEINPUT_SCHEMA, &mut |member, deser| {
          93  +
            match member.member_index() {
          94  +
                Some(0) => {
          95  +
                    if deser.is_null() {
          96  +
                        deser.read_null()?;
          97  +
                    } else {
          98  +
                        builder.instance_id = Some(deser.read_string(member)?);
          99  +
                    }
         100  +
                }
         101  +
                Some(1) => {
         102  +
                    if deser.is_null() {
         103  +
                        deser.read_null()?;
         104  +
                    } else {
         105  +
                        builder.iam_role = Some(deser.read_string(member)?);
         106  +
                    }
         107  +
                }
         108  +
                _ => {}
         109  +
            }
         110  +
            Ok(())
         111  +
        })?;
         112  +
        builder.instance_id = builder.instance_id.or(Some(String::new()));
         113  +
        builder.iam_role = builder.iam_role.or(Some(String::new()));
         114  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         115  +
    }
         116  +
}
         117  +
impl UpdateManagedInstanceRoleInput {
         118  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         119  +
    pub fn deserialize_with_response(
         120  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         121  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         122  +
        _status: u16,
         123  +
        _body: &[u8],
         124  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         125  +
        Self::deserialize(deserializer)
         126  +
    }
         127  +
}
         128  +
impl UpdateManagedInstanceRoleInput {
         129  +
    /// Creates a new builder-style object to manufacture [`UpdateManagedInstanceRoleInput`](crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleInput).
         130  +
    pub fn builder() -> crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleInputBuilder {
         131  +
        crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleInputBuilder::default()
         132  +
    }
         133  +
}
         134  +
         135  +
/// A builder for [`UpdateManagedInstanceRoleInput`](crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleInput).
         136  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         137  +
#[non_exhaustive]
         138  +
pub struct UpdateManagedInstanceRoleInputBuilder {
         139  +
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
         140  +
    pub(crate) iam_role: ::std::option::Option<::std::string::String>,
         141  +
}
         142  +
impl UpdateManagedInstanceRoleInputBuilder {
         143  +
    /// <p>The ID of the managed node where you want to update the role.</p>
         144  +
    /// This field is required.
         145  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         146  +
        self.instance_id = ::std::option::Option::Some(input.into());
         147  +
        self
         148  +
    }
         149  +
    /// <p>The ID of the managed node where you want to update the role.</p>
         150  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         151  +
        self.instance_id = input;
         152  +
        self
         153  +
    }
         154  +
    /// <p>The ID of the managed node where you want to update the role.</p>
         155  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         156  +
        &self.instance_id
         157  +
    }
         158  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         159  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         160  +
    /// </note>
         161  +
    /// This field is required.
         162  +
    pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         163  +
        self.iam_role = ::std::option::Option::Some(input.into());
         164  +
        self
         165  +
    }
         166  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         167  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         168  +
    /// </note>
         169  +
    pub fn set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         170  +
        self.iam_role = input;
         171  +
        self
         172  +
    }
         173  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         174  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         175  +
    /// </note>
         176  +
    pub fn get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
         177  +
        &self.iam_role
         178  +
    }
         179  +
    /// Consumes the builder and constructs a [`UpdateManagedInstanceRoleInput`](crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleInput).
         180  +
    pub fn build(
         181  +
        self,
         182  +
    ) -> ::std::result::Result<
         183  +
        crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleInput,
         184  +
        ::aws_smithy_types::error::operation::BuildError,
         185  +
    > {
         186  +
        ::std::result::Result::Ok(crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleInput {
         187  +
            instance_id: self.instance_id,
         188  +
            iam_role: self.iam_role,
         189  +
        })
         190  +
    }
         191  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_managed_instance_role/_update_managed_instance_role_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 UpdateManagedInstanceRoleOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static UPDATEMANAGEDINSTANCEROLEOUTPUT_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 UPDATEMANAGEDINSTANCEROLEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#UpdateManagedInstanceRoleOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "UpdateManagedInstanceRoleOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&UPDATEMANAGEDINSTANCEROLEOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("UpdateManagedInstanceRoleResult");
          25  +
impl UpdateManagedInstanceRoleOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEMANAGEDINSTANCEROLEOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateManagedInstanceRoleOutput {
          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 UpdateManagedInstanceRoleOutput {
          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(&UPDATEMANAGEDINSTANCEROLEOUTPUT_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 UpdateManagedInstanceRoleOutput {
          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 UpdateManagedInstanceRoleOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl UpdateManagedInstanceRoleOutput {
          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 UpdateManagedInstanceRoleOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`UpdateManagedInstanceRoleOutput`](crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleOutput).
          95  +
    pub fn builder() -> crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleOutputBuilder {
          96  +
        crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`UpdateManagedInstanceRoleOutput`](crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct UpdateManagedInstanceRoleOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl UpdateManagedInstanceRoleOutputBuilder {
         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 [`UpdateManagedInstanceRoleOutput`](crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleOutput).
         117  +
    pub fn build(self) -> crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleOutput {
         118  +
        crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,145 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_managed_instance_role::_update_managed_instance_role_input::UpdateManagedInstanceRoleInputBuilder;
           3  +
           4  +
pub use crate::operation::update_managed_instance_role::_update_managed_instance_role_output::UpdateManagedInstanceRoleOutputBuilder;
           5  +
           6  +
impl crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleInputBuilder {
           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::update_managed_instance_role::UpdateManagedInstanceRoleOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_managed_instance_role();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateManagedInstanceRole`.
          24  +
///
          25  +
/// <p>Changes the Identity and Access Management (IAM) role that is assigned to the on-premises server, edge device, or virtual machines (VM). IAM roles are first assigned to these hybrid nodes during the activation process. For more information, see <code>CreateActivation</code>.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct UpdateManagedInstanceRoleFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleOutput,
          35  +
        crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleError,
          36  +
    > for UpdateManagedInstanceRoleFluentBuilder
          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::update_managed_instance_role::UpdateManagedInstanceRoleOutput,
          44  +
            crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl UpdateManagedInstanceRoleFluentBuilder {
          51  +
    /// Creates a new `UpdateManagedInstanceRoleFluentBuilder`.
          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 UpdateManagedInstanceRole as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::update_managed_instance_role::builders::UpdateManagedInstanceRoleInputBuilder {
          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::update_managed_instance_role::UpdateManagedInstanceRoleOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleError,
          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::update_managed_instance_role::UpdateManagedInstanceRole::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::update_managed_instance_role::UpdateManagedInstanceRole::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::update_managed_instance_role::UpdateManagedInstanceRoleOutput,
          97  +
        crate::operation::update_managed_instance_role::UpdateManagedInstanceRoleError,
          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>The ID of the managed node where you want to update the role.</p>
         112  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.instance_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The ID of the managed node where you want to update the role.</p>
         117  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_instance_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The ID of the managed node where you want to update the role.</p>
         122  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_instance_id()
         124  +
    }
         125  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         126  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         127  +
    /// </note>
         128  +
    pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         129  +
        self.inner = self.inner.iam_role(input.into());
         130  +
        self
         131  +
    }
         132  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         133  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         134  +
    /// </note>
         135  +
    pub fn set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         136  +
        self.inner = self.inner.set_iam_role(input);
         137  +
        self
         138  +
    }
         139  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         140  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         141  +
    /// </note>
         142  +
    pub fn get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
         143  +
        self.inner.get_iam_role()
         144  +
    }
         145  +
}

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

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