diff --git a/TestModels/SimpleTypes/SimpleDouble/codegen-patches/rust/dafny-4.5.0.patch b/TestModels/SimpleTypes/SimpleDouble/codegen-patches/rust/dafny-4.5.0.patch index 075aa6830..76f5b2ec0 100644 --- a/TestModels/SimpleTypes/SimpleDouble/codegen-patches/rust/dafny-4.5.0.patch +++ b/TestModels/SimpleTypes/SimpleDouble/codegen-patches/rust/dafny-4.5.0.patch @@ -1,9 +1,9 @@ diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client.rs new file mode 100644 -index 00000000..f120ed2d +index 00000000..3ee4091e --- /dev/null +++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client.rs -@@ -0,0 +1,56 @@ +@@ -0,0 +1,54 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +use aws_smithy_types::error::operation::BuildError; @@ -58,8 +58,6 @@ index 00000000..f120ed2d +} + +mod get_double; -+ -+mod get_double_known_value; diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client/get_double.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client/get_double.rs new file mode 100644 index 00000000..ca18e57f @@ -79,29 +77,6 @@ index 00000000..ca18e57f + crate::operation::get_double::builders::GetDoubleFluentBuilder::new(self.handle.clone()) + } +} -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client/get_double_known_value.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client/get_double_known_value.rs -new file mode 100644 -index 00000000..8eb5e7ca ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/client/get_double_known_value.rs -@@ -0,0 +1,17 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+impl super::Client { -+ /// Constructs a fluent builder for the [`GetDouble`](crate::operation::get_double_known_value::builders::GetDoubleFluentBuilder) operation. -+ /// -+ /// - The fluent builder is configurable: -+ /// - [`value(f64)`](crate::operation::get_double_known_value::builders::GetDoubleFluentBuilder::value) / [`set_value(Option)`](crate::operation::get_double_known_value::builders::GetDoubleFluentBuilder::set_value):(undocumented)
-+ /// - On success, responds with [`GetDoubleOutput`](crate::operation::get_double_known_value::GetDoubleOutput) with field(s): -+ /// - [`value(Option)`](crate::operation::get_double_known_value::GetDoubleOutput::value): (undocumented) -+ /// - On failure, responds with [`SdkError`](crate::operation::get_double_known_value::GetDoubleError) -+ pub fn get_double_known_value( -+ &self, -+ ) -> crate::operation::get_double_known_value::builders::GetDoubleKnownValueFluentBuilder { -+ crate::operation::get_double_known_value::builders::GetDoubleKnownValueFluentBuilder::new( -+ self.handle.clone(), -+ ) -+ } -+} diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/config.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/config.rs new file mode 100644 index 00000000..208b67e3 @@ -238,14 +213,12 @@ index 00000000..208b67e3 +pub use ::aws_smithy_runtime_api::client::behavior_version::BehaviorVersion; diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions.rs new file mode 100644 -index 00000000..d749a635 +index 00000000..83e74634 --- /dev/null +++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions.rs -@@ -0,0 +1,4 @@ +@@ -0,0 +1,2 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. +pub mod get_double; -+ -+pub mod get_double_known_value; diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double.rs new file mode 100644 index 00000000..e5cf89a0 @@ -380,140 +353,6 @@ index 00000000..99ff9b3e + }; + crate::operation::get_double::GetDoubleOutput { value } +} -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value.rs -new file mode 100644 -index 00000000..17ffb274 ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value.rs -@@ -0,0 +1,32 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+ -+use std::any::Any; -+ -+#[allow(dead_code)] -+pub fn to_dafny_error( -+ value: crate::operation::get_double_known_value::GetDoubleKnownValueError, -+) -> ::std::rc::Rc<::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::Error> { -+ match value { -+ crate::operation::get_double_known_value::GetDoubleKnownValueError::Unhandled(unhandled) => -+ ::std::rc::Rc::new(::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::Error::Opaque { obj: ::dafny_runtime::UpcastTo::<::dafny_runtime::Object>::upcast_to(::dafny_runtime::object::new(unhandled)) }) -+ } -+} -+ -+#[allow(dead_code)] -+pub fn from_dafny_error( -+ dafny_value: ::std::rc::Rc< -+ ::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::Error, -+ >, -+) -> crate::operation::get_double_known_value::GetDoubleKnownValueError { -+ // TODO: Losing information here, but we have to figure out how to wrap an arbitrary Dafny value as std::error::Error -+ if matches!(&dafny_value.as_ref(), ::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::Error::CollectionOfErrors { .. }) { -+ let error_message = "TODO: can't get message yet"; -+ crate::operation::get_double_known_value::GetDoubleKnownValueError::generic(::aws_smithy_types::error::metadata::ErrorMetadata::builder().message(error_message).build()) -+ } else { -+ crate::operation::get_double_known_value::GetDoubleKnownValueError::generic(::aws_smithy_types::error::metadata::ErrorMetadata::builder().message("Opaque error").build()) -+ } -+} -+ -+pub mod _get_double_known_value_input; -+ -+pub mod _get_double_known_value_output; -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value/_get_double_known_value_input.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value/_get_double_known_value_input.rs -new file mode 100644 -index 00000000..b5275830 ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value/_get_double_known_value_input.rs -@@ -0,0 +1,42 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+#[allow(dead_code)] -+pub fn to_dafny( -+ value: crate::operation::get_double_known_value::GetDoubleKnownValueInput, -+) -> ::std::rc::Rc< -+ ::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::GetDoubleInput, -+> { -+ let dafny_value = match value.value { -+ Some(v) => ::simple_double_dafny::_Wrappers_Compile::Option::Some { -+ value : ::dafny_runtime::Sequence::ArraySequence { -+ values: std::rc::Rc::new(f64::to_be_bytes(v).to_vec()) -+ } -+ }, -+ None => ::simple_double_dafny::_Wrappers_Compile::Option::None {}, -+ }; -+ ::std::rc::Rc::new(::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::GetDoubleInput::GetDoubleInput { -+ value: ::std::rc::Rc::new(dafny_value) -+ }) -+} -+ -+#[allow(dead_code)] -+pub fn from_dafny( -+ dafny_value: ::std::rc::Rc< -+ ::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::GetDoubleInput, -+ >, -+) -> crate::operation::get_double_known_value::GetDoubleKnownValueInput { -+ let value = if matches!( -+ dafny_value.value().as_ref(), -+ ::simple_double_dafny::_Wrappers_Compile::Option::Some { .. } -+ ) { -+ let my_vec = dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&dafny_value.value().Extract(), |x| *x); -+ Some(f64::from_be_bytes(my_vec.try_into().expect("Error converting Sequence to f64"))) -+ } else if matches!( -+ dafny_value.value().as_ref(), -+ ::simple_double_dafny::_Wrappers_Compile::Option::None { .. } -+ ) { -+ None -+ } else { -+ panic!("Unreachable") -+ }; -+ crate::operation::get_double_known_value::GetDoubleKnownValueInput { value } -+} -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value/_get_double_known_value_output.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value/_get_double_known_value_output.rs -new file mode 100644 -index 00000000..ad32df0c ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/conversions/get_double_known_value/_get_double_known_value_output.rs -@@ -0,0 +1,42 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+#[allow(dead_code)] -+pub fn to_dafny( -+ value: crate::operation::get_double_known_value::GetDoubleKnownValueOutput, -+) -> ::std::rc::Rc< -+ ::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::GetDoubleOutput, -+> { -+ let dafny_value = match value.value { -+ Some(v) => ::simple_double_dafny::_Wrappers_Compile::Option::Some { -+ value : ::dafny_runtime::Sequence::ArraySequence { -+ values: std::rc::Rc::new(f64::to_be_bytes(v).to_vec()) -+ } -+ }, -+ None => ::simple_double_dafny::_Wrappers_Compile::Option::None {}, -+ }; -+ ::std::rc::Rc::new(::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::GetDoubleOutput::GetDoubleOutput { -+ value: ::std::rc::Rc::new(dafny_value) -+ }) -+} -+ -+#[allow(dead_code)] -+pub fn from_dafny( -+ dafny_value: ::std::rc::Rc< -+ ::simple_double_dafny::r#_simple_dtypes_dsmithydouble_dinternaldafny_dtypes::GetDoubleOutput, -+ >, -+) -> crate::operation::get_double_known_value::GetDoubleKnownValueOutput { -+ let value = if matches!( -+ dafny_value.value().as_ref(), -+ ::simple_double_dafny::_Wrappers_Compile::Option::Some { .. } -+ ) { -+ let my_vec = dafny_runtime::dafny_runtime_conversions::dafny_sequence_to_vec(&dafny_value.value().Extract(), |x| *x); -+ Some(f64::from_be_bytes(my_vec.try_into().expect("Error converting Sequence to f64"))) -+ } else if matches!( -+ dafny_value.value().as_ref(), -+ ::simple_double_dafny::_Wrappers_Compile::Option::None { .. } -+ ) { -+ None -+ } else { -+ panic!("Unreachable") -+ }; -+ crate::operation::get_double_known_value::GetDoubleKnownValueOutput { value } -+} diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/error.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/error.rs new file mode 100644 index 00000000..ec89cbec @@ -591,17 +430,14 @@ index 00000000..c3caa83e +pub use client::Client; diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation.rs new file mode 100644 -index 00000000..1cfe37bd +index 00000000..134175f8 --- /dev/null +++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation.rs -@@ -0,0 +1,7 @@ +@@ -0,0 +1,4 @@ +// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. + +/// Types for the `GetDouble` operation. +pub mod get_double; -+ -+/// Types for the `GetDoubleKnownValue` operation. -+pub mod get_double_known_value; diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double.rs new file mode 100644 index 00000000..44c24b2e @@ -990,396 +826,3 @@ index 00000000..2b47070d + self.inner.get_value() + } +} -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value.rs -new file mode 100644 -index 00000000..e35d68f2 ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value.rs -@@ -0,0 +1,146 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+/// Orchestration and serialization glue logic for `GetDoubleKnownValue`. -+#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)] -+#[non_exhaustive] -+pub struct GetDoubleKnownValue; -+impl GetDoubleKnownValue { -+ /// Creates a new `GetDoubleKnownValue` -+ pub fn new() -> Self { -+ Self -+ } -+ pub(crate) async fn send( -+ handle: &crate::client::Handle, -+ input: crate::operation::get_double_known_value::GetDoubleKnownValueInput, -+ ) -> ::std::result::Result< -+ crate::operation::get_double_known_value::GetDoubleKnownValueOutput, -+ crate::operation::get_double_known_value::GetDoubleKnownValueError, -+ > { -+ let inner_input = -+ crate::conversions::get_double_known_value::_get_double_known_value_input::to_dafny(input); -+ let inner_result = -+ ::dafny_runtime::md!(handle.inner.clone()).GetDouble(&inner_input); -+ if matches!( -+ inner_result.as_ref(), -+ ::simple_double_dafny::r#_Wrappers_Compile::Result::Success { .. } -+ ) { -+ Ok( -+ crate::conversions::get_double_known_value::_get_double_known_value_output::from_dafny( -+ inner_result.value().clone(), -+ ), -+ ) -+ } else { -+ Err(crate::conversions::get_double_known_value::from_dafny_error( -+ inner_result.error().clone(), -+ )) -+ } -+ } -+} -+ -+/// Error type for the `GetDoubleKnownValue` operation. -+#[non_exhaustive] -+#[derive(::std::fmt::Debug)] -+pub enum GetDoubleKnownValueError { -+ /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code). -+ #[deprecated( -+ note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \ -+ variable wildcard pattern and check `.code()`: -+ \ -+    `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }` -+ \ -+ See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetDoubleKnownValueError) for what information is available for the error." -+ )] -+ Unhandled(crate::error::sealed_unhandled::Unhandled), -+} -+impl GetDoubleKnownValueError { -+ /// Creates the `GetDoubleKnownValueError::Unhandled` variant from any error type. -+ pub fn unhandled( -+ err: impl ::std::convert::Into< -+ ::std::boxed::Box< -+ dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static, -+ >, -+ >, -+ ) -> Self { -+ Self::Unhandled(crate::error::sealed_unhandled::Unhandled { -+ source: err.into(), -+ meta: ::std::default::Default::default(), -+ }) -+ } -+ -+ /// Creates the `GetDoubleKnownValueError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata). -+ pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self { -+ Self::Unhandled(crate::error::sealed_unhandled::Unhandled { -+ source: err.clone().into(), -+ meta: err, -+ }) -+ } -+ /// -+ /// Returns error metadata, which includes the error code, message, -+ /// request ID, and potentially additional information. -+ /// -+ pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { -+ match self { -+ Self::Unhandled(e) => &e.meta, -+ } -+ } -+} -+impl ::std::error::Error for GetDoubleKnownValueError { -+ fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> { -+ match self { -+ Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source), -+ } -+ } -+} -+impl ::std::fmt::Display for GetDoubleKnownValueError { -+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { -+ match self { -+ Self::Unhandled(_inner) => { -+ if let ::std::option::Option::Some(code) = -+ ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) -+ { -+ write!(f, "unhandled error ({code})") -+ } else { -+ f.write_str("unhandled error") -+ } -+ } -+ } -+ } -+} -+impl ::aws_smithy_types::retry::ProvideErrorKind for GetDoubleKnownValueError { -+ fn code(&self) -> ::std::option::Option<&str> { -+ ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) -+ } -+ fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> { -+ ::std::option::Option::None -+ } -+} -+impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetDoubleKnownValueError { -+ fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata { -+ match self { -+ Self::Unhandled(_inner) => &_inner.meta, -+ } -+ } -+} -+impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetDoubleKnownValueError { -+ fn create_unhandled_error( -+ source: ::std::boxed::Box< -+ dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static, -+ >, -+ meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>, -+ ) -> Self { -+ Self::Unhandled(crate::error::sealed_unhandled::Unhandled { -+ source, -+ meta: meta.unwrap_or_default(), -+ }) -+ } -+} -+ -+pub use crate::operation::get_double_known_value::_get_double_known_value_output::GetDoubleKnownValueOutput; -+ -+pub use crate::operation::get_double_known_value::_get_double_known_value_input::GetDoubleKnownValueInput; -+ -+mod _get_double_known_value_input; -+ -+mod _get_double_known_value_output; -+ -+/// Builders -+pub mod builders; -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/_get_double_known_value_input.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/_get_double_known_value_input.rs -new file mode 100644 -index 00000000..e297bc90 ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/_get_double_known_value_input.rs -@@ -0,0 +1,63 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+#[allow(missing_docs)] // documentation missing in model -+#[non_exhaustive] -+#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -+pub struct GetDoubleKnownValueInput { -+ #[allow(missing_docs)] // documentation missing in model -+ pub value: ::std::option::Option, -+} -+impl GetDoubleKnownValueInput { -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn value(&self) -> ::std::option::Option { -+ self.value -+ } -+} -+impl GetDoubleKnownValueInput { -+ /// Creates a new builder-style object to manufacture [`GetDoubleKnownValueInput`](crate::operation::operation::GetDoubleKnownValueInput). -+ pub fn builder( -+ ) -> crate::operation::get_double_known_value::builders::GetDoubleKnownValueInputBuilder { -+ crate::operation::get_double_known_value::builders::GetDoubleKnownValueInputBuilder::default() -+ } -+} -+ -+/// A builder for [`GetDoubleKnownValueInput`](crate::operation::operation::GetDoubleKnownValueInput). -+#[non_exhaustive] -+#[derive( -+ ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, -+)] -+pub struct GetDoubleKnownValueInputBuilder { -+ pub(crate) value: ::std::option::Option, -+} -+impl GetDoubleKnownValueInputBuilder { -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn value( -+ mut self, -+ input: impl ::std::convert::Into, -+ ) -> Self { -+ self.value = ::std::option::Option::Some(input.into()); -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn set_value( -+ mut self, -+ input: ::std::option::Option, -+ ) -> Self { -+ self.value = input; -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn get_value(&self) -> &::std::option::Option { -+ &self.value -+ } -+ /// Consumes the builder and constructs a [`GetDoubleKnownValueInput`](crate::operation::operation::GetDoubleKnownValueInput). -+ pub fn build( -+ self, -+ ) -> ::std::result::Result< -+ crate::operation::get_double_known_value::GetDoubleKnownValueInput, -+ ::aws_smithy_types::error::operation::BuildError, -+ > { -+ ::std::result::Result::Ok( -+ crate::operation::get_double_known_value::GetDoubleKnownValueInput { value: self.value }, -+ ) -+ } -+} -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/_get_double_known_value_output.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/_get_double_known_value_output.rs -new file mode 100644 -index 00000000..93788a4a ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/_get_double_known_value_output.rs -@@ -0,0 +1,63 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+#[allow(missing_docs)] // documentation missing in model -+#[non_exhaustive] -+#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] -+pub struct GetDoubleKnownValueOutput { -+ #[allow(missing_docs)] // documentation missing in model -+ pub value: ::std::option::Option, -+} -+impl GetDoubleKnownValueOutput { -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn value(&self) -> ::std::option::Option { -+ self.value -+ } -+} -+impl GetDoubleKnownValueOutput { -+ /// Creates a new builder-style object to manufacture [`GetDoubleKnownValueOutput`](crate::operation::operation::GetDoubleKnownValueOutput). -+ pub fn builder( -+ ) -> crate::operation::get_double_known_value::builders::GetDoubleKnownValueOutputBuilder { -+ crate::operation::get_double_known_value::builders::GetDoubleKnownValueOutputBuilder::default() -+ } -+} -+ -+/// A builder for [`GetDoubleKnownValueOutput`](crate::operation::operation::GetDoubleKnownValueOutput). -+#[non_exhaustive] -+#[derive( -+ ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug, -+)] -+pub struct GetDoubleKnownValueOutputBuilder { -+ pub(crate) value: ::std::option::Option, -+} -+impl GetDoubleKnownValueOutputBuilder { -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn value( -+ mut self, -+ input: impl ::std::convert::Into, -+ ) -> Self { -+ self.value = ::std::option::Option::Some(input.into()); -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn set_value( -+ mut self, -+ input: ::std::option::Option, -+ ) -> Self { -+ self.value = input; -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn get_value(&self) -> &::std::option::Option { -+ &self.value -+ } -+ /// Consumes the builder and constructs a [`GetDoubleKnownValueOutput`](crate::operation::operation::GetDoubleKnownValueOutput). -+ pub fn build( -+ self, -+ ) -> ::std::result::Result< -+ crate::operation::get_double_known_value::GetDoubleKnownValueOutput, -+ ::aws_smithy_types::error::operation::BuildError, -+ > { -+ ::std::result::Result::Ok( -+ crate::operation::get_double_known_value::GetDoubleKnownValueOutput { value: self.value }, -+ ) -+ } -+} -diff --git b/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/builders.rs a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/builders.rs -new file mode 100644 -index 00000000..0d809d3b ---- /dev/null -+++ a/TestModels/SimpleTypes/SimpleDouble/runtimes/rust/src/operation/get_double_known_value/builders.rs -@@ -0,0 +1,97 @@ -+// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. -+pub use crate::operation::get_double_known_value::_get_double_known_value_output::GetDoubleKnownValueOutputBuilder; -+ -+pub use crate::operation::get_double_known_value::_get_double_known_value_input::GetDoubleKnownValueInputBuilder; -+ -+impl GetDoubleKnownValueInputBuilder { -+ /// Sends a request with this input using the given client. -+ pub async fn send_with( -+ self, -+ client: &crate::Client, -+ ) -> ::std::result::Result< -+ crate::operation::get_double_known_value::GetDoubleKnownValueOutput, -+ crate::operation::get_double_known_value::GetDoubleKnownValueError, -+ > { -+ let mut fluent_builder = client.get_double_known_value(); -+ fluent_builder.inner = self; -+ fluent_builder.send().await -+ } -+} -+/// Fluent builder constructing a request to `GetDoubleKnownValue`. -+/// -+#[derive(::std::clone::Clone, ::std::fmt::Debug)] -+pub struct GetDoubleKnownValueFluentBuilder { -+ handle: ::std::sync::Arc, -+ inner: crate::operation::get_double_known_value::builders::GetDoubleKnownValueInputBuilder, -+ config_override: ::std::option::Option, -+} -+impl GetDoubleKnownValueFluentBuilder { -+ /// Creates a new `GetDoubleKnownValue`. -+ pub(crate) fn new(handle: ::std::sync::Arc) -> Self { -+ Self { -+ handle, -+ inner: ::std::default::Default::default(), -+ config_override: ::std::option::Option::None, -+ } -+ } -+ /// Access the GetDoubleKnownValue as a reference. -+ pub fn as_input( -+ &self, -+ ) -> &crate::operation::get_double_known_value::builders::GetDoubleKnownValueInputBuilder { -+ &self.inner -+ } -+ /// Sends the request and returns the response. -+ pub async fn send( -+ self, -+ ) -> ::std::result::Result< -+ crate::operation::get_double_known_value::GetDoubleKnownValueOutput, -+ crate::operation::get_double_known_value::GetDoubleKnownValueError, -+ > { -+ let input = self -+ .inner -+ .build() -+ // Using unhandled since GetDouble doesn't declare any validation, -+ // and smithy-rs seems to not generate a ValidationError case unless there is -+ // (but isn't that a backwards compatibility problem for output structures?) -+ // Vanilla smithy-rs uses SdkError::construction_failure, -+ // but we aren't using SdkError. -+ .map_err(crate::operation::get_double_known_value::GetDoubleKnownValueError::unhandled)?; -+ crate::operation::get_double_known_value::GetDoubleKnownValue::send(&self.handle, input).await -+ } -+ -+ pub(crate) fn config_override( -+ mut self, -+ config_override: impl Into, -+ ) -> Self { -+ self.set_config_override(Some(config_override.into())); -+ self -+ } -+ -+ pub(crate) fn set_config_override( -+ &mut self, -+ config_override: Option, -+ ) -> &mut Self { -+ self.config_override = config_override; -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn value( -+ mut self, -+ input: f64, -+ ) -> Self { -+ self.inner = self.inner.value(input); -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn set_value( -+ mut self, -+ input: ::std::option::Option, -+ ) -> Self { -+ self.inner = self.inner.set_value(input); -+ self -+ } -+ #[allow(missing_docs)] // documentation missing in model -+ pub fn get_value(&self) -> &::std::option::Option { -+ self.inner.get_value() -+ } -+}