Client Test

Client Test

rev. 645b1734ce74ebbc529fecda676baac60fe4d581

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_item.rs

@@ -194,194 +255,257 @@
  214    214   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  215    215   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  216    216   
        let _input = context
  217    217   
            .input()
  218    218   
            .downcast_ref::<UpdateItemInput>()
  219    219   
            .ok_or("failed to downcast to UpdateItemInput")?;
  220    220   
  221    221   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  222    222   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  223    223   
        })?;
         224  +
  224    225   
        cfg.interceptor_state()
  225    226   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         227  +
  226    228   
        ::std::result::Result::Ok(())
  227    229   
    }
  228    230   
}
  229    231   
  230    232   
// The get_* functions below are generated from JMESPath expressions in the
  231    233   
// operationContextParams trait. They target the operation's input shape.
  232    234   
  233    235   
/// Error type for the `UpdateItemError` operation.
  234    236   
#[non_exhaustive]
  235    237   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_table.rs

@@ -196,196 +257,259 @@
  216    216   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    217   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    218   
        let _input = context
  219    219   
            .input()
  220    220   
            .downcast_ref::<UpdateTableInput>()
  221    221   
            .ok_or("failed to downcast to UpdateTableInput")?;
  222    222   
  223    223   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    224   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    225   
        })?;
         226  +
  226    227   
        cfg.interceptor_state()
  227    228   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         229  +
  228    230   
        ::std::result::Result::Ok(())
  229    231   
    }
  230    232   
}
  231    233   
  232    234   
// The get_* functions below are generated from JMESPath expressions in the
  233    235   
// operationContextParams trait. They target the operation's input shape.
  234    236   
  235    237   
/// Error type for the `UpdateTableError` operation.
  236    238   
#[non_exhaustive]
  237    239   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_table_replica_auto_scaling.rs

@@ -207,207 +268,270 @@
  227    227   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  228    228   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  229    229   
        let _input = context
  230    230   
            .input()
  231    231   
            .downcast_ref::<UpdateTableReplicaAutoScalingInput>()
  232    232   
            .ok_or("failed to downcast to UpdateTableReplicaAutoScalingInput")?;
  233    233   
  234    234   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  235    235   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  236    236   
        })?;
         237  +
  237    238   
        cfg.interceptor_state()
  238    239   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         240  +
  239    241   
        ::std::result::Result::Ok(())
  240    242   
    }
  241    243   
}
  242    244   
  243    245   
// The get_* functions below are generated from JMESPath expressions in the
  244    246   
// operationContextParams trait. They target the operation's input shape.
  245    247   
  246    248   
/// Error type for the `UpdateTableReplicaAutoScalingError` operation.
  247    249   
#[non_exhaustive]
  248    250   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/update_time_to_live.rs

@@ -199,199 +260,262 @@
  219    219   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  220    220   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  221    221   
        let _input = context
  222    222   
            .input()
  223    223   
            .downcast_ref::<UpdateTimeToLiveInput>()
  224    224   
            .ok_or("failed to downcast to UpdateTimeToLiveInput")?;
  225    225   
  226    226   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  227    227   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  228    228   
        })?;
         229  +
  229    230   
        cfg.interceptor_state()
  230    231   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         232  +
  231    233   
        ::std::result::Result::Ok(())
  232    234   
    }
  233    235   
}
  234    236   
  235    237   
// The get_* functions below are generated from JMESPath expressions in the
  236    238   
// operationContextParams trait. They target the operation's input shape.
  237    239   
  238    240   
/// Error type for the `UpdateTimeToLiveError` operation.
  239    241   
#[non_exhaustive]
  240    242   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/complete_snapshot.rs

@@ -199,199 +260,262 @@
  219    219   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  220    220   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  221    221   
        let _input = context
  222    222   
            .input()
  223    223   
            .downcast_ref::<CompleteSnapshotInput>()
  224    224   
            .ok_or("failed to downcast to CompleteSnapshotInput")?;
  225    225   
  226    226   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  227    227   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  228    228   
        })?;
         229  +
  229    230   
        cfg.interceptor_state()
  230    231   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         232  +
  231    233   
        ::std::result::Result::Ok(())
  232    234   
    }
  233    235   
}
  234    236   
  235    237   
// The get_* functions below are generated from JMESPath expressions in the
  236    238   
// operationContextParams trait. They target the operation's input shape.
  237    239   
  238    240   
/// Error type for the `CompleteSnapshotError` operation.
  239    241   
#[non_exhaustive]
  240    242   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/get_snapshot_block.rs

@@ -247,247 +308,310 @@
  267    267   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  268    268   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  269    269   
        let _input = context
  270    270   
            .input()
  271    271   
            .downcast_ref::<GetSnapshotBlockInput>()
  272    272   
            .ok_or("failed to downcast to GetSnapshotBlockInput")?;
  273    273   
  274    274   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  275    275   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  276    276   
        })?;
         277  +
  277    278   
        cfg.interceptor_state()
  278    279   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         280  +
  279    281   
        ::std::result::Result::Ok(())
  280    282   
    }
  281    283   
}
  282    284   
  283    285   
// The get_* functions below are generated from JMESPath expressions in the
  284    286   
// operationContextParams trait. They target the operation's input shape.
  285    287   
  286    288   
/// Error type for the `GetSnapshotBlockError` operation.
  287    289   
#[non_exhaustive]
  288    290   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/list_changed_blocks.rs

@@ -232,232 +293,295 @@
  252    252   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  253    253   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  254    254   
        let _input = context
  255    255   
            .input()
  256    256   
            .downcast_ref::<ListChangedBlocksInput>()
  257    257   
            .ok_or("failed to downcast to ListChangedBlocksInput")?;
  258    258   
  259    259   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  260    260   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  261    261   
        })?;
         262  +
  262    263   
        cfg.interceptor_state()
  263    264   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         265  +
  264    266   
        ::std::result::Result::Ok(())
  265    267   
    }
  266    268   
}
  267    269   
  268    270   
// The get_* functions below are generated from JMESPath expressions in the
  269    271   
// operationContextParams trait. They target the operation's input shape.
  270    272   
  271    273   
/// Error type for the `ListChangedBlocksError` operation.
  272    274   
#[non_exhaustive]
  273    275   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/list_snapshot_blocks.rs

@@ -222,222 +283,285 @@
  242    242   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  243    243   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  244    244   
        let _input = context
  245    245   
            .input()
  246    246   
            .downcast_ref::<ListSnapshotBlocksInput>()
  247    247   
            .ok_or("failed to downcast to ListSnapshotBlocksInput")?;
  248    248   
  249    249   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  250    250   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  251    251   
        })?;
         252  +
  252    253   
        cfg.interceptor_state()
  253    254   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         255  +
  254    256   
        ::std::result::Result::Ok(())
  255    257   
    }
  256    258   
}
  257    259   
  258    260   
// The get_* functions below are generated from JMESPath expressions in the
  259    261   
// operationContextParams trait. They target the operation's input shape.
  260    262   
  261    263   
/// Error type for the `ListSnapshotBlocksError` operation.
  262    264   
#[non_exhaustive]
  263    265   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/put_snapshot_block.rs

@@ -221,221 +282,284 @@
  241    241   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  242    242   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  243    243   
        let _input = context
  244    244   
            .input()
  245    245   
            .downcast_ref::<PutSnapshotBlockInput>()
  246    246   
            .ok_or("failed to downcast to PutSnapshotBlockInput")?;
  247    247   
  248    248   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  249    249   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  250    250   
        })?;
         251  +
  251    252   
        cfg.interceptor_state()
  252    253   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         254  +
  253    255   
        ::std::result::Result::Ok(())
  254    256   
    }
  255    257   
}
  256    258   
  257    259   
// The get_* functions below are generated from JMESPath expressions in the
  258    260   
// operationContextParams trait. They target the operation's input shape.
  259    261   
  260    262   
/// Error type for the `PutSnapshotBlockError` operation.
  261    263   
#[non_exhaustive]
  262    264   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/operation/start_snapshot.rs

@@ -199,199 +260,262 @@
  219    219   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  220    220   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  221    221   
        let _input = context
  222    222   
            .input()
  223    223   
            .downcast_ref::<StartSnapshotInput>()
  224    224   
            .ok_or("failed to downcast to StartSnapshotInput")?;
  225    225   
  226    226   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  227    227   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  228    228   
        })?;
         229  +
  229    230   
        cfg.interceptor_state()
  230    231   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         232  +
  231    233   
        ::std::result::Result::Ok(())
  232    234   
    }
  233    235   
}
  234    236   
  235    237   
// The get_* functions below are generated from JMESPath expressions in the
  236    238   
// operationContextParams trait. They target the operation's input shape.
  237    239   
  238    240   
/// Error type for the `StartSnapshotError` operation.
  239    241   
#[non_exhaustive]
  240    242   
#[derive(::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/datetime_offsets.rs

@@ -193,193 +254,256 @@
  213    213   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  214    214   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  215    215   
        let _input = context
  216    216   
            .input()
  217    217   
            .downcast_ref::<DatetimeOffsetsInput>()
  218    218   
            .ok_or("failed to downcast to DatetimeOffsetsInput")?;
  219    219   
  220    220   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  221    221   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  222    222   
        })?;
         223  +
  223    224   
        cfg.interceptor_state()
  224    225   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         226  +
  225    227   
        ::std::result::Result::Ok(())
  226    228   
    }
  227    229   
}
  228    230   
  229    231   
// The get_* functions below are generated from JMESPath expressions in the
  230    232   
// operationContextParams trait. They target the operation's input shape.
  231    233   
  232    234   
#[allow(unreachable_code, unused_variables)]
  233    235   
#[cfg(test)]
  234    236   
mod datetime_offsets_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/empty_input_and_empty_output.rs

@@ -199,199 +260,262 @@
  219    219   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  220    220   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  221    221   
        let _input = context
  222    222   
            .input()
  223    223   
            .downcast_ref::<EmptyInputAndEmptyOutputInput>()
  224    224   
            .ok_or("failed to downcast to EmptyInputAndEmptyOutputInput")?;
  225    225   
  226    226   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  227    227   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  228    228   
        })?;
         229  +
  229    230   
        cfg.interceptor_state()
  230    231   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         232  +
  231    233   
        ::std::result::Result::Ok(())
  232    234   
    }
  233    235   
}
  234    236   
  235    237   
// The get_* functions below are generated from JMESPath expressions in the
  236    238   
// operationContextParams trait. They target the operation's input shape.
  237    239   
  238    240   
#[allow(unreachable_code, unused_variables)]
  239    241   
#[cfg(test)]
  240    242   
mod empty_input_and_empty_output_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_operation.rs

@@ -198,198 +259,261 @@
  218    218   
            .ok_or("failed to downcast to EndpointOperationInput")?;
  219    219   
  220    220   
        let endpoint_prefix = ::aws_smithy_runtime_api::client::endpoint::EndpointPrefix::new("foo.").map_err(|err| {
  221    221   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint prefix could not be built", err)
  222    222   
        })?;
  223    223   
        cfg.interceptor_state().store_put(endpoint_prefix);
  224    224   
  225    225   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    226   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    227   
        })?;
         228  +
  228    229   
        cfg.interceptor_state()
  229    230   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         231  +
  230    232   
        ::std::result::Result::Ok(())
  231    233   
    }
  232    234   
}
  233    235   
  234    236   
// The get_* functions below are generated from JMESPath expressions in the
  235    237   
// operationContextParams trait. They target the operation's input shape.
  236    238   
  237    239   
#[allow(unreachable_code, unused_variables)]
  238    240   
#[cfg(test)]
  239    241   
mod endpoint_operation_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/endpoint_with_host_label_operation.rs

@@ -219,219 +280,282 @@
  239    239   
                );
  240    240   
            }
  241    241   
            ::aws_smithy_runtime_api::client::endpoint::EndpointPrefix::new(format!("foo.{label}.", label = label))
  242    242   
        }
  243    243   
        .map_err(|err| ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint prefix could not be built", err))?;
  244    244   
        cfg.interceptor_state().store_put(endpoint_prefix);
  245    245   
  246    246   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  247    247   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  248    248   
        })?;
         249  +
  249    250   
        cfg.interceptor_state()
  250    251   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         252  +
  251    253   
        ::std::result::Result::Ok(())
  252    254   
    }
  253    255   
}
  254    256   
  255    257   
// The get_* functions below are generated from JMESPath expressions in the
  256    258   
// operationContextParams trait. They target the operation's input shape.
  257    259   
  258    260   
#[allow(unreachable_code, unused_variables)]
  259    261   
#[cfg(test)]
  260    262   
mod endpoint_with_host_label_operation_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/fractional_seconds.rs

@@ -193,193 +254,256 @@
  213    213   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  214    214   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  215    215   
        let _input = context
  216    216   
            .input()
  217    217   
            .downcast_ref::<FractionalSecondsInput>()
  218    218   
            .ok_or("failed to downcast to FractionalSecondsInput")?;
  219    219   
  220    220   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  221    221   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  222    222   
        })?;
         223  +
  223    224   
        cfg.interceptor_state()
  224    225   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         226  +
  225    227   
        ::std::result::Result::Ok(())
  226    228   
    }
  227    229   
}
  228    230   
  229    231   
// The get_* functions below are generated from JMESPath expressions in the
  230    232   
// operationContextParams trait. They target the operation's input shape.
  231    233   
  232    234   
#[allow(unreachable_code, unused_variables)]
  233    235   
#[cfg(test)]
  234    236   
mod fractional_seconds_test {

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/operation/greeting_with_errors.rs

@@ -193,193 +254,256 @@
  213    213   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  214    214   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  215    215   
        let _input = context
  216    216   
            .input()
  217    217   
            .downcast_ref::<GreetingWithErrorsInput>()
  218    218   
            .ok_or("failed to downcast to GreetingWithErrorsInput")?;
  219    219   
  220    220   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  221    221   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  222    222   
        })?;
         223  +
  223    224   
        cfg.interceptor_state()
  224    225   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         226  +
  225    227   
        ::std::result::Result::Ok(())
  226    228   
    }
  227    229   
}
  228    230   
  229    231   
// The get_* functions below are generated from JMESPath expressions in the
  230    232   
// operationContextParams trait. They target the operation's input shape.
  231    233   
  232    234   
#[allow(unreachable_code, unused_variables)]
  233    235   
#[cfg(test)]
  234    236   
mod greeting_with_errors_test {