AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

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

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

@@ -0,1 +0,180 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_maintenance_window_tasks::_describe_maintenance_window_tasks_input::DescribeMaintenanceWindowTasksInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_maintenance_window_tasks::_describe_maintenance_window_tasks_output::DescribeMaintenanceWindowTasksOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_maintenance_window_tasks::builders::DescribeMaintenanceWindowTasksInputBuilder {
           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::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_maintenance_window_tasks();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeMaintenanceWindowTasks`.
          24  +
///
          25  +
/// <p>Lists the tasks in a maintenance window.</p><note>
          26  +
/// <p>For maintenance window tasks without a specified target, you can't supply values for <code>--max-errors</code> and <code>--max-concurrency</code>. Instead, the system inserts a placeholder value of <code>1</code>, which may be reported in the response to this command. These values don't affect the running of your task and can be ignored.</p>
          27  +
/// </note>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct DescribeMaintenanceWindowTasksFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::describe_maintenance_window_tasks::builders::DescribeMaintenanceWindowTasksInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksOutput,
          37  +
        crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
          38  +
    > for DescribeMaintenanceWindowTasksFluentBuilder
          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::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksOutput,
          46  +
            crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl DescribeMaintenanceWindowTasksFluentBuilder {
          53  +
    /// Creates a new `DescribeMaintenanceWindowTasksFluentBuilder`.
          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 DescribeMaintenanceWindowTasks as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::describe_maintenance_window_tasks::builders::DescribeMaintenanceWindowTasksInputBuilder {
          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::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
          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::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasks::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasks::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::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksOutput,
          99  +
        crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
         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  +
    /// Create a paginator for this request
         114  +
    ///
         115  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_maintenance_window_tasks::paginator::DescribeMaintenanceWindowTasksPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         116  +
    pub fn into_paginator(self) -> crate::operation::describe_maintenance_window_tasks::paginator::DescribeMaintenanceWindowTasksPaginator {
         117  +
        crate::operation::describe_maintenance_window_tasks::paginator::DescribeMaintenanceWindowTasksPaginator::new(self.handle, self.inner)
         118  +
    }
         119  +
    /// <p>The ID of the maintenance window whose tasks should be retrieved.</p>
         120  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         121  +
        self.inner = self.inner.window_id(input.into());
         122  +
        self
         123  +
    }
         124  +
    /// <p>The ID of the maintenance window whose tasks should be retrieved.</p>
         125  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         126  +
        self.inner = self.inner.set_window_id(input);
         127  +
        self
         128  +
    }
         129  +
    /// <p>The ID of the maintenance window whose tasks should be retrieved.</p>
         130  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         131  +
        self.inner.get_window_id()
         132  +
    }
         133  +
    ///
         134  +
    /// Appends an item to `Filters`.
         135  +
    ///
         136  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         137  +
    ///
         138  +
    /// <p>Optional filters used to narrow down the scope of the returned tasks. The supported filter keys are <code>WindowTaskId</code>, <code>TaskArn</code>, <code>Priority</code>, and <code>TaskType</code>.</p>
         139  +
    pub fn filters(mut self, input: crate::types::MaintenanceWindowFilter) -> Self {
         140  +
        self.inner = self.inner.filters(input);
         141  +
        self
         142  +
    }
         143  +
    /// <p>Optional filters used to narrow down the scope of the returned tasks. The supported filter keys are <code>WindowTaskId</code>, <code>TaskArn</code>, <code>Priority</code>, and <code>TaskType</code>.</p>
         144  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MaintenanceWindowFilter>>) -> Self {
         145  +
        self.inner = self.inner.set_filters(input);
         146  +
        self
         147  +
    }
         148  +
    /// <p>Optional filters used to narrow down the scope of the returned tasks. The supported filter keys are <code>WindowTaskId</code>, <code>TaskArn</code>, <code>Priority</code>, and <code>TaskType</code>.</p>
         149  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MaintenanceWindowFilter>> {
         150  +
        self.inner.get_filters()
         151  +
    }
         152  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         153  +
    pub fn max_results(mut self, input: i32) -> Self {
         154  +
        self.inner = self.inner.max_results(input);
         155  +
        self
         156  +
    }
         157  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         158  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         159  +
        self.inner = self.inner.set_max_results(input);
         160  +
        self
         161  +
    }
         162  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         163  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         164  +
        self.inner.get_max_results()
         165  +
    }
         166  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         167  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         168  +
        self.inner = self.inner.next_token(input.into());
         169  +
        self
         170  +
    }
         171  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         172  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         173  +
        self.inner = self.inner.set_next_token(input);
         174  +
        self
         175  +
    }
         176  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         177  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         178  +
        self.inner.get_next_token()
         179  +
    }
         180  +
}

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

@@ -0,1 +0,152 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribeMaintenanceWindowTasks`](crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasks)
           3  +
pub struct DescribeMaintenanceWindowTasksPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_maintenance_window_tasks::builders::DescribeMaintenanceWindowTasksInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribeMaintenanceWindowTasksPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::describe_maintenance_window_tasks::builders::DescribeMaintenanceWindowTasksInputBuilder,
          14  +
    ) -> Self {
          15  +
        Self {
          16  +
            handle,
          17  +
            builder,
          18  +
            stop_on_duplicate_token: true,
          19  +
        }
          20  +
    }
          21  +
          22  +
    /// Set the page size
          23  +
    ///
          24  +
    /// _Note: this method will override any previously set value for `max_results`_
          25  +
    pub fn page_size(mut self, limit: i32) -> Self {
          26  +
        self.builder.max_results = ::std::option::Option::Some(limit);
          27  +
        self
          28  +
    }
          29  +
          30  +
    /// Create a flattened paginator
          31  +
    ///
          32  +
    /// This paginator automatically flattens results using `tasks`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_maintenance_window_tasks::paginator::DescribeMaintenanceWindowTasksPaginatorItems {
          35  +
        crate::operation::describe_maintenance_window_tasks::paginator::DescribeMaintenanceWindowTasksPaginatorItems(self)
          36  +
    }
          37  +
          38  +
    /// Stop paginating when the service returns the same pagination token twice in a row.
          39  +
    ///
          40  +
    /// Defaults to true.
          41  +
    ///
          42  +
    /// For certain operations, it may be useful to continue on duplicate token. For example,
          43  +
    /// if an operation is for tailing a log file in real-time, then continuing may be desired.
          44  +
    /// This option can be set to `false` to accommodate these use cases.
          45  +
    pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self {
          46  +
        self.stop_on_duplicate_token = stop_on_duplicate_token;
          47  +
        self
          48  +
    }
          49  +
          50  +
    /// Create the pagination stream
          51  +
    ///
          52  +
    /// _Note:_ No requests will be dispatched until the stream is used
          53  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
          54  +
    pub fn send(
          55  +
        self,
          56  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
          57  +
        ::std::result::Result<
          58  +
            crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
          61  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          62  +
            >,
          63  +
        >,
          64  +
    > {
          65  +
        // Move individual fields out of self for the borrow checker
          66  +
        let builder = self.builder;
          67  +
        let handle = self.handle;
          68  +
        let runtime_plugins = crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasks::operation_runtime_plugins(
          69  +
            handle.runtime_plugins.clone(),
          70  +
            &handle.conf,
          71  +
            ::std::option::Option::None,
          72  +
        )
          73  +
        .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          74  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          75  +
            move |tx| {
          76  +
                ::std::boxed::Box::pin(async move {
          77  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          78  +
                    let mut input = match builder
          79  +
                        .build()
          80  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          81  +
                    {
          82  +
                        ::std::result::Result::Ok(input) => input,
          83  +
                        ::std::result::Result::Err(e) => {
          84  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          85  +
                            return;
          86  +
                        }
          87  +
                    };
          88  +
                    loop {
          89  +
                        let resp = crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasks::orchestrate(
          90  +
                            &runtime_plugins,
          91  +
                            input.clone(),
          92  +
                        )
          93  +
                        .await;
          94  +
                        // If the input member is None or it was an error
          95  +
                        let done = match resp {
          96  +
                            ::std::result::Result::Ok(ref resp) => {
          97  +
                                let new_token = crate::lens::reflens_describe_maintenance_window_tasks_output_output_next_token(resp);
          98  +
                                // Pagination is exhausted when the next token is an empty string
          99  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
         100  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
         101  +
                                    true
         102  +
                                } else {
         103  +
                                    input.next_token = new_token.cloned();
         104  +
                                    is_empty
         105  +
                                }
         106  +
                            }
         107  +
                            ::std::result::Result::Err(_) => true,
         108  +
                        };
         109  +
                        if tx.send(resp).await.is_err() {
         110  +
                            // receiving end was dropped
         111  +
                            return;
         112  +
                        }
         113  +
                        if done {
         114  +
                            return;
         115  +
                        }
         116  +
                    }
         117  +
                })
         118  +
            },
         119  +
        ))
         120  +
    }
         121  +
}
         122  +
         123  +
/// Flattened paginator for `DescribeMaintenanceWindowTasksPaginator`
         124  +
///
         125  +
/// This is created with [`.items()`](DescribeMaintenanceWindowTasksPaginator::items)
         126  +
pub struct DescribeMaintenanceWindowTasksPaginatorItems(DescribeMaintenanceWindowTasksPaginator);
         127  +
         128  +
impl DescribeMaintenanceWindowTasksPaginatorItems {
         129  +
    /// Create the pagination stream
         130  +
    ///
         131  +
    /// _Note_: No requests will be dispatched until the stream is used
         132  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         133  +
    ///
         134  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         135  +
    pub fn send(
         136  +
        self,
         137  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         138  +
        ::std::result::Result<
         139  +
            crate::types::MaintenanceWindowTask,
         140  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         141  +
                crate::operation::describe_maintenance_window_tasks::DescribeMaintenanceWindowTasksError,
         142  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         143  +
            >,
         144  +
        >,
         145  +
    > {
         146  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         147  +
            crate::lens::lens_describe_maintenance_window_tasks_output_output_tasks(page)
         148  +
                .unwrap_or_default()
         149  +
                .into_iter()
         150  +
        })
         151  +
    }
         152  +
}

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

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