AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/create_maintenance_window/_create_maintenance_window_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 CreateMaintenanceWindowOutput {
           6  +
    /// <p>The ID of the created maintenance window.</p>
           7  +
    pub window_id: ::std::option::Option<::std::string::String>,
           8  +
    _request_id: Option<String>,
           9  +
}
          10  +
impl CreateMaintenanceWindowOutput {
          11  +
    /// <p>The ID of the created maintenance window.</p>
          12  +
    pub fn window_id(&self) -> ::std::option::Option<&str> {
          13  +
        self.window_id.as_deref()
          14  +
    }
          15  +
}
          16  +
static CREATEMAINTENANCEWINDOWOUTPUT_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          17  +
    ::aws_smithy_schema::ShapeId::from_parts(
          18  +
        "com.amazonaws.ssm.synthetic#CreateMaintenanceWindowOutput$WindowId",
          19  +
        "com.amazonaws.ssm.synthetic",
          20  +
        "CreateMaintenanceWindowOutput",
          21  +
    ),
          22  +
    ::aws_smithy_schema::ShapeType::String,
          23  +
    "WindowId",
          24  +
    0,
          25  +
);
          26  +
static CREATEMAINTENANCEWINDOWOUTPUT_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 CREATEMAINTENANCEWINDOWOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#CreateMaintenanceWindowOutput",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "CreateMaintenanceWindowOutput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::Structure,
          40  +
    &[
          41  +
        &CREATEMAINTENANCEWINDOWOUTPUT_MEMBER_WINDOW_ID,
          42  +
        &CREATEMAINTENANCEWINDOWOUTPUT_MEMBER__REQUEST_ID,
          43  +
    ],
          44  +
)
          45  +
.with_original_name("CreateMaintenanceWindowResult");
          46  +
impl CreateMaintenanceWindowOutput {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEMAINTENANCEWINDOWOUTPUT_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for CreateMaintenanceWindowOutput {
          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.window_id {
          57  +
            ser.write_string(&CREATEMAINTENANCEWINDOWOUTPUT_MEMBER_WINDOW_ID, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl CreateMaintenanceWindowOutput {
          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(&CREATEMAINTENANCEWINDOWOUTPUT_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.window_id = Some(deser.read_string(member)?);
          83  +
                    }
          84  +
                }
          85  +
                Some(1) => {
          86  +
                    builder._request_id = Some(deser.read_string(member)?);
          87  +
                }
          88  +
                _ => {}
          89  +
            }
          90  +
            Ok(())
          91  +
        })?;
          92  +
        Ok(builder.build())
          93  +
    }
          94  +
}
          95  +
impl CreateMaintenanceWindowOutput {
          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(&CREATEMAINTENANCEWINDOWOUTPUT_SCHEMA, &mut |member, deser| {
         119  +
            match member.member_index() {
         120  +
                Some(0) => {
         121  +
                    builder.window_id = Some(deser.read_string(member)?);
         122  +
                }
         123  +
                _ => {}
         124  +
            }
         125  +
            Ok(())
         126  +
        })?;
         127  +
        Ok(builder.build())
         128  +
    }
         129  +
}
         130  +
impl ::aws_types::request_id::RequestId for CreateMaintenanceWindowOutput {
         131  +
    fn request_id(&self) -> Option<&str> {
         132  +
        self._request_id.as_deref()
         133  +
    }
         134  +
}
         135  +
impl CreateMaintenanceWindowOutput {
         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 CreateMaintenanceWindowOutput {
         142  +
    /// Creates a new builder-style object to manufacture [`CreateMaintenanceWindowOutput`](crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput).
         143  +
    pub fn builder() -> crate::operation::create_maintenance_window::builders::CreateMaintenanceWindowOutputBuilder {
         144  +
        crate::operation::create_maintenance_window::builders::CreateMaintenanceWindowOutputBuilder::default()
         145  +
    }
         146  +
}
         147  +
         148  +
/// A builder for [`CreateMaintenanceWindowOutput`](crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput).
         149  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         150  +
#[non_exhaustive]
         151  +
pub struct CreateMaintenanceWindowOutputBuilder {
         152  +
    pub(crate) window_id: ::std::option::Option<::std::string::String>,
         153  +
    _request_id: Option<String>,
         154  +
}
         155  +
impl CreateMaintenanceWindowOutputBuilder {
         156  +
    /// <p>The ID of the created maintenance window.</p>
         157  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         158  +
        self.window_id = ::std::option::Option::Some(input.into());
         159  +
        self
         160  +
    }
         161  +
    /// <p>The ID of the created maintenance window.</p>
         162  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         163  +
        self.window_id = input;
         164  +
        self
         165  +
    }
         166  +
    /// <p>The ID of the created maintenance window.</p>
         167  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         168  +
        &self.window_id
         169  +
    }
         170  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         171  +
        self._request_id = Some(request_id.into());
         172  +
        self
         173  +
    }
         174  +
         175  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         176  +
        self._request_id = request_id;
         177  +
        self
         178  +
    }
         179  +
    /// Consumes the builder and constructs a [`CreateMaintenanceWindowOutput`](crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput).
         180  +
    pub fn build(self) -> crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput {
         181  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput {
         182  +
            window_id: self.window_id,
         183  +
            _request_id: self._request_id,
         184  +
        }
         185  +
    }
         186  +
}

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

@@ -0,1 +0,334 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::create_maintenance_window::_create_maintenance_window_input::CreateMaintenanceWindowInputBuilder;
           3  +
           4  +
pub use crate::operation::create_maintenance_window::_create_maintenance_window_output::CreateMaintenanceWindowOutputBuilder;
           5  +
           6  +
impl crate::operation::create_maintenance_window::builders::CreateMaintenanceWindowInputBuilder {
           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_maintenance_window::CreateMaintenanceWindowOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::create_maintenance_window::CreateMaintenanceWindowError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.create_maintenance_window();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `CreateMaintenanceWindow`.
          24  +
///
          25  +
/// <p>Creates a new maintenance window.</p><note>
          26  +
/// <p>The value you specify for <code>Duration</code> determines the specific end time for the maintenance window based on the time it begins. No maintenance window tasks are permitted to start after the resulting endtime minus the number of hours you specify for <code>Cutoff</code>. For example, if the maintenance window starts at 3 PM, the duration is three hours, and the value you specify for <code>Cutoff</code> is one hour, no maintenance window tasks can start after 5 PM.</p>
          27  +
/// </note>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct CreateMaintenanceWindowFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::create_maintenance_window::builders::CreateMaintenanceWindowInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput,
          37  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindowError,
          38  +
    > for CreateMaintenanceWindowFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput,
          46  +
            crate::operation::create_maintenance_window::CreateMaintenanceWindowError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl CreateMaintenanceWindowFluentBuilder {
          53  +
    /// Creates a new `CreateMaintenanceWindowFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the CreateMaintenanceWindow as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::create_maintenance_window::builders::CreateMaintenanceWindowInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::create_maintenance_window::CreateMaintenanceWindowError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::create_maintenance_window::CreateMaintenanceWindow::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindow::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindowOutput,
          99  +
        crate::operation::create_maintenance_window::CreateMaintenanceWindowError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    /// <p>The name of the maintenance window.</p>
         114  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         115  +
        self.inner = self.inner.name(input.into());
         116  +
        self
         117  +
    }
         118  +
    /// <p>The name of the maintenance window.</p>
         119  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         120  +
        self.inner = self.inner.set_name(input);
         121  +
        self
         122  +
    }
         123  +
    /// <p>The name of the maintenance window.</p>
         124  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         125  +
        self.inner.get_name()
         126  +
    }
         127  +
    /// <p>An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.</p>
         128  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         129  +
        self.inner = self.inner.description(input.into());
         130  +
        self
         131  +
    }
         132  +
    /// <p>An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.</p>
         133  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         134  +
        self.inner = self.inner.set_description(input);
         135  +
        self
         136  +
    }
         137  +
    /// <p>An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.</p>
         138  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         139  +
        self.inner.get_description()
         140  +
    }
         141  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
         142  +
    /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
         143  +
    /// </note>
         144  +
    pub fn start_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         145  +
        self.inner = self.inner.start_date(input.into());
         146  +
        self
         147  +
    }
         148  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
         149  +
    /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
         150  +
    /// </note>
         151  +
    pub fn set_start_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         152  +
        self.inner = self.inner.set_start_date(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
         156  +
    /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
         157  +
    /// </note>
         158  +
    pub fn get_start_date(&self) -> &::std::option::Option<::std::string::String> {
         159  +
        self.inner.get_start_date()
         160  +
    }
         161  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
         162  +
    pub fn end_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         163  +
        self.inner = self.inner.end_date(input.into());
         164  +
        self
         165  +
    }
         166  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
         167  +
    pub fn set_end_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         168  +
        self.inner = self.inner.set_end_date(input);
         169  +
        self
         170  +
    }
         171  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
         172  +
    pub fn get_end_date(&self) -> &::std::option::Option<::std::string::String> {
         173  +
        self.inner.get_end_date()
         174  +
    }
         175  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         176  +
    pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         177  +
        self.inner = self.inner.schedule(input.into());
         178  +
        self
         179  +
    }
         180  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         181  +
    pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         182  +
        self.inner = self.inner.set_schedule(input);
         183  +
        self
         184  +
    }
         185  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         186  +
    pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
         187  +
        self.inner.get_schedule()
         188  +
    }
         189  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
         190  +
    pub fn schedule_timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         191  +
        self.inner = self.inner.schedule_timezone(input.into());
         192  +
        self
         193  +
    }
         194  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
         195  +
    pub fn set_schedule_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         196  +
        self.inner = self.inner.set_schedule_timezone(input);
         197  +
        self
         198  +
    }
         199  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
         200  +
    pub fn get_schedule_timezone(&self) -> &::std::option::Option<::std::string::String> {
         201  +
        self.inner.get_schedule_timezone()
         202  +
    }
         203  +
    /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
         204  +
    /// <p>For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.</p>
         205  +
    /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
         206  +
    /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
         207  +
    pub fn schedule_offset(mut self, input: i32) -> Self {
         208  +
        self.inner = self.inner.schedule_offset(input);
         209  +
        self
         210  +
    }
         211  +
    /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
         212  +
    /// <p>For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.</p>
         213  +
    /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
         214  +
    /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
         215  +
    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
         216  +
        self.inner = self.inner.set_schedule_offset(input);
         217  +
        self
         218  +
    }
         219  +
    /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
         220  +
    /// <p>For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.</p>
         221  +
    /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
         222  +
    /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
         223  +
    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
         224  +
        self.inner.get_schedule_offset()
         225  +
    }
         226  +
    /// <p>The duration of the maintenance window in hours.</p>
         227  +
    pub fn duration(mut self, input: i32) -> Self {
         228  +
        self.inner = self.inner.duration(input);
         229  +
        self
         230  +
    }
         231  +
    /// <p>The duration of the maintenance window in hours.</p>
         232  +
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
         233  +
        self.inner = self.inner.set_duration(input);
         234  +
        self
         235  +
    }
         236  +
    /// <p>The duration of the maintenance window in hours.</p>
         237  +
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
         238  +
        self.inner.get_duration()
         239  +
    }
         240  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
         241  +
    pub fn cutoff(mut self, input: i32) -> Self {
         242  +
        self.inner = self.inner.cutoff(input);
         243  +
        self
         244  +
    }
         245  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
         246  +
    pub fn set_cutoff(mut self, input: ::std::option::Option<i32>) -> Self {
         247  +
        self.inner = self.inner.set_cutoff(input);
         248  +
        self
         249  +
    }
         250  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
         251  +
    pub fn get_cutoff(&self) -> &::std::option::Option<i32> {
         252  +
        self.inner.get_cutoff()
         253  +
    }
         254  +
    /// <p>Enables a maintenance window task to run on managed nodes, even if you haven't registered those nodes as targets. If enabled, then you must specify the unregistered managed nodes (by node ID) when you register a task with the maintenance window.</p>
         255  +
    /// <p>If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.</p>
         256  +
    pub fn allow_unassociated_targets(mut self, input: bool) -> Self {
         257  +
        self.inner = self.inner.allow_unassociated_targets(input);
         258  +
        self
         259  +
    }
         260  +
    /// <p>Enables a maintenance window task to run on managed nodes, even if you haven't registered those nodes as targets. If enabled, then you must specify the unregistered managed nodes (by node ID) when you register a task with the maintenance window.</p>
         261  +
    /// <p>If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.</p>
         262  +
    pub fn set_allow_unassociated_targets(mut self, input: ::std::option::Option<bool>) -> Self {
         263  +
        self.inner = self.inner.set_allow_unassociated_targets(input);
         264  +
        self
         265  +
    }
         266  +
    /// <p>Enables a maintenance window task to run on managed nodes, even if you haven't registered those nodes as targets. If enabled, then you must specify the unregistered managed nodes (by node ID) when you register a task with the maintenance window.</p>
         267  +
    /// <p>If you don't enable this option, then you must specify previously-registered targets when you register a task with the maintenance window.</p>
         268  +
    pub fn get_allow_unassociated_targets(&self) -> &::std::option::Option<bool> {
         269  +
        self.inner.get_allow_unassociated_targets()
         270  +
    }
         271  +
    /// <p>User-provided idempotency token.</p>
         272  +
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         273  +
        self.inner = self.inner.client_token(input.into());
         274  +
        self
         275  +
    }
         276  +
    /// <p>User-provided idempotency token.</p>
         277  +
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         278  +
        self.inner = self.inner.set_client_token(input);
         279  +
        self
         280  +
    }
         281  +
    /// <p>User-provided idempotency token.</p>
         282  +
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
         283  +
        self.inner.get_client_token()
         284  +
    }
         285  +
    ///
         286  +
    /// Appends an item to `Tags`.
         287  +
    ///
         288  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         289  +
    ///
         290  +
    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:</p>
         291  +
    /// <ul>
         292  +
    /// <li>
         293  +
    /// <p><code>Key=TaskType,Value=AgentUpdate</code></p></li>
         294  +
    /// <li>
         295  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         296  +
    /// <li>
         297  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         298  +
    /// </ul><note>
         299  +
    /// <p>To add tags to an existing maintenance window, use the <code>AddTagsToResource</code> operation.</p>
         300  +
    /// </note>
         301  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         302  +
        self.inner = self.inner.tags(input);
         303  +
        self
         304  +
    }
         305  +
    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:</p>
         306  +
    /// <ul>
         307  +
    /// <li>
         308  +
    /// <p><code>Key=TaskType,Value=AgentUpdate</code></p></li>
         309  +
    /// <li>
         310  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         311  +
    /// <li>
         312  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         313  +
    /// </ul><note>
         314  +
    /// <p>To add tags to an existing maintenance window, use the <code>AddTagsToResource</code> operation.</p>
         315  +
    /// </note>
         316  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         317  +
        self.inner = self.inner.set_tags(input);
         318  +
        self
         319  +
    }
         320  +
    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key-value pairs:</p>
         321  +
    /// <ul>
         322  +
    /// <li>
         323  +
    /// <p><code>Key=TaskType,Value=AgentUpdate</code></p></li>
         324  +
    /// <li>
         325  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         326  +
    /// <li>
         327  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         328  +
    /// </ul><note>
         329  +
    /// <p>To add tags to an existing maintenance window, use the <code>AddTagsToResource</code> operation.</p>
         330  +
    /// </note>
         331  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         332  +
        self.inner.get_tags()
         333  +
    }
         334  +
}

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

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