AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3

Files changed:

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

@@ -0,1 +0,345 @@
           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 DescribeAutomationStepExecutionsInput {
           6  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
           7  +
    pub automation_execution_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
           9  +
    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::StepExecutionFilter>>,
          10  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          11  +
    pub next_token: ::std::option::Option<::std::string::String>,
          12  +
    /// <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>
          13  +
    pub max_results: ::std::option::Option<i32>,
          14  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
          15  +
    pub reverse_order: ::std::option::Option<bool>,
          16  +
}
          17  +
impl DescribeAutomationStepExecutionsInput {
          18  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
          19  +
    pub fn automation_execution_id(&self) -> ::std::option::Option<&str> {
          20  +
        self.automation_execution_id.as_deref()
          21  +
    }
          22  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
          23  +
    ///
          24  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
          25  +
    pub fn filters(&self) -> &[crate::types::StepExecutionFilter] {
          26  +
        self.filters.as_deref().unwrap_or_default()
          27  +
    }
          28  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          29  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          30  +
        self.next_token.as_deref()
          31  +
    }
          32  +
    /// <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>
          33  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          34  +
        self.max_results
          35  +
    }
          36  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
          37  +
    pub fn reverse_order(&self) -> ::std::option::Option<bool> {
          38  +
        self.reverse_order
          39  +
    }
          40  +
}
          41  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_AUTOMATION_EXECUTION_ID: ::aws_smithy_schema::Schema<'static> =
          42  +
    ::aws_smithy_schema::Schema::new_member(
          43  +
        ::aws_smithy_schema::ShapeId::from_parts(
          44  +
            "com.amazonaws.ssm.synthetic#DescribeAutomationStepExecutionsInput$AutomationExecutionId",
          45  +
            "com.amazonaws.ssm.synthetic",
          46  +
            "DescribeAutomationStepExecutionsInput",
          47  +
        ),
          48  +
        ::aws_smithy_schema::ShapeType::String,
          49  +
        "AutomationExecutionId",
          50  +
        0,
          51  +
    );
          52  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_FILTERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts(
          54  +
        "com.amazonaws.ssm#StepExecutionFilterList$member",
          55  +
        "com.amazonaws.ssm",
          56  +
        "StepExecutionFilterList",
          57  +
    ),
          58  +
    ::aws_smithy_schema::ShapeType::Structure,
          59  +
    "member",
          60  +
    0,
          61  +
);
          62  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm.synthetic#DescribeAutomationStepExecutionsInput$Filters",
          65  +
        "com.amazonaws.ssm.synthetic",
          66  +
        "DescribeAutomationStepExecutionsInput",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::List,
          69  +
    "Filters",
          70  +
    1,
          71  +
)
          72  +
.with_list_member(&DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_FILTERS_MEMBER);
          73  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          74  +
    ::aws_smithy_schema::ShapeId::from_parts(
          75  +
        "com.amazonaws.ssm.synthetic#DescribeAutomationStepExecutionsInput$NextToken",
          76  +
        "com.amazonaws.ssm.synthetic",
          77  +
        "DescribeAutomationStepExecutionsInput",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::String,
          80  +
    "NextToken",
          81  +
    2,
          82  +
);
          83  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          84  +
    ::aws_smithy_schema::ShapeId::from_parts(
          85  +
        "com.amazonaws.ssm.synthetic#DescribeAutomationStepExecutionsInput$MaxResults",
          86  +
        "com.amazonaws.ssm.synthetic",
          87  +
        "DescribeAutomationStepExecutionsInput",
          88  +
    ),
          89  +
    ::aws_smithy_schema::ShapeType::Integer,
          90  +
    "MaxResults",
          91  +
    3,
          92  +
);
          93  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_REVERSE_ORDER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          94  +
    ::aws_smithy_schema::ShapeId::from_parts(
          95  +
        "com.amazonaws.ssm.synthetic#DescribeAutomationStepExecutionsInput$ReverseOrder",
          96  +
        "com.amazonaws.ssm.synthetic",
          97  +
        "DescribeAutomationStepExecutionsInput",
          98  +
    ),
          99  +
    ::aws_smithy_schema::ShapeType::Boolean,
         100  +
    "ReverseOrder",
         101  +
    4,
         102  +
);
         103  +
static DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         104  +
    ::aws_smithy_schema::ShapeId::from_parts(
         105  +
        "com.amazonaws.ssm.synthetic#DescribeAutomationStepExecutionsInput",
         106  +
        "com.amazonaws.ssm.synthetic",
         107  +
        "DescribeAutomationStepExecutionsInput",
         108  +
    ),
         109  +
    ::aws_smithy_schema::ShapeType::Structure,
         110  +
    &[
         111  +
        &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_AUTOMATION_EXECUTION_ID,
         112  +
        &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_FILTERS,
         113  +
        &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_NEXT_TOKEN,
         114  +
        &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_MAX_RESULTS,
         115  +
        &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_REVERSE_ORDER,
         116  +
    ],
         117  +
)
         118  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         119  +
.with_original_name("DescribeAutomationStepExecutionsRequest");
         120  +
impl DescribeAutomationStepExecutionsInput {
         121  +
    /// The schema for this shape.
         122  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_SCHEMA;
         123  +
}
         124  +
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeAutomationStepExecutionsInput {
         125  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         126  +
    fn serialize_members(
         127  +
        &self,
         128  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         129  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         130  +
        if let Some(ref val) = self.automation_execution_id {
         131  +
            ser.write_string(&DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_AUTOMATION_EXECUTION_ID, val)?;
         132  +
        }
         133  +
        if let Some(ref val) = self.filters {
         134  +
            ser.write_list(
         135  +
                &DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_FILTERS,
         136  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         137  +
                    for item in val {
         138  +
                        ser.write_struct(crate::types::StepExecutionFilter::SCHEMA, item)?;
         139  +
                    }
         140  +
                    Ok(())
         141  +
                },
         142  +
            )?;
         143  +
        }
         144  +
        if let Some(ref val) = self.next_token {
         145  +
            ser.write_string(&DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_NEXT_TOKEN, val)?;
         146  +
        }
         147  +
        if let Some(ref val) = self.max_results {
         148  +
            ser.write_integer(&DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_MAX_RESULTS, *val)?;
         149  +
        }
         150  +
        if let Some(ref val) = self.reverse_order {
         151  +
            ser.write_boolean(&DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_MEMBER_REVERSE_ORDER, *val)?;
         152  +
        }
         153  +
        Ok(())
         154  +
    }
         155  +
}
         156  +
impl DescribeAutomationStepExecutionsInput {
         157  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         158  +
    pub fn deserialize(
         159  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         160  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         161  +
        #[allow(unused_variables, unused_mut)]
         162  +
        let mut builder = Self::builder();
         163  +
        #[allow(
         164  +
            unused_variables,
         165  +
            unreachable_code,
         166  +
            clippy::single_match,
         167  +
            clippy::match_single_binding,
         168  +
            clippy::diverging_sub_expression
         169  +
        )]
         170  +
        deserializer.read_struct(&DESCRIBEAUTOMATIONSTEPEXECUTIONSINPUT_SCHEMA, &mut |member, deser| {
         171  +
            match member.member_index() {
         172  +
                Some(0) => {
         173  +
                    if deser.is_null() {
         174  +
                        deser.read_null()?;
         175  +
                    } else {
         176  +
                        builder.automation_execution_id = Some(deser.read_string(member)?);
         177  +
                    }
         178  +
                }
         179  +
                Some(1) => {
         180  +
                    if deser.is_null() {
         181  +
                        deser.read_null()?;
         182  +
                    } else {
         183  +
                        builder.filters = Some({
         184  +
                            let mut container = Vec::new();
         185  +
                            deser.read_list(member, &mut |deser| {
         186  +
                                container.push(crate::types::StepExecutionFilter::deserialize(deser)?);
         187  +
                                Ok(())
         188  +
                            })?;
         189  +
                            container
         190  +
                        });
         191  +
                    }
         192  +
                }
         193  +
                Some(2) => {
         194  +
                    if deser.is_null() {
         195  +
                        deser.read_null()?;
         196  +
                    } else {
         197  +
                        builder.next_token = Some(deser.read_string(member)?);
         198  +
                    }
         199  +
                }
         200  +
                Some(3) => {
         201  +
                    if deser.is_null() {
         202  +
                        deser.read_null()?;
         203  +
                    } else {
         204  +
                        builder.max_results = Some(deser.read_integer(member)?);
         205  +
                    }
         206  +
                }
         207  +
                Some(4) => {
         208  +
                    if deser.is_null() {
         209  +
                        deser.read_null()?;
         210  +
                    } else {
         211  +
                        builder.reverse_order = Some(deser.read_boolean(member)?);
         212  +
                    }
         213  +
                }
         214  +
                _ => {}
         215  +
            }
         216  +
            Ok(())
         217  +
        })?;
         218  +
        builder.automation_execution_id = builder.automation_execution_id.or(Some(String::new()));
         219  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         220  +
    }
         221  +
}
         222  +
impl DescribeAutomationStepExecutionsInput {
         223  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         224  +
    pub fn deserialize_with_response(
         225  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         226  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         227  +
        _status: u16,
         228  +
        _body: &[u8],
         229  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         230  +
        Self::deserialize(deserializer)
         231  +
    }
         232  +
}
         233  +
impl DescribeAutomationStepExecutionsInput {
         234  +
    /// Creates a new builder-style object to manufacture [`DescribeAutomationStepExecutionsInput`](crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsInput).
         235  +
    pub fn builder() -> crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder {
         236  +
        crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder::default()
         237  +
    }
         238  +
}
         239  +
         240  +
/// A builder for [`DescribeAutomationStepExecutionsInput`](crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsInput).
         241  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         242  +
#[non_exhaustive]
         243  +
pub struct DescribeAutomationStepExecutionsInputBuilder {
         244  +
    pub(crate) automation_execution_id: ::std::option::Option<::std::string::String>,
         245  +
    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::StepExecutionFilter>>,
         246  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         247  +
    pub(crate) max_results: ::std::option::Option<i32>,
         248  +
    pub(crate) reverse_order: ::std::option::Option<bool>,
         249  +
}
         250  +
impl DescribeAutomationStepExecutionsInputBuilder {
         251  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
         252  +
    /// This field is required.
         253  +
    pub fn automation_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         254  +
        self.automation_execution_id = ::std::option::Option::Some(input.into());
         255  +
        self
         256  +
    }
         257  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
         258  +
    pub fn set_automation_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         259  +
        self.automation_execution_id = input;
         260  +
        self
         261  +
    }
         262  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
         263  +
    pub fn get_automation_execution_id(&self) -> &::std::option::Option<::std::string::String> {
         264  +
        &self.automation_execution_id
         265  +
    }
         266  +
    /// Appends an item to `filters`.
         267  +
    ///
         268  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         269  +
    ///
         270  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
         271  +
    pub fn filters(mut self, input: crate::types::StepExecutionFilter) -> Self {
         272  +
        let mut v = self.filters.unwrap_or_default();
         273  +
        v.push(input);
         274  +
        self.filters = ::std::option::Option::Some(v);
         275  +
        self
         276  +
    }
         277  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
         278  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StepExecutionFilter>>) -> Self {
         279  +
        self.filters = input;
         280  +
        self
         281  +
    }
         282  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
         283  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StepExecutionFilter>> {
         284  +
        &self.filters
         285  +
    }
         286  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         287  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         288  +
        self.next_token = ::std::option::Option::Some(input.into());
         289  +
        self
         290  +
    }
         291  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         292  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         293  +
        self.next_token = input;
         294  +
        self
         295  +
    }
         296  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         297  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         298  +
        &self.next_token
         299  +
    }
         300  +
    /// <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>
         301  +
    pub fn max_results(mut self, input: i32) -> Self {
         302  +
        self.max_results = ::std::option::Option::Some(input);
         303  +
        self
         304  +
    }
         305  +
    /// <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>
         306  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         307  +
        self.max_results = input;
         308  +
        self
         309  +
    }
         310  +
    /// <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>
         311  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         312  +
        &self.max_results
         313  +
    }
         314  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
         315  +
    pub fn reverse_order(mut self, input: bool) -> Self {
         316  +
        self.reverse_order = ::std::option::Option::Some(input);
         317  +
        self
         318  +
    }
         319  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
         320  +
    pub fn set_reverse_order(mut self, input: ::std::option::Option<bool>) -> Self {
         321  +
        self.reverse_order = input;
         322  +
        self
         323  +
    }
         324  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
         325  +
    pub fn get_reverse_order(&self) -> &::std::option::Option<bool> {
         326  +
        &self.reverse_order
         327  +
    }
         328  +
    /// Consumes the builder and constructs a [`DescribeAutomationStepExecutionsInput`](crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsInput).
         329  +
    pub fn build(
         330  +
        self,
         331  +
    ) -> ::std::result::Result<
         332  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsInput,
         333  +
        ::aws_smithy_types::error::operation::BuildError,
         334  +
    > {
         335  +
        ::std::result::Result::Ok(
         336  +
            crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsInput {
         337  +
                automation_execution_id: self.automation_execution_id,
         338  +
                filters: self.filters,
         339  +
                next_token: self.next_token,
         340  +
                max_results: self.max_results,
         341  +
                reverse_order: self.reverse_order,
         342  +
            },
         343  +
        )
         344  +
    }
         345  +
}

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

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

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

@@ -0,1 +0,192 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_automation_step_executions::_describe_automation_step_executions_input::DescribeAutomationStepExecutionsInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_automation_step_executions::_describe_automation_step_executions_output::DescribeAutomationStepExecutionsOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder {
           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_automation_step_executions::DescribeAutomationStepExecutionsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_automation_step_executions();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeAutomationStepExecutions`.
          24  +
///
          25  +
/// <p>Information about all active and terminated step executions in an Automation workflow.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DescribeAutomationStepExecutionsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsOutput,
          35  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
          36  +
    > for DescribeAutomationStepExecutionsFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsOutput,
          44  +
            crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DescribeAutomationStepExecutionsFluentBuilder {
          51  +
    /// Creates a new `DescribeAutomationStepExecutionsFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the DescribeAutomationStepExecutions as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutions::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutions::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsOutput,
          97  +
        crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// Create a paginator for this request
         112  +
    ///
         113  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_automation_step_executions::paginator::DescribeAutomationStepExecutionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::describe_automation_step_executions::paginator::DescribeAutomationStepExecutionsPaginator {
         115  +
        crate::operation::describe_automation_step_executions::paginator::DescribeAutomationStepExecutionsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
         118  +
    pub fn automation_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.automation_execution_id(input.into());
         120  +
        self
         121  +
    }
         122  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
         123  +
    pub fn set_automation_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         124  +
        self.inner = self.inner.set_automation_execution_id(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>The Automation execution ID for which you want step execution descriptions.</p>
         128  +
    pub fn get_automation_execution_id(&self) -> &::std::option::Option<::std::string::String> {
         129  +
        self.inner.get_automation_execution_id()
         130  +
    }
         131  +
    ///
         132  +
    /// Appends an item to `Filters`.
         133  +
    ///
         134  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         135  +
    ///
         136  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
         137  +
    pub fn filters(mut self, input: crate::types::StepExecutionFilter) -> Self {
         138  +
        self.inner = self.inner.filters(input);
         139  +
        self
         140  +
    }
         141  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
         142  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StepExecutionFilter>>) -> Self {
         143  +
        self.inner = self.inner.set_filters(input);
         144  +
        self
         145  +
    }
         146  +
    /// <p>One or more filters to limit the number of step executions returned by the request.</p>
         147  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StepExecutionFilter>> {
         148  +
        self.inner.get_filters()
         149  +
    }
         150  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         151  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         152  +
        self.inner = self.inner.next_token(input.into());
         153  +
        self
         154  +
    }
         155  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         156  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         157  +
        self.inner = self.inner.set_next_token(input);
         158  +
        self
         159  +
    }
         160  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         161  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         162  +
        self.inner.get_next_token()
         163  +
    }
         164  +
    /// <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>
         165  +
    pub fn max_results(mut self, input: i32) -> Self {
         166  +
        self.inner = self.inner.max_results(input);
         167  +
        self
         168  +
    }
         169  +
    /// <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>
         170  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         171  +
        self.inner = self.inner.set_max_results(input);
         172  +
        self
         173  +
    }
         174  +
    /// <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>
         175  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         176  +
        self.inner.get_max_results()
         177  +
    }
         178  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
         179  +
    pub fn reverse_order(mut self, input: bool) -> Self {
         180  +
        self.inner = self.inner.reverse_order(input);
         181  +
        self
         182  +
    }
         183  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
         184  +
    pub fn set_reverse_order(mut self, input: ::std::option::Option<bool>) -> Self {
         185  +
        self.inner = self.inner.set_reverse_order(input);
         186  +
        self
         187  +
    }
         188  +
    /// <p>Indicates whether to list step executions in reverse order by start time. The default value is 'false'.</p>
         189  +
    pub fn get_reverse_order(&self) -> &::std::option::Option<bool> {
         190  +
        self.inner.get_reverse_order()
         191  +
    }
         192  +
}

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

@@ -0,1 +0,152 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribeAutomationStepExecutions`](crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutions)
           3  +
pub struct DescribeAutomationStepExecutionsPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribeAutomationStepExecutionsPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::describe_automation_step_executions::builders::DescribeAutomationStepExecutionsInputBuilder,
          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 `step_executions`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_automation_step_executions::paginator::DescribeAutomationStepExecutionsPaginatorItems {
          35  +
        crate::operation::describe_automation_step_executions::paginator::DescribeAutomationStepExecutionsPaginatorItems(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_automation_step_executions::DescribeAutomationStepExecutionsOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
          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_automation_step_executions::DescribeAutomationStepExecutions::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_automation_step_executions::DescribeAutomationStepExecutions::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_automation_step_executions_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 `DescribeAutomationStepExecutionsPaginator`
         124  +
///
         125  +
/// This is created with [`.items()`](DescribeAutomationStepExecutionsPaginator::items)
         126  +
pub struct DescribeAutomationStepExecutionsPaginatorItems(DescribeAutomationStepExecutionsPaginator);
         127  +
         128  +
impl DescribeAutomationStepExecutionsPaginatorItems {
         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::StepExecution,
         140  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         141  +
                crate::operation::describe_automation_step_executions::DescribeAutomationStepExecutionsError,
         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_automation_step_executions_output_output_step_executions(page)
         148  +
                .unwrap_or_default()
         149  +
                .into_iter()
         150  +
        })
         151  +
    }
         152  +
}

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

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