Server Test

Server Test

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/sigv4_event_stream.rs

@@ -0,1 +0,332 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SigV4EventStreamSupportStructures.kt:253 */
           3  +
/// Receiver wrapper that handles SigV4 signed event stream messages
           4  +
#[derive(Debug)]
           5  +
pub struct SigV4Receiver<T, E> {
           6  +
    inner: ::aws_smithy_http::event_stream::Receiver<
           7  +
        crate::sigv4_event_stream::SignedEvent<T>,
           8  +
        crate::sigv4_event_stream::SignedEventError<E>,
           9  +
    >,
          10  +
    initial_signature: ::std::option::Option<crate::sigv4_event_stream::SignatureInfo>,
          11  +
}
          12  +
          13  +
impl<T, E> SigV4Receiver<T, E> {
          14  +
    pub fn new(
          15  +
        unmarshaller: impl ::aws_smithy_eventstream::frame::UnmarshallMessage<Output = T, Error = E>
          16  +
            + ::std::marker::Send
          17  +
            + ::std::marker::Sync
          18  +
            + 'static,
          19  +
        body: ::aws_smithy_types::body::SdkBody,
          20  +
    ) -> Self {
          21  +
        let sigv4_unmarshaller = crate::sigv4_event_stream::SigV4Unmarshaller::new(unmarshaller);
          22  +
        Self {
          23  +
            inner: ::aws_smithy_http::event_stream::Receiver::new(sigv4_unmarshaller, body),
          24  +
            initial_signature: ::std::option::Option::None,
          25  +
        }
          26  +
    }
          27  +
          28  +
    /// Get the signature from the initial message, if it was signed
          29  +
    pub fn initial_signature(
          30  +
        &self,
          31  +
    ) -> ::std::option::Option<&crate::sigv4_event_stream::SignatureInfo> {
          32  +
        self.initial_signature.as_ref()
          33  +
    }
          34  +
          35  +
    /// Try to receive an initial message of the given type.
          36  +
    /// Handles SigV4-wrapped messages by extracting the inner message first.
          37  +
    pub async fn try_recv_initial(
          38  +
        &mut self,
          39  +
        message_type: ::aws_smithy_http::event_stream::InitialMessageType,
          40  +
    ) -> ::std::result::Result<
          41  +
        ::std::option::Option<::aws_smithy_types::event_stream::Message>,
          42  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          43  +
            crate::sigv4_event_stream::SignedEventError<E>,
          44  +
            ::aws_smithy_types::event_stream::RawMessage,
          45  +
        >,
          46  +
    >
          47  +
    where
          48  +
        E: std::error::Error + 'static,
          49  +
    {
          50  +
        let result = self
          51  +
            .inner
          52  +
            .try_recv_initial_with_preprocessor(message_type, |message| {
          53  +
                match crate::sigv4_event_stream::extract_signed_message(&message) {
          54  +
                    ::std::result::Result::Ok(MaybeSignedMessage::Signed {
          55  +
                        message: inner,
          56  +
                        signature,
          57  +
                    }) => {
          58  +
                        ::std::result::Result::Ok((inner, ::std::option::Option::Some(signature)))
          59  +
                    }
          60  +
                    ::std::result::Result::Ok(MaybeSignedMessage::Unsigned) => {
          61  +
                        ::std::result::Result::Ok((message, ::std::option::Option::None))
          62  +
                    }
          63  +
                    ::std::result::Result::Err(err) => ::std::result::Result::Err(
          64  +
                        ::aws_smithy_runtime_api::client::result::ResponseError::builder()
          65  +
                            .raw(::aws_smithy_types::event_stream::RawMessage::Decoded(
          66  +
                                message,
          67  +
                            ))
          68  +
                            .source(err)
          69  +
                            .build(),
          70  +
                    ),
          71  +
                }
          72  +
            })
          73  +
            .await?;
          74  +
        match result {
          75  +
            ::std::option::Option::Some((message, signature)) => {
          76  +
                self.initial_signature = signature;
          77  +
                ::std::result::Result::Ok(::std::option::Option::Some(message))
          78  +
            }
          79  +
            ::std::option::Option::None => ::std::result::Result::Ok(::std::option::Option::None),
          80  +
        }
          81  +
    }
          82  +
          83  +
    /// Receive the next event from the stream
          84  +
    /// The SigV4Unmarshaller handles unwrapping, so we just pass through
          85  +
    pub async fn recv(
          86  +
        &mut self,
          87  +
    ) -> ::std::result::Result<
          88  +
        ::std::option::Option<crate::sigv4_event_stream::SignedEvent<T>>,
          89  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          90  +
            crate::sigv4_event_stream::SignedEventError<E>,
          91  +
            ::aws_smithy_types::event_stream::RawMessage,
          92  +
        >,
          93  +
    >
          94  +
    where
          95  +
        E: std::error::Error + 'static,
          96  +
    {
          97  +
        self.inner.recv().await
          98  +
    }
          99  +
}
         100  +
         101  +
/* SigV4EventStreamSupportStructures.kt:155 */
         102  +
/// Wrapper for event stream messages that may be signed
         103  +
#[derive(Debug, Clone)]
         104  +
pub struct SignedEvent<T> {
         105  +
    /// The actual event message
         106  +
    pub message: T,
         107  +
    /// Signature information if the message was signed
         108  +
    pub signature: ::std::option::Option<crate::sigv4_event_stream::SignatureInfo>,
         109  +
}
         110  +
         111  +
/* SigV4EventStreamSupportStructures.kt:132 */
         112  +
/// Error wrapper for signed event stream errors
         113  +
#[derive(Debug)]
         114  +
pub enum SignedEventError<E> {
         115  +
    /// Error from the underlying event stream
         116  +
    Event(E),
         117  +
    /// Error extracting signed message
         118  +
    InvalidSignedEvent(crate::sigv4_event_stream::ExtractionError),
         119  +
}
         120  +
         121  +
impl<E> From<E> for SignedEventError<E> {
         122  +
    fn from(err: E) -> Self {
         123  +
        SignedEventError::Event(err)
         124  +
    }
         125  +
}
         126  +
         127  +
/* SigV4EventStreamSupportStructures.kt:65 */
         128  +
/// Information extracted from a signed event stream message
         129  +
#[non_exhaustive]
         130  +
#[derive(Debug, Clone, PartialEq)]
         131  +
pub struct SignatureInfo {
         132  +
    /// The chunk signature bytes from the `:chunk-signature` header
         133  +
    pub chunk_signature: Vec<u8>,
         134  +
    /// The timestamp from the `:date` header
         135  +
    pub timestamp: ::std::time::SystemTime,
         136  +
}
         137  +
         138  +
/* SigV4EventStreamSupportStructures.kt:173 */
         139  +
/// Unmarshaller wrapper that handles SigV4 signed event stream messages
         140  +
#[derive(Debug)]
         141  +
pub struct SigV4Unmarshaller<T> {
         142  +
    inner: T,
         143  +
}
         144  +
         145  +
impl<T> SigV4Unmarshaller<T> {
         146  +
    pub fn new(inner: T) -> Self {
         147  +
        Self { inner }
         148  +
    }
         149  +
}
         150  +
         151  +
impl<T> ::aws_smithy_eventstream::frame::UnmarshallMessage for SigV4Unmarshaller<T>
         152  +
where
         153  +
    T: ::aws_smithy_eventstream::frame::UnmarshallMessage,
         154  +
{
         155  +
    type Output = crate::sigv4_event_stream::SignedEvent<T::Output>;
         156  +
    type Error = crate::sigv4_event_stream::SignedEventError<T::Error>;
         157  +
         158  +
    fn unmarshall(
         159  +
        &self,
         160  +
        message: &::aws_smithy_types::event_stream::Message,
         161  +
    ) -> ::std::result::Result<
         162  +
        ::aws_smithy_eventstream::frame::UnmarshalledMessage<Self::Output, Self::Error>,
         163  +
        ::aws_smithy_eventstream::error::Error,
         164  +
    > {
         165  +
        // First, try to extract the signed message
         166  +
        match crate::sigv4_event_stream::extract_signed_message(message) {
         167  +
            ::std::result::Result::Ok(MaybeSignedMessage::Signed {
         168  +
                message: inner_message,
         169  +
                signature,
         170  +
            }) => {
         171  +
                // Process the inner message with the base unmarshaller
         172  +
                match self.inner.unmarshall(&inner_message) {
         173  +
                    ::std::result::Result::Ok(unmarshalled) => match unmarshalled {
         174  +
                        ::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(event) => {
         175  +
                            ::std::result::Result::Ok(
         176  +
                                ::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         177  +
                                    crate::sigv4_event_stream::SignedEvent {
         178  +
                                        message: event,
         179  +
                                        signature: ::std::option::Option::Some(signature),
         180  +
                                    },
         181  +
                                ),
         182  +
                            )
         183  +
                        }
         184  +
                        ::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(err) => {
         185  +
                            ::std::result::Result::Ok(
         186  +
                                ::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
         187  +
                                    crate::sigv4_event_stream::SignedEventError::Event(err),
         188  +
                                ),
         189  +
                            )
         190  +
                        }
         191  +
                    },
         192  +
                    ::std::result::Result::Err(err) => ::std::result::Result::Err(err),
         193  +
                }
         194  +
            }
         195  +
            ::std::result::Result::Ok(MaybeSignedMessage::Unsigned) => {
         196  +
                // Process unsigned message directly
         197  +
                match self.inner.unmarshall(message) {
         198  +
                    ::std::result::Result::Ok(unmarshalled) => match unmarshalled {
         199  +
                        ::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(event) => {
         200  +
                            ::std::result::Result::Ok(
         201  +
                                ::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         202  +
                                    crate::sigv4_event_stream::SignedEvent {
         203  +
                                        message: event,
         204  +
                                        signature: ::std::option::Option::None,
         205  +
                                    },
         206  +
                                ),
         207  +
                            )
         208  +
                        }
         209  +
                        ::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(err) => {
         210  +
                            ::std::result::Result::Ok(
         211  +
                                ::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
         212  +
                                    crate::sigv4_event_stream::SignedEventError::Event(err),
         213  +
                                ),
         214  +
                            )
         215  +
                        }
         216  +
                    },
         217  +
                    ::std::result::Result::Err(err) => ::std::result::Result::Err(err),
         218  +
                }
         219  +
            }
         220  +
            ::std::result::Result::Err(extraction_err) => ::std::result::Result::Ok(
         221  +
                ::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
         222  +
                    crate::sigv4_event_stream::SignedEventError::InvalidSignedEvent(extraction_err),
         223  +
                ),
         224  +
            ),
         225  +
        }
         226  +
    }
         227  +
}
         228  +
         229  +
/* SigV4EventStreamSupportStructures.kt:342 */
         230  +
/// Result of extracting a potentially signed message
         231  +
#[derive(Debug)]
         232  +
pub enum MaybeSignedMessage {
         233  +
    /// Message was signed and has been extracted
         234  +
    Signed {
         235  +
        /// The inner message that was signed
         236  +
        message: ::aws_smithy_types::event_stream::Message,
         237  +
        /// Signature information from the outer message
         238  +
        signature: crate::sigv4_event_stream::SignatureInfo,
         239  +
    },
         240  +
    /// Message was not signed (no `:chunk-signature` header present)
         241  +
    Unsigned,
         242  +
}
         243  +
         244  +
/// Extracts the inner message from a potentially signed event stream message.
         245  +
pub fn extract_signed_message(
         246  +
    message: &::aws_smithy_types::event_stream::Message,
         247  +
) -> ::std::result::Result<MaybeSignedMessage, crate::sigv4_event_stream::ExtractionError> {
         248  +
    // Check if message has chunk signature
         249  +
    let mut chunk_signature = None;
         250  +
    let mut timestamp = None;
         251  +
         252  +
    for header in message.headers() {
         253  +
        match header.name().as_str() {
         254  +
            ":chunk-signature" => {
         255  +
                if let ::aws_smithy_types::event_stream::HeaderValue::ByteArray(bytes) =
         256  +
                    header.value()
         257  +
                {
         258  +
                    chunk_signature = Some(bytes.as_ref().to_vec());
         259  +
                }
         260  +
            }
         261  +
            ":date" => {
         262  +
                if let ::aws_smithy_types::event_stream::HeaderValue::Timestamp(ts) = header.value()
         263  +
                {
         264  +
                    timestamp = Some(::std::time::SystemTime::try_from(*ts).map_err(|_err| {
         265  +
                        crate::sigv4_event_stream::ExtractionError::InvalidTimestamp
         266  +
                    })?);
         267  +
                } else {
         268  +
                    return Err(crate::sigv4_event_stream::ExtractionError::InvalidTimestamp);
         269  +
                }
         270  +
            }
         271  +
            _ => {}
         272  +
        }
         273  +
    }
         274  +
         275  +
    let Some(chunk_signature) = chunk_signature else {
         276  +
        return Ok(MaybeSignedMessage::Unsigned);
         277  +
    };
         278  +
         279  +
    let Some(timestamp) = timestamp else {
         280  +
        return Err(crate::sigv4_event_stream::ExtractionError::InvalidTimestamp);
         281  +
    };
         282  +
         283  +
    // Extract inner message
         284  +
    let cursor = ::std::io::Cursor::new(message.payload());
         285  +
    let inner_message = ::aws_smithy_eventstream::frame::read_message_from(cursor)
         286  +
        .map_err(|err| crate::sigv4_event_stream::ExtractionError::InvalidPayload { error: err })?;
         287  +
         288  +
    Ok(MaybeSignedMessage::Signed {
         289  +
        message: inner_message,
         290  +
        signature: crate::sigv4_event_stream::SignatureInfo {
         291  +
            chunk_signature,
         292  +
            timestamp,
         293  +
        },
         294  +
    })
         295  +
}
         296  +
         297  +
/* SigV4EventStreamSupportStructures.kt:83 */
         298  +
/// Error type for signed message extraction operations
         299  +
#[non_exhaustive]
         300  +
#[derive(Debug)]
         301  +
pub enum ExtractionError {
         302  +
    /// The payload could not be decoded as a valid message
         303  +
    #[non_exhaustive]
         304  +
    InvalidPayload {
         305  +
        error: ::aws_smithy_eventstream::error::Error,
         306  +
    },
         307  +
    /// The timestamp header is missing or has an invalid format
         308  +
    #[non_exhaustive]
         309  +
    InvalidTimestamp,
         310  +
}
         311  +
         312  +
impl ::std::fmt::Display for ExtractionError {
         313  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         314  +
        match self {
         315  +
            ExtractionError::InvalidPayload { error } => {
         316  +
                write!(f, "invalid payload: {}", error)
         317  +
            }
         318  +
            ExtractionError::InvalidTimestamp => {
         319  +
                write!(f, "invalid or missing timestamp header")
         320  +
            }
         321  +
        }
         322  +
    }
         323  +
}
         324  +
         325  +
impl ::std::error::Error for ExtractionError {
         326  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         327  +
        match self {
         328  +
            ExtractionError::InvalidPayload { error } => ::std::option::Option::Some(error),
         329  +
            ExtractionError::InvalidTimestamp => ::std::option::Option::None,
         330  +
        }
         331  +
    }
         332  +
}

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/unconstrained.rs

@@ -1,1 +429,428 @@
    5      5   
    type Unconstrained = crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained;
    6      6   
}
    7      7   
    8      8   
impl From<crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained>
    9      9   
    for crate::constrained::MaybeConstrained<crate::model::MyUnion>
   10     10   
{
   11     11   
    fn from(value: crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained) -> Self {
   12     12   
        Self::Unconstrained(value)
   13     13   
    }
   14     14   
}
          15  +
pub(crate) mod string_set_unconstrained {
   15     16   
   16         -
pub(crate) mod my_union_unconstrained {
   17         -
   18         -
    /* UnconstrainedUnionGenerator.kt:82 */
   19         -
    #[allow(clippy::enum_variant_names)]
          17  +
    /* UnconstrainedCollectionGenerator.kt:77 */
   20     18   
    #[derive(Debug, Clone)]
   21         -
    pub(crate) enum MyUnionUnconstrained {
   22         -
        /* UnconstrainedUnionGenerator.kt:95 */ BlobValue(::aws_smithy_types::Blob),
   23         -
        /* UnconstrainedUnionGenerator.kt:95 */ BooleanValue(bool),
   24         -
        /* UnconstrainedUnionGenerator.kt:95 */ EnumValue(::std::string::String),
   25         -
        /* UnconstrainedUnionGenerator.kt:95 */
   26         -
        ListValue(::std::vec::Vec<::std::string::String>),
   27         -
        /* UnconstrainedUnionGenerator.kt:95 */
   28         -
        MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
   29         -
        /* UnconstrainedUnionGenerator.kt:95 */ NumberValue(i32),
   30         -
        /* UnconstrainedUnionGenerator.kt:95 */
   31         -
        RenamedStructureValue(crate::model::RenamedGreeting),
   32         -
        /* UnconstrainedUnionGenerator.kt:95 */ StringValue(::std::string::String),
   33         -
        /* UnconstrainedUnionGenerator.kt:95 */
   34         -
        StructureValue(crate::model::GreetingStruct),
   35         -
        /* UnconstrainedUnionGenerator.kt:95 */
   36         -
        TimestampValue(::aws_smithy_types::DateTime),
   37         -
        /* UnconstrainedUnionGenerator.kt:82 */
   38         -
    }
   39         -
    /* UnconstrainedUnionGenerator.kt:103 */
   40         -
    impl ::std::convert::TryFrom<MyUnionUnconstrained> for crate::model::MyUnion {
   41         -
        type Error = crate::model::my_union::ConstraintViolation;
   42         -
   43         -
        fn try_from(value: MyUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
   44         -
            Ok(
   45         -
        match value {
   46         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BlobValue(unconstrained) => Self::BlobValue(
   47         -
                unconstrained
   48         -
            ),
   49         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BooleanValue(unconstrained) => Self::BooleanValue(
   50         -
                unconstrained
   51         -
            ),
   52         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::EnumValue(unconstrained) => Self::EnumValue(
   53         -
                unconstrained
   54         -
                                        .try_into()
   55         -
                                        
          19  +
    pub(crate) struct StringSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
   56     20   
   57         -
                                        .map_err(Self::Error::EnumValue)?
   58         -
            ),
   59         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::ListValue(unconstrained) => Self::ListValue(
   60         -
                unconstrained
   61         -
            ),
   62         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::MapValue(unconstrained) => Self::MapValue(
   63         -
                unconstrained
   64         -
            ),
   65         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::NumberValue(unconstrained) => Self::NumberValue(
   66         -
                unconstrained
   67         -
            ),
   68         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::RenamedStructureValue(unconstrained) => Self::RenamedStructureValue(
   69         -
                unconstrained
   70         -
            ),
   71         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StringValue(unconstrained) => Self::StringValue(
   72         -
                unconstrained
   73         -
            ),
   74         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StructureValue(unconstrained) => Self::StructureValue(
   75         -
                unconstrained
   76         -
            ),
   77         -
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::TimestampValue(unconstrained) => Self::TimestampValue(
   78         -
                unconstrained
   79         -
            ),
          21  +
    impl From<StringSetUnconstrained>
          22  +
        for crate::constrained::MaybeConstrained<crate::model::StringSet>
          23  +
    {
          24  +
        fn from(value: StringSetUnconstrained) -> Self {
          25  +
            Self::Unconstrained(value)
   80     26   
        }
   81         -
    )
   82     27   
    }
          28  +
    /* UnconstrainedCollectionGenerator.kt:97 */
          29  +
    impl std::convert::TryFrom<StringSetUnconstrained> for crate::model::StringSet {
          30  +
        /* UnconstrainedCollectionGenerator.kt:98 */
          31  +
        type Error = crate::model::string_set::ConstraintViolation;
          32  +
        /* UnconstrainedCollectionGenerator.kt:100 */
          33  +
        fn try_from(value: StringSetUnconstrained) -> std::result::Result<Self, Self::Error> {
          34  +
            /* UnconstrainedCollectionGenerator.kt:185 */
          35  +
            let inner = value.0;
          36  +
            /* UnconstrainedCollectionGenerator.kt:189 */
          37  +
            Self::try_from(inner)
          38  +
            /* UnconstrainedCollectionGenerator.kt:100 */
          39  +
        }
          40  +
        /* UnconstrainedCollectionGenerator.kt:97 */
   83     41   
    }
   84     42   
   85     43   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
   86     44   
}
   87         -
pub(crate) mod sparse_set_map_unconstrained {
          45  +
pub(crate) mod foo_enum_list_unconstrained {
   88     46   
   89         -
    /* UnconstrainedMapGenerator.kt:79 */
          47  +
    /* UnconstrainedCollectionGenerator.kt:77 */
   90     48   
    #[derive(Debug, Clone)]
   91         -
    pub(crate) struct SparseSetMapUnconstrained(
   92         -
        pub(crate)  std::collections::HashMap<
   93         -
            ::std::string::String,
   94         -
            ::std::option::Option<
   95         -
                crate::unconstrained::string_set_unconstrained::StringSetUnconstrained,
   96         -
            >,
   97         -
        >,
   98         -
    );
          49  +
    pub(crate) struct FooEnumListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
   99     50   
  100         -
    impl From<SparseSetMapUnconstrained>
          51  +
    impl From<FooEnumListUnconstrained>
  101     52   
        for crate::constrained::MaybeConstrained<
  102         -
            crate::constrained::sparse_set_map_constrained::SparseSetMapConstrained,
          53  +
            crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
  103     54   
        >
  104     55   
    {
  105         -
        fn from(value: SparseSetMapUnconstrained) -> Self {
          56  +
        fn from(value: FooEnumListUnconstrained) -> Self {
  106     57   
            Self::Unconstrained(value)
  107     58   
        }
  108     59   
    }
  109         -
    /* UnconstrainedMapGenerator.kt:101 */
  110         -
    impl std::convert::TryFrom<SparseSetMapUnconstrained>
  111         -
        for crate::constrained::sparse_set_map_constrained::SparseSetMapConstrained
          60  +
    /* UnconstrainedCollectionGenerator.kt:97 */
          61  +
    impl std::convert::TryFrom<FooEnumListUnconstrained>
          62  +
        for crate::constrained::foo_enum_list_constrained::FooEnumListConstrained
  112     63   
    {
  113         -
        /* UnconstrainedMapGenerator.kt:102 */
  114         -
        type Error = crate::model::sparse_set_map::ConstraintViolation;
  115         -
        /* UnconstrainedMapGenerator.kt:104 */
  116         -
        fn try_from(value: SparseSetMapUnconstrained) -> std::result::Result<Self, Self::Error> {
  117         -
            /* UnconstrainedMapGenerator.kt:186 */
          64  +
        /* UnconstrainedCollectionGenerator.kt:98 */
          65  +
        type Error = crate::model::foo_enum_list::ConstraintViolation;
          66  +
        /* UnconstrainedCollectionGenerator.kt:100 */
          67  +
        fn try_from(value: FooEnumListUnconstrained) -> std::result::Result<Self, Self::Error> {
          68  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  118     69   
            let res: ::std::result::Result<
  119         -
                ::std::collections::HashMap<
  120         -
                    ::std::string::String,
  121         -
                    ::std::option::Option<crate::model::StringSet>,
  122         -
                >,
  123         -
                Self::Error,
          70  +
                ::std::vec::Vec<crate::model::FooEnum>,
          71  +
                (usize, crate::model::foo_enum::ConstraintViolation),
  124     72   
            > = value
  125     73   
                .0
  126     74   
                .into_iter()
  127         -
                .map(|(k, v)| match v {
  128         -
                    None => Ok((k, None)),
  129         -
                    Some(v) => match crate::model::StringSet::try_from(v) {
  130         -
                        Ok(v) => Ok((k, Some(v))),
  131         -
                        Err(inner_constraint_violation) => {
  132         -
                            Err(Self::Error::Value(k, inner_constraint_violation))
  133         -
                        }
  134         -
                    },
          75  +
                .enumerate()
          76  +
                .map(|(idx, inner)| {
          77  +
                    inner
          78  +
                        .try_into()
          79  +
                        .map_err(|inner_violation| (idx, inner_violation))
  135     80   
                })
  136     81   
                .collect();
  137         -
            let hm = res?;
  138         -
            /* UnconstrainedMapGenerator.kt:247 */
  139         -
            Ok(Self(hm))
  140         -
            /* UnconstrainedMapGenerator.kt:104 */
          82  +
            let inner =
          83  +
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
          84  +
            /* UnconstrainedCollectionGenerator.kt:191 */
          85  +
            Ok(Self(inner))
          86  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  141     87   
        }
  142         -
        /* UnconstrainedMapGenerator.kt:101 */
          88  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  143     89   
    }
  144     90   
  145     91   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  146     92   
}
  147         -
pub(crate) mod string_set_unconstrained {
          93  +
pub(crate) mod integer_set_unconstrained {
  148     94   
  149     95   
    /* UnconstrainedCollectionGenerator.kt:77 */
  150     96   
    #[derive(Debug, Clone)]
  151         -
    pub(crate) struct StringSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
          97  +
    pub(crate) struct IntegerSetUnconstrained(pub(crate) std::vec::Vec<i32>);
  152     98   
  153         -
    impl From<StringSetUnconstrained>
  154         -
        for crate::constrained::MaybeConstrained<crate::model::StringSet>
          99  +
    impl From<IntegerSetUnconstrained>
         100  +
        for crate::constrained::MaybeConstrained<crate::model::IntegerSet>
  155    101   
    {
  156         -
        fn from(value: StringSetUnconstrained) -> Self {
         102  +
        fn from(value: IntegerSetUnconstrained) -> Self {
  157    103   
            Self::Unconstrained(value)
  158    104   
        }
  159    105   
    }
  160    106   
    /* UnconstrainedCollectionGenerator.kt:97 */
  161         -
    impl std::convert::TryFrom<StringSetUnconstrained> for crate::model::StringSet {
         107  +
    impl std::convert::TryFrom<IntegerSetUnconstrained> for crate::model::IntegerSet {
  162    108   
        /* UnconstrainedCollectionGenerator.kt:98 */
  163         -
        type Error = crate::model::string_set::ConstraintViolation;
         109  +
        type Error = crate::model::integer_set::ConstraintViolation;
  164    110   
        /* UnconstrainedCollectionGenerator.kt:100 */
  165         -
        fn try_from(value: StringSetUnconstrained) -> std::result::Result<Self, Self::Error> {
         111  +
        fn try_from(value: IntegerSetUnconstrained) -> std::result::Result<Self, Self::Error> {
  166    112   
            /* UnconstrainedCollectionGenerator.kt:185 */
  167    113   
            let inner = value.0;
  168    114   
            /* UnconstrainedCollectionGenerator.kt:189 */
  169    115   
            Self::try_from(inner)
  170    116   
            /* UnconstrainedCollectionGenerator.kt:100 */
  171    117   
        }
  172    118   
        /* UnconstrainedCollectionGenerator.kt:97 */
  173    119   
    }
  174    120   
  175    121   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  176    122   
}
  177         -
pub(crate) mod dense_set_map_unconstrained {
         123  +
pub(crate) mod foo_enum_set_unconstrained {
  178    124   
  179         -
    /* UnconstrainedMapGenerator.kt:79 */
         125  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  180    126   
    #[derive(Debug, Clone)]
  181         -
    pub(crate) struct DenseSetMapUnconstrained(
  182         -
        pub(crate)  std::collections::HashMap<
  183         -
            ::std::string::String,
  184         -
            crate::unconstrained::string_set_unconstrained::StringSetUnconstrained,
  185         -
        >,
  186         -
    );
         127  +
    pub(crate) struct FooEnumSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
  187    128   
  188         -
    impl From<DenseSetMapUnconstrained>
  189         -
        for crate::constrained::MaybeConstrained<
  190         -
            crate::constrained::dense_set_map_constrained::DenseSetMapConstrained,
  191         -
        >
         129  +
    impl From<FooEnumSetUnconstrained>
         130  +
        for crate::constrained::MaybeConstrained<crate::model::FooEnumSet>
  192    131   
    {
  193         -
        fn from(value: DenseSetMapUnconstrained) -> Self {
         132  +
        fn from(value: FooEnumSetUnconstrained) -> Self {
  194    133   
            Self::Unconstrained(value)
  195    134   
        }
  196    135   
    }
  197         -
    /* UnconstrainedMapGenerator.kt:101 */
  198         -
    impl std::convert::TryFrom<DenseSetMapUnconstrained>
  199         -
        for crate::constrained::dense_set_map_constrained::DenseSetMapConstrained
  200         -
    {
  201         -
        /* UnconstrainedMapGenerator.kt:102 */
  202         -
        type Error = crate::model::dense_set_map::ConstraintViolation;
  203         -
        /* UnconstrainedMapGenerator.kt:104 */
  204         -
        fn try_from(value: DenseSetMapUnconstrained) -> std::result::Result<Self, Self::Error> {
  205         -
            /* UnconstrainedMapGenerator.kt:186 */
         136  +
    /* UnconstrainedCollectionGenerator.kt:97 */
         137  +
    impl std::convert::TryFrom<FooEnumSetUnconstrained> for crate::model::FooEnumSet {
         138  +
        /* UnconstrainedCollectionGenerator.kt:98 */
         139  +
        type Error = crate::model::foo_enum_set::ConstraintViolation;
         140  +
        /* UnconstrainedCollectionGenerator.kt:100 */
         141  +
        fn try_from(value: FooEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
         142  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  206    143   
            let res: ::std::result::Result<
  207         -
                ::std::collections::HashMap<::std::string::String, crate::model::StringSet>,
  208         -
                Self::Error,
         144  +
                ::std::vec::Vec<crate::model::FooEnum>,
         145  +
                (usize, crate::model::foo_enum::ConstraintViolation),
  209    146   
            > = value
  210    147   
                .0
  211    148   
                .into_iter()
  212         -
                .map(|(k, v)| match crate::model::StringSet::try_from(v) {
  213         -
                    Ok(v) => Ok((k, v)),
  214         -
                    Err(inner_constraint_violation) => {
  215         -
                        Err(Self::Error::Value(k, inner_constraint_violation))
  216         -
                    }
         149  +
                .enumerate()
         150  +
                .map(|(idx, inner)| {
         151  +
                    inner
         152  +
                        .try_into()
         153  +
                        .map_err(|inner_violation| (idx, inner_violation))
  217    154   
                })
  218    155   
                .collect();
  219         -
            let hm = res?;
  220         -
            /* UnconstrainedMapGenerator.kt:247 */
  221         -
            Ok(Self(hm))
  222         -
            /* UnconstrainedMapGenerator.kt:104 */
         156  +
            let inner =
         157  +
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         158  +
            /* UnconstrainedCollectionGenerator.kt:189 */
         159  +
            Self::try_from(inner)
         160  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  223    161   
        }
  224         -
        /* UnconstrainedMapGenerator.kt:101 */
         162  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  225    163   
    }
  226    164   
  227    165   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  228    166   
}
  229         -
pub(crate) mod foo_enum_list_unconstrained {
         167  +
pub(crate) mod foo_enum_map_unconstrained {
  230    168   
  231         -
    /* UnconstrainedCollectionGenerator.kt:77 */
         169  +
    /* UnconstrainedMapGenerator.kt:79 */
  232    170   
    #[derive(Debug, Clone)]
  233         -
    pub(crate) struct FooEnumListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
         171  +
    pub(crate) struct FooEnumMapUnconstrained(
         172  +
        pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
         173  +
    );
  234    174   
  235         -
    impl From<FooEnumListUnconstrained>
         175  +
    impl From<FooEnumMapUnconstrained>
  236    176   
        for crate::constrained::MaybeConstrained<
  237         -
            crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
         177  +
            crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
  238    178   
        >
  239    179   
    {
  240         -
        fn from(value: FooEnumListUnconstrained) -> Self {
         180  +
        fn from(value: FooEnumMapUnconstrained) -> Self {
  241    181   
            Self::Unconstrained(value)
  242    182   
        }
  243    183   
    }
  244         -
    /* UnconstrainedCollectionGenerator.kt:97 */
  245         -
    impl std::convert::TryFrom<FooEnumListUnconstrained>
  246         -
        for crate::constrained::foo_enum_list_constrained::FooEnumListConstrained
         184  +
    /* UnconstrainedMapGenerator.kt:101 */
         185  +
    impl std::convert::TryFrom<FooEnumMapUnconstrained>
         186  +
        for crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained
  247    187   
    {
  248         -
        /* UnconstrainedCollectionGenerator.kt:98 */
  249         -
        type Error = crate::model::foo_enum_list::ConstraintViolation;
  250         -
        /* UnconstrainedCollectionGenerator.kt:100 */
  251         -
        fn try_from(value: FooEnumListUnconstrained) -> std::result::Result<Self, Self::Error> {
  252         -
            /* UnconstrainedCollectionGenerator.kt:127 */
         188  +
        /* UnconstrainedMapGenerator.kt:102 */
         189  +
        type Error = crate::model::foo_enum_map::ConstraintViolation;
         190  +
        /* UnconstrainedMapGenerator.kt:104 */
         191  +
        fn try_from(value: FooEnumMapUnconstrained) -> std::result::Result<Self, Self::Error> {
         192  +
            /* UnconstrainedMapGenerator.kt:186 */
  253    193   
            let res: ::std::result::Result<
  254         -
                ::std::vec::Vec<crate::model::FooEnum>,
  255         -
                (usize, crate::model::foo_enum::ConstraintViolation),
         194  +
                ::std::collections::HashMap<::std::string::String, crate::model::FooEnum>,
         195  +
                Self::Error,
  256    196   
            > = value
  257    197   
                .0
  258    198   
                .into_iter()
  259         -
                .enumerate()
  260         -
                .map(|(idx, inner)| {
  261         -
                    inner
  262         -
                        .try_into()
  263         -
                        .map_err(|inner_violation| (idx, inner_violation))
         199  +
                .map(|(k, v)| match crate::model::FooEnum::try_from(v) {
         200  +
                    Ok(v) => Ok((k, v)),
         201  +
                    Err(inner_constraint_violation) => {
         202  +
                        Err(Self::Error::Value(k, inner_constraint_violation))
         203  +
                    }
  264    204   
                })
  265    205   
                .collect();
  266         -
            let inner =
  267         -
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  268         -
            /* UnconstrainedCollectionGenerator.kt:191 */
  269         -
            Ok(Self(inner))
  270         -
            /* UnconstrainedCollectionGenerator.kt:100 */
         206  +
            let hm = res?;
         207  +
            /* UnconstrainedMapGenerator.kt:247 */
         208  +
            Ok(Self(hm))
         209  +
            /* UnconstrainedMapGenerator.kt:104 */
  271    210   
        }
  272         -
        /* UnconstrainedCollectionGenerator.kt:97 */
         211  +
        /* UnconstrainedMapGenerator.kt:101 */
  273    212   
    }
  274    213   
  275    214   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  276    215   
}
  277    216   
pub(crate) mod integer_enum_set_unconstrained {
  278    217   
  279    218   
    /* UnconstrainedCollectionGenerator.kt:77 */
  280    219   
    #[derive(Debug, Clone)]
  281    220   
    pub(crate) struct IntegerEnumSetUnconstrained(pub(crate) std::vec::Vec<i32>);
  282    221   
  283    222   
    impl From<IntegerEnumSetUnconstrained>
  284    223   
        for crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>
  285    224   
    {
  286    225   
        fn from(value: IntegerEnumSetUnconstrained) -> Self {
  287    226   
            Self::Unconstrained(value)
  288    227   
        }
  289    228   
    }
  290    229   
    /* UnconstrainedCollectionGenerator.kt:97 */
  291    230   
    impl std::convert::TryFrom<IntegerEnumSetUnconstrained> for crate::model::IntegerEnumSet {
  292    231   
        /* UnconstrainedCollectionGenerator.kt:98 */
  293    232   
        type Error = crate::model::integer_enum_set::ConstraintViolation;
  294    233   
        /* UnconstrainedCollectionGenerator.kt:100 */
  295    234   
        fn try_from(value: IntegerEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
  296    235   
            /* UnconstrainedCollectionGenerator.kt:185 */
  297    236   
            let inner = value.0;
  298    237   
            /* UnconstrainedCollectionGenerator.kt:189 */
  299    238   
            Self::try_from(inner)
  300    239   
            /* UnconstrainedCollectionGenerator.kt:100 */
  301    240   
        }
  302    241   
        /* UnconstrainedCollectionGenerator.kt:97 */
  303    242   
    }
  304    243   
  305    244   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  306    245   
}
  307         -
pub(crate) mod foo_enum_map_unconstrained {
         246  +
pub(crate) mod dense_set_map_unconstrained {
  308    247   
  309    248   
    /* UnconstrainedMapGenerator.kt:79 */
  310    249   
    #[derive(Debug, Clone)]
  311         -
    pub(crate) struct FooEnumMapUnconstrained(
  312         -
        pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
         250  +
    pub(crate) struct DenseSetMapUnconstrained(
         251  +
        pub(crate)  std::collections::HashMap<
         252  +
            ::std::string::String,
         253  +
            crate::unconstrained::string_set_unconstrained::StringSetUnconstrained,
         254  +
        >,
  313    255   
    );
  314    256   
  315         -
    impl From<FooEnumMapUnconstrained>
         257  +
    impl From<DenseSetMapUnconstrained>
  316    258   
        for crate::constrained::MaybeConstrained<
  317         -
            crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
         259  +
            crate::constrained::dense_set_map_constrained::DenseSetMapConstrained,
  318    260   
        >
  319    261   
    {
  320         -
        fn from(value: FooEnumMapUnconstrained) -> Self {
         262  +
        fn from(value: DenseSetMapUnconstrained) -> Self {
  321    263   
            Self::Unconstrained(value)
  322    264   
        }
  323    265   
    }
  324    266   
    /* UnconstrainedMapGenerator.kt:101 */
  325         -
    impl std::convert::TryFrom<FooEnumMapUnconstrained>
  326         -
        for crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained
         267  +
    impl std::convert::TryFrom<DenseSetMapUnconstrained>
         268  +
        for crate::constrained::dense_set_map_constrained::DenseSetMapConstrained
  327    269   
    {
  328    270   
        /* UnconstrainedMapGenerator.kt:102 */
  329         -
        type Error = crate::model::foo_enum_map::ConstraintViolation;
         271  +
        type Error = crate::model::dense_set_map::ConstraintViolation;
  330    272   
        /* UnconstrainedMapGenerator.kt:104 */
  331         -
        fn try_from(value: FooEnumMapUnconstrained) -> std::result::Result<Self, Self::Error> {
         273  +
        fn try_from(value: DenseSetMapUnconstrained) -> std::result::Result<Self, Self::Error> {
  332    274   
            /* UnconstrainedMapGenerator.kt:186 */
  333    275   
            let res: ::std::result::Result<
  334         -
                ::std::collections::HashMap<::std::string::String, crate::model::FooEnum>,
         276  +
                ::std::collections::HashMap<::std::string::String, crate::model::StringSet>,
  335    277   
                Self::Error,
  336    278   
            > = value
  337    279   
                .0
  338    280   
                .into_iter()
  339         -
                .map(|(k, v)| match crate::model::FooEnum::try_from(v) {
         281  +
                .map(|(k, v)| match crate::model::StringSet::try_from(v) {
  340    282   
                    Ok(v) => Ok((k, v)),
  341    283   
                    Err(inner_constraint_violation) => {
  342    284   
                        Err(Self::Error::Value(k, inner_constraint_violation))
  343    285   
                    }
  344    286   
                })
  345    287   
                .collect();
  346    288   
            let hm = res?;
  347    289   
            /* UnconstrainedMapGenerator.kt:247 */
  348    290   
            Ok(Self(hm))
  349    291   
            /* UnconstrainedMapGenerator.kt:104 */
  350    292   
        }
  351    293   
        /* UnconstrainedMapGenerator.kt:101 */
  352    294   
    }
  353    295   
  354    296   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  355    297   
}
  356         -
pub(crate) mod foo_enum_set_unconstrained {
         298  +
pub(crate) mod sparse_set_map_unconstrained {
  357    299   
  358         -
    /* UnconstrainedCollectionGenerator.kt:77 */
         300  +
    /* UnconstrainedMapGenerator.kt:79 */
  359    301   
    #[derive(Debug, Clone)]
  360         -
    pub(crate) struct FooEnumSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
         302  +
    pub(crate) struct SparseSetMapUnconstrained(
         303  +
        pub(crate)  std::collections::HashMap<
         304  +
            ::std::string::String,
         305  +
            ::std::option::Option<
         306  +
                crate::unconstrained::string_set_unconstrained::StringSetUnconstrained,
         307  +
            >,
         308  +
        >,
         309  +
    );
  361    310   
  362         -
    impl From<FooEnumSetUnconstrained>
  363         -
        for crate::constrained::MaybeConstrained<crate::model::FooEnumSet>
         311  +
    impl From<SparseSetMapUnconstrained>
         312  +
        for crate::constrained::MaybeConstrained<
         313  +
            crate::constrained::sparse_set_map_constrained::SparseSetMapConstrained,
         314  +
        >
  364    315   
    {
  365         -
        fn from(value: FooEnumSetUnconstrained) -> Self {
         316  +
        fn from(value: SparseSetMapUnconstrained) -> Self {
  366    317   
            Self::Unconstrained(value)
  367    318   
        }
  368    319   
    }
  369         -
    /* UnconstrainedCollectionGenerator.kt:97 */
  370         -
    impl std::convert::TryFrom<FooEnumSetUnconstrained> for crate::model::FooEnumSet {
  371         -
        /* UnconstrainedCollectionGenerator.kt:98 */
  372         -
        type Error = crate::model::foo_enum_set::ConstraintViolation;
  373         -
        /* UnconstrainedCollectionGenerator.kt:100 */
  374         -
        fn try_from(value: FooEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
  375         -
            /* UnconstrainedCollectionGenerator.kt:127 */
         320  +
    /* UnconstrainedMapGenerator.kt:101 */
         321  +
    impl std::convert::TryFrom<SparseSetMapUnconstrained>
         322  +
        for crate::constrained::sparse_set_map_constrained::SparseSetMapConstrained
         323  +
    {
         324  +
        /* UnconstrainedMapGenerator.kt:102 */
         325  +
        type Error = crate::model::sparse_set_map::ConstraintViolation;
         326  +
        /* UnconstrainedMapGenerator.kt:104 */
         327  +
        fn try_from(value: SparseSetMapUnconstrained) -> std::result::Result<Self, Self::Error> {
         328  +
            /* UnconstrainedMapGenerator.kt:186 */
  376    329   
            let res: ::std::result::Result<
  377         -
                ::std::vec::Vec<crate::model::FooEnum>,
  378         -
                (usize, crate::model::foo_enum::ConstraintViolation),
         330  +
                ::std::collections::HashMap<
         331  +
                    ::std::string::String,
         332  +
                    ::std::option::Option<crate::model::StringSet>,
         333  +
                >,
         334  +
                Self::Error,
  379    335   
            > = value
  380    336   
                .0
  381    337   
                .into_iter()
  382         -
                .enumerate()
  383         -
                .map(|(idx, inner)| {
  384         -
                    inner
  385         -
                        .try_into()
  386         -
                        .map_err(|inner_violation| (idx, inner_violation))
         338  +
                .map(|(k, v)| match v {
         339  +
                    None => Ok((k, None)),
         340  +
                    Some(v) => match crate::model::StringSet::try_from(v) {
         341  +
                        Ok(v) => Ok((k, Some(v))),
         342  +
                        Err(inner_constraint_violation) => {
         343  +
                            Err(Self::Error::Value(k, inner_constraint_violation))
         344  +
                        }
         345  +
                    },
  387    346   
                })
  388    347   
                .collect();
  389         -
            let inner =
  390         -
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  391         -
            /* UnconstrainedCollectionGenerator.kt:189 */
  392         -
            Self::try_from(inner)
  393         -
            /* UnconstrainedCollectionGenerator.kt:100 */
         348  +
            let hm = res?;
         349  +
            /* UnconstrainedMapGenerator.kt:247 */
         350  +
            Ok(Self(hm))
         351  +
            /* UnconstrainedMapGenerator.kt:104 */
  394    352   
        }
  395         -
        /* UnconstrainedCollectionGenerator.kt:97 */
         353  +
        /* UnconstrainedMapGenerator.kt:101 */
  396    354   
    }
  397    355   
  398    356   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  399    357   
}
  400         -
pub(crate) mod integer_set_unconstrained {
         358  +
pub(crate) mod my_union_unconstrained {
  401    359   
  402         -
    /* UnconstrainedCollectionGenerator.kt:77 */
         360  +
    /* UnconstrainedUnionGenerator.kt:82 */
         361  +
    #[allow(clippy::enum_variant_names)]
  403    362   
    #[derive(Debug, Clone)]
  404         -
    pub(crate) struct IntegerSetUnconstrained(pub(crate) std::vec::Vec<i32>);
  405         -
  406         -
    impl From<IntegerSetUnconstrained>
  407         -
        for crate::constrained::MaybeConstrained<crate::model::IntegerSet>
  408         -
    {
  409         -
        fn from(value: IntegerSetUnconstrained) -> Self {
  410         -
            Self::Unconstrained(value)
         363  +
    pub(crate) enum MyUnionUnconstrained {
         364  +
        /* UnconstrainedUnionGenerator.kt:95 */ BlobValue(::aws_smithy_types::Blob),
         365  +
        /* UnconstrainedUnionGenerator.kt:95 */ BooleanValue(bool),
         366  +
        /* UnconstrainedUnionGenerator.kt:95 */ EnumValue(::std::string::String),
         367  +
        /* UnconstrainedUnionGenerator.kt:95 */
         368  +
        ListValue(::std::vec::Vec<::std::string::String>),
         369  +
        /* UnconstrainedUnionGenerator.kt:95 */
         370  +
        MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
         371  +
        /* UnconstrainedUnionGenerator.kt:95 */ NumberValue(i32),
         372  +
        /* UnconstrainedUnionGenerator.kt:95 */
         373  +
        RenamedStructureValue(crate::model::RenamedGreeting),
         374  +
        /* UnconstrainedUnionGenerator.kt:95 */ StringValue(::std::string::String),
         375  +
        /* UnconstrainedUnionGenerator.kt:95 */
         376  +
        StructureValue(crate::model::GreetingStruct),
         377  +
        /* UnconstrainedUnionGenerator.kt:95 */
         378  +
        TimestampValue(::aws_smithy_types::DateTime),
         379  +
        /* UnconstrainedUnionGenerator.kt:82 */
  411    380   
    }
         381  +
    /* UnconstrainedUnionGenerator.kt:103 */
         382  +
    impl ::std::convert::TryFrom<MyUnionUnconstrained> for crate::model::MyUnion {
         383  +
        type Error = crate::model::my_union::ConstraintViolation;
         384  +
         385  +
        fn try_from(value: MyUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
         386  +
            Ok(
         387  +
        match value {
         388  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BlobValue(unconstrained) => Self::BlobValue(
         389  +
                unconstrained
         390  +
            ),
         391  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BooleanValue(unconstrained) => Self::BooleanValue(
         392  +
                unconstrained
         393  +
            ),
         394  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::EnumValue(unconstrained) => Self::EnumValue(
         395  +
                unconstrained
         396  +
                                        .try_into()
         397  +
                                        
         398  +
                                        
         399  +
                                        .map_err(Self::Error::EnumValue)?
         400  +
            ),
         401  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::ListValue(unconstrained) => Self::ListValue(
         402  +
                unconstrained
         403  +
            ),
         404  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::MapValue(unconstrained) => Self::MapValue(
         405  +
                unconstrained
         406  +
            ),
         407  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::NumberValue(unconstrained) => Self::NumberValue(
         408  +
                unconstrained
         409  +
            ),
         410  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::RenamedStructureValue(unconstrained) => Self::RenamedStructureValue(
         411  +
                unconstrained
         412  +
            ),
         413  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StringValue(unconstrained) => Self::StringValue(
         414  +
                unconstrained
         415  +
            ),
         416  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StructureValue(unconstrained) => Self::StructureValue(
         417  +
                unconstrained
         418  +
            ),
         419  +
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::TimestampValue(unconstrained) => Self::TimestampValue(
         420  +
                unconstrained
         421  +
            ),
  412    422   
        }
  413         -
    /* UnconstrainedCollectionGenerator.kt:97 */
  414         -
    impl std::convert::TryFrom<IntegerSetUnconstrained> for crate::model::IntegerSet {
  415         -
        /* UnconstrainedCollectionGenerator.kt:98 */
  416         -
        type Error = crate::model::integer_set::ConstraintViolation;
  417         -
        /* UnconstrainedCollectionGenerator.kt:100 */
  418         -
        fn try_from(value: IntegerSetUnconstrained) -> std::result::Result<Self, Self::Error> {
  419         -
            /* UnconstrainedCollectionGenerator.kt:185 */
  420         -
            let inner = value.0;
  421         -
            /* UnconstrainedCollectionGenerator.kt:189 */
  422         -
            Self::try_from(inner)
  423         -
            /* UnconstrainedCollectionGenerator.kt:100 */
         423  +
    )
  424    424   
        }
  425         -
        /* UnconstrainedCollectionGenerator.kt:97 */
  426    425   
    }
  427    426   
  428    427   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  429    428   
}

tmp-codegen-diff/codegen-server-test/rest_json_extras-http0x/rust-server-codegen/src/error.rs

@@ -1,1 +748,677 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(missing_docs)] // documentation missing in model
    3         -
#[derive(
    4         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5         -
)]
    6         -
pub struct ExtraError {}
    7         -
impl ExtraError {
    8         -
    #[doc(hidden)]
    9         -
    /// Returns the error name.
   10         -
    pub fn name(&self) -> &'static str {
   11         -
        "ExtraError"
   12         -
    }
   13         -
}
   14         -
impl ::std::fmt::Display for ExtraError {
   15         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   16         -
        ::std::write!(f, "ExtraError")?;
   17         -
        Ok(())
   18         -
    }
   19         -
}
   20         -
impl ::std::error::Error for ExtraError {}
   21         -
impl ExtraError {
   22         -
    /// Creates a new builder-style object to manufacture [`ExtraError`](crate::error::ExtraError).
   23         -
    pub fn builder() -> crate::error::extra_error::Builder {
   24         -
        crate::error::extra_error::Builder::default()
   25         -
    }
   26         -
}
   27         -
   28         -
/// Error type for the `HttpQueryParamsOnlyOperation` operation.
   29         -
/// Each variant represents an error that can occur for the `HttpQueryParamsOnlyOperation` operation.
           2  +
/// Error type for the `StringPayload` operation.
           3  +
/// Each variant represents an error that can occur for the `StringPayload` operation.
   30      4   
#[derive(::std::fmt::Debug)]
   31         -
pub enum HttpQueryParamsOnlyOperationError {
           5  +
pub enum StringPayloadError {
   32      6   
    #[allow(missing_docs)] // documentation missing in model
   33      7   
    ExtraError(crate::error::ExtraError),
   34      8   
}
   35         -
impl ::std::fmt::Display for HttpQueryParamsOnlyOperationError {
           9  +
impl ::std::fmt::Display for StringPayloadError {
   36     10   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   37     11   
        match &self {
   38         -
            HttpQueryParamsOnlyOperationError::ExtraError(_inner) => _inner.fmt(f),
          12  +
            StringPayloadError::ExtraError(_inner) => _inner.fmt(f),
   39     13   
        }
   40     14   
    }
   41     15   
}
   42         -
impl HttpQueryParamsOnlyOperationError {
   43         -
    /// Returns `true` if the error kind is `HttpQueryParamsOnlyOperationError::ExtraError`.
          16  +
impl StringPayloadError {
          17  +
    /// Returns `true` if the error kind is `StringPayloadError::ExtraError`.
   44     18   
    pub fn is_extra_error(&self) -> bool {
   45         -
        matches!(&self, HttpQueryParamsOnlyOperationError::ExtraError(_))
          19  +
        matches!(&self, StringPayloadError::ExtraError(_))
   46     20   
    }
   47     21   
    /// Returns the error name string by matching the correct variant.
   48     22   
    pub fn name(&self) -> &'static str {
   49     23   
        match &self {
   50         -
            HttpQueryParamsOnlyOperationError::ExtraError(_inner) => _inner.name(),
          24  +
            StringPayloadError::ExtraError(_inner) => _inner.name(),
   51     25   
        }
   52     26   
    }
   53     27   
}
   54         -
impl ::std::error::Error for HttpQueryParamsOnlyOperationError {
          28  +
impl ::std::error::Error for StringPayloadError {
   55     29   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   56     30   
        match &self {
   57         -
            HttpQueryParamsOnlyOperationError::ExtraError(_inner) => Some(_inner),
          31  +
            StringPayloadError::ExtraError(_inner) => Some(_inner),
   58     32   
        }
   59     33   
    }
   60     34   
}
   61         -
impl ::std::convert::From<crate::error::ExtraError>
   62         -
    for crate::error::HttpQueryParamsOnlyOperationError
   63         -
{
   64         -
    fn from(variant: crate::error::ExtraError) -> crate::error::HttpQueryParamsOnlyOperationError {
          35  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::StringPayloadError {
          36  +
    fn from(variant: crate::error::ExtraError) -> crate::error::StringPayloadError {
   65     37   
        Self::ExtraError(variant)
   66     38   
    }
   67     39   
}
   68     40   
   69         -
/// Error type for the `QueryPrecedence` operation.
   70         -
/// Each variant represents an error that can occur for the `QueryPrecedence` operation.
          41  +
/// Error type for the `PrimitiveIntHeader` operation.
          42  +
/// Each variant represents an error that can occur for the `PrimitiveIntHeader` operation.
   71     43   
#[derive(::std::fmt::Debug)]
   72         -
pub enum QueryPrecedenceError {
          44  +
pub enum PrimitiveIntHeaderError {
          45  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          46  +
    ValidationException(crate::error::ValidationException),
   73     47   
    #[allow(missing_docs)] // documentation missing in model
   74     48   
    ExtraError(crate::error::ExtraError),
   75     49   
}
   76         -
impl ::std::fmt::Display for QueryPrecedenceError {
          50  +
impl ::std::fmt::Display for PrimitiveIntHeaderError {
   77     51   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   78     52   
        match &self {
   79         -
            QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
          53  +
            PrimitiveIntHeaderError::ValidationException(_inner) => _inner.fmt(f),
          54  +
            PrimitiveIntHeaderError::ExtraError(_inner) => _inner.fmt(f),
   80     55   
        }
   81     56   
    }
   82     57   
}
   83         -
impl QueryPrecedenceError {
   84         -
    /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
          58  +
impl PrimitiveIntHeaderError {
          59  +
    /// Returns `true` if the error kind is `PrimitiveIntHeaderError::ValidationException`.
          60  +
    pub fn is_validation_exception(&self) -> bool {
          61  +
        matches!(&self, PrimitiveIntHeaderError::ValidationException(_))
          62  +
    }
          63  +
    /// Returns `true` if the error kind is `PrimitiveIntHeaderError::ExtraError`.
   85     64   
    pub fn is_extra_error(&self) -> bool {
   86         -
        matches!(&self, QueryPrecedenceError::ExtraError(_))
          65  +
        matches!(&self, PrimitiveIntHeaderError::ExtraError(_))
   87     66   
    }
   88     67   
    /// Returns the error name string by matching the correct variant.
   89     68   
    pub fn name(&self) -> &'static str {
   90     69   
        match &self {
   91         -
            QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
          70  +
            PrimitiveIntHeaderError::ValidationException(_inner) => _inner.name(),
          71  +
            PrimitiveIntHeaderError::ExtraError(_inner) => _inner.name(),
   92     72   
        }
   93     73   
    }
   94     74   
}
   95         -
impl ::std::error::Error for QueryPrecedenceError {
          75  +
impl ::std::error::Error for PrimitiveIntHeaderError {
   96     76   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   97     77   
        match &self {
   98         -
            QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
          78  +
            PrimitiveIntHeaderError::ValidationException(_inner) => Some(_inner),
          79  +
            PrimitiveIntHeaderError::ExtraError(_inner) => Some(_inner),
   99     80   
        }
  100     81   
    }
  101     82   
}
  102         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
  103         -
    fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
          83  +
impl ::std::convert::From<crate::error::ValidationException>
          84  +
    for crate::error::PrimitiveIntHeaderError
          85  +
{
          86  +
    fn from(variant: crate::error::ValidationException) -> crate::error::PrimitiveIntHeaderError {
          87  +
        Self::ValidationException(variant)
          88  +
    }
          89  +
}
          90  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::PrimitiveIntHeaderError {
          91  +
    fn from(variant: crate::error::ExtraError) -> crate::error::PrimitiveIntHeaderError {
  104     92   
        Self::ExtraError(variant)
  105     93   
    }
  106     94   
}
  107     95   
  108         -
/// Error type for the `EmptyStructWithContentOnWireOp` operation.
  109         -
/// Each variant represents an error that can occur for the `EmptyStructWithContentOnWireOp` operation.
          96  +
/// Error type for the `EnumQuery` operation.
          97  +
/// Each variant represents an error that can occur for the `EnumQuery` operation.
  110     98   
#[derive(::std::fmt::Debug)]
  111         -
pub enum EmptyStructWithContentOnWireOpError {
          99  +
pub enum EnumQueryError {
         100  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         101  +
    ValidationException(crate::error::ValidationException),
  112    102   
    #[allow(missing_docs)] // documentation missing in model
  113    103   
    ExtraError(crate::error::ExtraError),
  114    104   
}
  115         -
impl ::std::fmt::Display for EmptyStructWithContentOnWireOpError {
         105  +
impl ::std::fmt::Display for EnumQueryError {
  116    106   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  117    107   
        match &self {
  118         -
            EmptyStructWithContentOnWireOpError::ExtraError(_inner) => _inner.fmt(f),
         108  +
            EnumQueryError::ValidationException(_inner) => _inner.fmt(f),
         109  +
            EnumQueryError::ExtraError(_inner) => _inner.fmt(f),
  119    110   
        }
  120    111   
    }
  121    112   
}
  122         -
impl EmptyStructWithContentOnWireOpError {
  123         -
    /// Returns `true` if the error kind is `EmptyStructWithContentOnWireOpError::ExtraError`.
         113  +
impl EnumQueryError {
         114  +
    /// Returns `true` if the error kind is `EnumQueryError::ValidationException`.
         115  +
    pub fn is_validation_exception(&self) -> bool {
         116  +
        matches!(&self, EnumQueryError::ValidationException(_))
         117  +
    }
         118  +
    /// Returns `true` if the error kind is `EnumQueryError::ExtraError`.
  124    119   
    pub fn is_extra_error(&self) -> bool {
  125         -
        matches!(&self, EmptyStructWithContentOnWireOpError::ExtraError(_))
         120  +
        matches!(&self, EnumQueryError::ExtraError(_))
  126    121   
    }
  127    122   
    /// Returns the error name string by matching the correct variant.
  128    123   
    pub fn name(&self) -> &'static str {
  129    124   
        match &self {
  130         -
            EmptyStructWithContentOnWireOpError::ExtraError(_inner) => _inner.name(),
         125  +
            EnumQueryError::ValidationException(_inner) => _inner.name(),
         126  +
            EnumQueryError::ExtraError(_inner) => _inner.name(),
  131    127   
        }
  132    128   
    }
  133    129   
}
  134         -
impl ::std::error::Error for EmptyStructWithContentOnWireOpError {
         130  +
impl ::std::error::Error for EnumQueryError {
  135    131   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  136    132   
        match &self {
  137         -
            EmptyStructWithContentOnWireOpError::ExtraError(_inner) => Some(_inner),
         133  +
            EnumQueryError::ValidationException(_inner) => Some(_inner),
         134  +
            EnumQueryError::ExtraError(_inner) => Some(_inner),
  138    135   
        }
  139    136   
    }
  140    137   
}
  141         -
impl ::std::convert::From<crate::error::ExtraError>
  142         -
    for crate::error::EmptyStructWithContentOnWireOpError
  143         -
{
  144         -
    fn from(
  145         -
        variant: crate::error::ExtraError,
  146         -
    ) -> crate::error::EmptyStructWithContentOnWireOpError {
         138  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::EnumQueryError {
         139  +
    fn from(variant: crate::error::ValidationException) -> crate::error::EnumQueryError {
         140  +
        Self::ValidationException(variant)
         141  +
    }
         142  +
}
         143  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::EnumQueryError {
         144  +
    fn from(variant: crate::error::ExtraError) -> crate::error::EnumQueryError {
  147    145   
        Self::ExtraError(variant)
  148    146   
    }
  149    147   
}
  150    148   
  151         -
/// Error type for the `CaseInsensitiveErrorOperation` operation.
  152         -
/// Each variant represents an error that can occur for the `CaseInsensitiveErrorOperation` operation.
         149  +
/// Error type for the `StatusResponse` operation.
         150  +
/// Each variant represents an error that can occur for the `StatusResponse` operation.
  153    151   
#[derive(::std::fmt::Debug)]
  154         -
pub enum CaseInsensitiveErrorOperationError {
  155         -
    #[allow(missing_docs)] // documentation missing in model
  156         -
    CaseInsensitiveError(crate::error::CaseInsensitiveError),
         152  +
pub enum StatusResponseError {
  157    153   
    #[allow(missing_docs)] // documentation missing in model
  158    154   
    ExtraError(crate::error::ExtraError),
  159    155   
}
  160         -
impl ::std::fmt::Display for CaseInsensitiveErrorOperationError {
         156  +
impl ::std::fmt::Display for StatusResponseError {
  161    157   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  162    158   
        match &self {
  163         -
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => _inner.fmt(f),
  164         -
            CaseInsensitiveErrorOperationError::ExtraError(_inner) => _inner.fmt(f),
         159  +
            StatusResponseError::ExtraError(_inner) => _inner.fmt(f),
  165    160   
        }
  166    161   
    }
  167    162   
}
  168         -
impl CaseInsensitiveErrorOperationError {
  169         -
    /// Returns `true` if the error kind is `CaseInsensitiveErrorOperationError::CaseInsensitiveError`.
  170         -
    pub fn is_case_insensitive_error(&self) -> bool {
  171         -
        matches!(
  172         -
            &self,
  173         -
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_)
  174         -
        )
  175         -
    }
  176         -
    /// Returns `true` if the error kind is `CaseInsensitiveErrorOperationError::ExtraError`.
         163  +
impl StatusResponseError {
         164  +
    /// Returns `true` if the error kind is `StatusResponseError::ExtraError`.
  177    165   
    pub fn is_extra_error(&self) -> bool {
  178         -
        matches!(&self, CaseInsensitiveErrorOperationError::ExtraError(_))
         166  +
        matches!(&self, StatusResponseError::ExtraError(_))
  179    167   
    }
  180    168   
    /// Returns the error name string by matching the correct variant.
  181    169   
    pub fn name(&self) -> &'static str {
  182    170   
        match &self {
  183         -
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => _inner.name(),
  184         -
            CaseInsensitiveErrorOperationError::ExtraError(_inner) => _inner.name(),
         171  +
            StatusResponseError::ExtraError(_inner) => _inner.name(),
  185    172   
        }
  186    173   
    }
  187    174   
}
  188         -
impl ::std::error::Error for CaseInsensitiveErrorOperationError {
         175  +
impl ::std::error::Error for StatusResponseError {
  189    176   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  190    177   
        match &self {
  191         -
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => Some(_inner),
  192         -
            CaseInsensitiveErrorOperationError::ExtraError(_inner) => Some(_inner),
  193         -
        }
         178  +
            StatusResponseError::ExtraError(_inner) => Some(_inner),
  194    179   
        }
  195         -
}
  196         -
impl ::std::convert::From<crate::error::CaseInsensitiveError>
  197         -
    for crate::error::CaseInsensitiveErrorOperationError
  198         -
{
  199         -
    fn from(
  200         -
        variant: crate::error::CaseInsensitiveError,
  201         -
    ) -> crate::error::CaseInsensitiveErrorOperationError {
  202         -
        Self::CaseInsensitiveError(variant)
  203    180   
    }
  204    181   
}
  205         -
impl ::std::convert::From<crate::error::ExtraError>
  206         -
    for crate::error::CaseInsensitiveErrorOperationError
  207         -
{
  208         -
    fn from(variant: crate::error::ExtraError) -> crate::error::CaseInsensitiveErrorOperationError {
         182  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::StatusResponseError {
         183  +
    fn from(variant: crate::error::ExtraError) -> crate::error::StatusResponseError {
  209    184   
        Self::ExtraError(variant)
  210    185   
    }
  211    186   
}
  212    187   
  213         -
#[allow(missing_docs)] // documentation missing in model
  214         -
#[derive(
  215         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  216         -
)]
  217         -
pub struct CaseInsensitiveError {
         188  +
/// Error type for the `MapWithEnumKeyOp` operation.
         189  +
/// Each variant represents an error that can occur for the `MapWithEnumKeyOp` operation.
         190  +
#[derive(::std::fmt::Debug)]
         191  +
pub enum MapWithEnumKeyOpError {
         192  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         193  +
    ValidationException(crate::error::ValidationException),
  218    194   
    #[allow(missing_docs)] // documentation missing in model
  219         -
    pub message: ::std::option::Option<::std::string::String>,
         195  +
    ExtraError(crate::error::ExtraError),
  220    196   
}
  221         -
impl CaseInsensitiveError {
  222         -
    /// Returns the error message.
  223         -
    pub fn message(&self) -> ::std::option::Option<&str> {
  224         -
        self.message.as_deref()
         197  +
impl ::std::fmt::Display for MapWithEnumKeyOpError {
         198  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         199  +
        match &self {
         200  +
            MapWithEnumKeyOpError::ValidationException(_inner) => _inner.fmt(f),
         201  +
            MapWithEnumKeyOpError::ExtraError(_inner) => _inner.fmt(f),
  225    202   
        }
  226         -
    #[doc(hidden)]
  227         -
    /// Returns the error name.
         203  +
    }
         204  +
}
         205  +
impl MapWithEnumKeyOpError {
         206  +
    /// Returns `true` if the error kind is `MapWithEnumKeyOpError::ValidationException`.
         207  +
    pub fn is_validation_exception(&self) -> bool {
         208  +
        matches!(&self, MapWithEnumKeyOpError::ValidationException(_))
         209  +
    }
         210  +
    /// Returns `true` if the error kind is `MapWithEnumKeyOpError::ExtraError`.
         211  +
    pub fn is_extra_error(&self) -> bool {
         212  +
        matches!(&self, MapWithEnumKeyOpError::ExtraError(_))
         213  +
    }
         214  +
    /// Returns the error name string by matching the correct variant.
  228    215   
    pub fn name(&self) -> &'static str {
  229         -
        "CaseInsensitiveError"
         216  +
        match &self {
         217  +
            MapWithEnumKeyOpError::ValidationException(_inner) => _inner.name(),
         218  +
            MapWithEnumKeyOpError::ExtraError(_inner) => _inner.name(),
         219  +
        }
  230    220   
    }
  231    221   
}
  232         -
impl ::std::fmt::Display for CaseInsensitiveError {
  233         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  234         -
        ::std::write!(f, "CaseInsensitiveError")?;
  235         -
        if let ::std::option::Option::Some(inner_1) = &self.message {
  236         -
            {
  237         -
                ::std::write!(f, ": {inner_1}")?;
         222  +
impl ::std::error::Error for MapWithEnumKeyOpError {
         223  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         224  +
        match &self {
         225  +
            MapWithEnumKeyOpError::ValidationException(_inner) => Some(_inner),
         226  +
            MapWithEnumKeyOpError::ExtraError(_inner) => Some(_inner),
  238    227   
        }
  239    228   
    }
  240         -
        Ok(())
         229  +
}
         230  +
impl ::std::convert::From<crate::error::ValidationException>
         231  +
    for crate::error::MapWithEnumKeyOpError
         232  +
{
         233  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MapWithEnumKeyOpError {
         234  +
        Self::ValidationException(variant)
  241    235   
    }
  242    236   
}
  243         -
impl ::std::error::Error for CaseInsensitiveError {}
  244         -
impl CaseInsensitiveError {
  245         -
    /// Creates a new builder-style object to manufacture [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
  246         -
    pub fn builder() -> crate::error::case_insensitive_error::Builder {
  247         -
        crate::error::case_insensitive_error::Builder::default()
         237  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::MapWithEnumKeyOpError {
         238  +
    fn from(variant: crate::error::ExtraError) -> crate::error::MapWithEnumKeyOpError {
         239  +
        Self::ExtraError(variant)
  248    240   
    }
  249    241   
}
  250    242   
  251         -
/// Error type for the `NullInNonSparse` operation.
  252         -
/// Each variant represents an error that can occur for the `NullInNonSparse` operation.
         243  +
/// Error type for the `PrimitiveIntOp` operation.
         244  +
/// Each variant represents an error that can occur for the `PrimitiveIntOp` operation.
  253    245   
#[derive(::std::fmt::Debug)]
  254         -
pub enum NullInNonSparseError {
         246  +
pub enum PrimitiveIntOpError {
  255    247   
    #[allow(missing_docs)] // documentation missing in model
  256    248   
    ExtraError(crate::error::ExtraError),
  257    249   
}
  258         -
impl ::std::fmt::Display for NullInNonSparseError {
         250  +
impl ::std::fmt::Display for PrimitiveIntOpError {
  259    251   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  260    252   
        match &self {
  261         -
            NullInNonSparseError::ExtraError(_inner) => _inner.fmt(f),
         253  +
            PrimitiveIntOpError::ExtraError(_inner) => _inner.fmt(f),
  262    254   
        }
  263    255   
    }
  264    256   
}
  265         -
impl NullInNonSparseError {
  266         -
    /// Returns `true` if the error kind is `NullInNonSparseError::ExtraError`.
         257  +
impl PrimitiveIntOpError {
         258  +
    /// Returns `true` if the error kind is `PrimitiveIntOpError::ExtraError`.
  267    259   
    pub fn is_extra_error(&self) -> bool {
  268         -
        matches!(&self, NullInNonSparseError::ExtraError(_))
         260  +
        matches!(&self, PrimitiveIntOpError::ExtraError(_))
  269    261   
    }
  270    262   
    /// Returns the error name string by matching the correct variant.
  271    263   
    pub fn name(&self) -> &'static str {
  272    264   
        match &self {
  273         -
            NullInNonSparseError::ExtraError(_inner) => _inner.name(),
         265  +
            PrimitiveIntOpError::ExtraError(_inner) => _inner.name(),
  274    266   
        }
  275    267   
    }
  276    268   
}
  277         -
impl ::std::error::Error for NullInNonSparseError {
         269  +
impl ::std::error::Error for PrimitiveIntOpError {
  278    270   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  279    271   
        match &self {
  280         -
            NullInNonSparseError::ExtraError(_inner) => Some(_inner),
         272  +
            PrimitiveIntOpError::ExtraError(_inner) => Some(_inner),
  281    273   
        }
  282    274   
    }
  283    275   
}
  284         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::NullInNonSparseError {
  285         -
    fn from(variant: crate::error::ExtraError) -> crate::error::NullInNonSparseError {
         276  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::PrimitiveIntOpError {
         277  +
    fn from(variant: crate::error::ExtraError) -> crate::error::PrimitiveIntOpError {
  286    278   
        Self::ExtraError(variant)
  287    279   
    }
  288    280   
}
  289    281   
  290    282   
/// Error type for the `EscapedStringValues` operation.
  291    283   
/// Each variant represents an error that can occur for the `EscapedStringValues` operation.
  292    284   
#[derive(::std::fmt::Debug)]
  293    285   
pub enum EscapedStringValuesError {
  294    286   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  295    287   
    ValidationException(crate::error::ValidationException),
  296    288   
    #[allow(missing_docs)] // documentation missing in model
  297    289   
    ExtraError(crate::error::ExtraError),
  298    290   
}
  299    291   
impl ::std::fmt::Display for EscapedStringValuesError {
  300    292   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  301    293   
        match &self {
  302    294   
            EscapedStringValuesError::ValidationException(_inner) => _inner.fmt(f),
  303    295   
            EscapedStringValuesError::ExtraError(_inner) => _inner.fmt(f),
  304    296   
        }
  305    297   
    }
  306    298   
}
  307    299   
impl EscapedStringValuesError {
  308    300   
    /// Returns `true` if the error kind is `EscapedStringValuesError::ValidationException`.
  309    301   
    pub fn is_validation_exception(&self) -> bool {
  310    302   
        matches!(&self, EscapedStringValuesError::ValidationException(_))
  311    303   
    }
  312    304   
    /// Returns `true` if the error kind is `EscapedStringValuesError::ExtraError`.
  313    305   
    pub fn is_extra_error(&self) -> bool {
  314    306   
        matches!(&self, EscapedStringValuesError::ExtraError(_))
  315    307   
    }
  316    308   
    /// Returns the error name string by matching the correct variant.
  317    309   
    pub fn name(&self) -> &'static str {
  318    310   
        match &self {
  319    311   
            EscapedStringValuesError::ValidationException(_inner) => _inner.name(),
  320    312   
            EscapedStringValuesError::ExtraError(_inner) => _inner.name(),
  321    313   
        }
  322    314   
    }
  323    315   
}
  324    316   
impl ::std::error::Error for EscapedStringValuesError {
  325    317   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  326    318   
        match &self {
  327    319   
            EscapedStringValuesError::ValidationException(_inner) => Some(_inner),
  328    320   
            EscapedStringValuesError::ExtraError(_inner) => Some(_inner),
  329    321   
        }
  330    322   
    }
  331    323   
}
  332    324   
impl ::std::convert::From<crate::error::ValidationException>
  333    325   
    for crate::error::EscapedStringValuesError
  334    326   
{
  335    327   
    fn from(variant: crate::error::ValidationException) -> crate::error::EscapedStringValuesError {
  336    328   
        Self::ValidationException(variant)
  337    329   
    }
  338    330   
}
  339    331   
impl ::std::convert::From<crate::error::ExtraError> for crate::error::EscapedStringValuesError {
  340    332   
    fn from(variant: crate::error::ExtraError) -> crate::error::EscapedStringValuesError {
  341    333   
        Self::ExtraError(variant)
  342    334   
    }
  343    335   
}
  344    336   
  345         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  346         -
#[derive(
  347         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  348         -
)]
  349         -
pub struct ValidationException {
  350         -
    /// A summary of the validation failure.
  351         -
    pub message: ::std::string::String,
  352         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
  353         -
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  354         -
}
  355         -
impl ValidationException {
  356         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
  357         -
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
  358         -
        self.field_list.as_deref()
  359         -
    }
  360         -
}
  361         -
impl ValidationException {
  362         -
    /// Returns the error message.
  363         -
    pub fn message(&self) -> &str {
  364         -
        &self.message
  365         -
    }
  366         -
    #[doc(hidden)]
  367         -
    /// Returns the error name.
  368         -
    pub fn name(&self) -> &'static str {
  369         -
        "ValidationException"
  370         -
    }
  371         -
}
  372         -
impl ::std::fmt::Display for ValidationException {
  373         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  374         -
        ::std::write!(f, "ValidationException")?;
  375         -
        {
  376         -
            ::std::write!(f, ": {}", &self.message)?;
  377         -
        }
  378         -
        Ok(())
  379         -
    }
  380         -
}
  381         -
impl ::std::error::Error for ValidationException {}
  382         -
impl ValidationException {
  383         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
  384         -
    pub fn builder() -> crate::error::validation_exception::Builder {
  385         -
        crate::error::validation_exception::Builder::default()
  386         -
    }
  387         -
}
  388         -
  389         -
/// Error type for the `PrimitiveIntOp` operation.
  390         -
/// Each variant represents an error that can occur for the `PrimitiveIntOp` operation.
         337  +
/// Error type for the `NullInNonSparse` operation.
         338  +
/// Each variant represents an error that can occur for the `NullInNonSparse` operation.
  391    339   
#[derive(::std::fmt::Debug)]
  392         -
pub enum PrimitiveIntOpError {
         340  +
pub enum NullInNonSparseError {
  393    341   
    #[allow(missing_docs)] // documentation missing in model
  394    342   
    ExtraError(crate::error::ExtraError),
  395    343   
}
  396         -
impl ::std::fmt::Display for PrimitiveIntOpError {
         344  +
impl ::std::fmt::Display for NullInNonSparseError {
  397    345   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  398    346   
        match &self {
  399         -
            PrimitiveIntOpError::ExtraError(_inner) => _inner.fmt(f),
         347  +
            NullInNonSparseError::ExtraError(_inner) => _inner.fmt(f),
  400    348   
        }
  401    349   
    }
  402    350   
}
  403         -
impl PrimitiveIntOpError {
  404         -
    /// Returns `true` if the error kind is `PrimitiveIntOpError::ExtraError`.
         351  +
impl NullInNonSparseError {
         352  +
    /// Returns `true` if the error kind is `NullInNonSparseError::ExtraError`.
  405    353   
    pub fn is_extra_error(&self) -> bool {
  406         -
        matches!(&self, PrimitiveIntOpError::ExtraError(_))
         354  +
        matches!(&self, NullInNonSparseError::ExtraError(_))
  407    355   
    }
  408    356   
    /// Returns the error name string by matching the correct variant.
  409    357   
    pub fn name(&self) -> &'static str {
  410    358   
        match &self {
  411         -
            PrimitiveIntOpError::ExtraError(_inner) => _inner.name(),
         359  +
            NullInNonSparseError::ExtraError(_inner) => _inner.name(),
  412    360   
        }
  413    361   
    }
  414    362   
}
  415         -
impl ::std::error::Error for PrimitiveIntOpError {
         363  +
impl ::std::error::Error for NullInNonSparseError {
  416    364   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  417    365   
        match &self {
  418         -
            PrimitiveIntOpError::ExtraError(_inner) => Some(_inner),
         366  +
            NullInNonSparseError::ExtraError(_inner) => Some(_inner),
  419    367   
        }
  420    368   
    }
  421    369   
}
  422         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::PrimitiveIntOpError {
  423         -
    fn from(variant: crate::error::ExtraError) -> crate::error::PrimitiveIntOpError {
         370  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::NullInNonSparseError {
         371  +
    fn from(variant: crate::error::ExtraError) -> crate::error::NullInNonSparseError {
  424    372   
        Self::ExtraError(variant)
  425    373   
    }
  426    374   
}
  427    375   
  428         -
/// Error type for the `MapWithEnumKeyOp` operation.
  429         -
/// Each variant represents an error that can occur for the `MapWithEnumKeyOp` operation.
         376  +
/// Error type for the `CaseInsensitiveErrorOperation` operation.
         377  +
/// Each variant represents an error that can occur for the `CaseInsensitiveErrorOperation` operation.
  430    378   
#[derive(::std::fmt::Debug)]
  431         -
pub enum MapWithEnumKeyOpError {
  432         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  433         -
    ValidationException(crate::error::ValidationException),
         379  +
pub enum CaseInsensitiveErrorOperationError {
         380  +
    #[allow(missing_docs)] // documentation missing in model
         381  +
    CaseInsensitiveError(crate::error::CaseInsensitiveError),
  434    382   
    #[allow(missing_docs)] // documentation missing in model
  435    383   
    ExtraError(crate::error::ExtraError),
  436    384   
}
  437         -
impl ::std::fmt::Display for MapWithEnumKeyOpError {
         385  +
impl ::std::fmt::Display for CaseInsensitiveErrorOperationError {
  438    386   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  439    387   
        match &self {
  440         -
            MapWithEnumKeyOpError::ValidationException(_inner) => _inner.fmt(f),
  441         -
            MapWithEnumKeyOpError::ExtraError(_inner) => _inner.fmt(f),
         388  +
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => _inner.fmt(f),
         389  +
            CaseInsensitiveErrorOperationError::ExtraError(_inner) => _inner.fmt(f),
  442    390   
        }
  443    391   
    }
  444    392   
}
  445         -
impl MapWithEnumKeyOpError {
  446         -
    /// Returns `true` if the error kind is `MapWithEnumKeyOpError::ValidationException`.
  447         -
    pub fn is_validation_exception(&self) -> bool {
  448         -
        matches!(&self, MapWithEnumKeyOpError::ValidationException(_))
         393  +
impl CaseInsensitiveErrorOperationError {
         394  +
    /// Returns `true` if the error kind is `CaseInsensitiveErrorOperationError::CaseInsensitiveError`.
         395  +
    pub fn is_case_insensitive_error(&self) -> bool {
         396  +
        matches!(
         397  +
            &self,
         398  +
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_)
         399  +
        )
  449    400   
    }
  450         -
    /// Returns `true` if the error kind is `MapWithEnumKeyOpError::ExtraError`.
         401  +
    /// Returns `true` if the error kind is `CaseInsensitiveErrorOperationError::ExtraError`.
  451    402   
    pub fn is_extra_error(&self) -> bool {
  452         -
        matches!(&self, MapWithEnumKeyOpError::ExtraError(_))
         403  +
        matches!(&self, CaseInsensitiveErrorOperationError::ExtraError(_))
  453    404   
    }
  454    405   
    /// Returns the error name string by matching the correct variant.
  455    406   
    pub fn name(&self) -> &'static str {
  456    407   
        match &self {
  457         -
            MapWithEnumKeyOpError::ValidationException(_inner) => _inner.name(),
  458         -
            MapWithEnumKeyOpError::ExtraError(_inner) => _inner.name(),
         408  +
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => _inner.name(),
         409  +
            CaseInsensitiveErrorOperationError::ExtraError(_inner) => _inner.name(),
  459    410   
        }
  460    411   
    }
  461    412   
}
  462         -
impl ::std::error::Error for MapWithEnumKeyOpError {
         413  +
impl ::std::error::Error for CaseInsensitiveErrorOperationError {
  463    414   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  464    415   
        match &self {
  465         -
            MapWithEnumKeyOpError::ValidationException(_inner) => Some(_inner),
  466         -
            MapWithEnumKeyOpError::ExtraError(_inner) => Some(_inner),
         416  +
            CaseInsensitiveErrorOperationError::CaseInsensitiveError(_inner) => Some(_inner),
         417  +
            CaseInsensitiveErrorOperationError::ExtraError(_inner) => Some(_inner),
  467    418   
        }
  468    419   
    }
  469    420   
}
  470         -
impl ::std::convert::From<crate::error::ValidationException>
  471         -
    for crate::error::MapWithEnumKeyOpError
         421  +
impl ::std::convert::From<crate::error::CaseInsensitiveError>
         422  +
    for crate::error::CaseInsensitiveErrorOperationError
  472    423   
{
  473         -
    fn from(variant: crate::error::ValidationException) -> crate::error::MapWithEnumKeyOpError {
  474         -
        Self::ValidationException(variant)
  475         -
    }
  476         -
}
  477         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::MapWithEnumKeyOpError {
  478         -
    fn from(variant: crate::error::ExtraError) -> crate::error::MapWithEnumKeyOpError {
  479         -
        Self::ExtraError(variant)
  480         -
    }
  481         -
}
  482         -
  483         -
/// Error type for the `StatusResponse` operation.
  484         -
/// Each variant represents an error that can occur for the `StatusResponse` operation.
  485         -
#[derive(::std::fmt::Debug)]
  486         -
pub enum StatusResponseError {
  487         -
    #[allow(missing_docs)] // documentation missing in model
  488         -
    ExtraError(crate::error::ExtraError),
  489         -
}
  490         -
impl ::std::fmt::Display for StatusResponseError {
  491         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  492         -
        match &self {
  493         -
            StatusResponseError::ExtraError(_inner) => _inner.fmt(f),
  494         -
        }
  495         -
    }
  496         -
}
  497         -
impl StatusResponseError {
  498         -
    /// Returns `true` if the error kind is `StatusResponseError::ExtraError`.
  499         -
    pub fn is_extra_error(&self) -> bool {
  500         -
        matches!(&self, StatusResponseError::ExtraError(_))
  501         -
    }
  502         -
    /// Returns the error name string by matching the correct variant.
  503         -
    pub fn name(&self) -> &'static str {
  504         -
        match &self {
  505         -
            StatusResponseError::ExtraError(_inner) => _inner.name(),
  506         -
        }
  507         -
    }
  508         -
}
  509         -
impl ::std::error::Error for StatusResponseError {
  510         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  511         -
        match &self {
  512         -
            StatusResponseError::ExtraError(_inner) => Some(_inner),
  513         -
        }
         424  +
    fn from(
         425  +
        variant: crate::error::CaseInsensitiveError,
         426  +
    ) -> crate::error::CaseInsensitiveErrorOperationError {
         427  +
        Self::CaseInsensitiveError(variant)
  514    428   
    }
  515    429   
}
  516         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::StatusResponseError {
  517         -
    fn from(variant: crate::error::ExtraError) -> crate::error::StatusResponseError {
         430  +
impl ::std::convert::From<crate::error::ExtraError>
         431  +
    for crate::error::CaseInsensitiveErrorOperationError
         432  +
{
         433  +
    fn from(variant: crate::error::ExtraError) -> crate::error::CaseInsensitiveErrorOperationError {
  518    434   
        Self::ExtraError(variant)
  519    435   
    }
  520    436   
}
  521    437   
  522         -
/// Error type for the `EnumQuery` operation.
  523         -
/// Each variant represents an error that can occur for the `EnumQuery` operation.
  524         -
#[derive(::std::fmt::Debug)]
  525         -
pub enum EnumQueryError {
  526         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  527         -
    ValidationException(crate::error::ValidationException),
         438  +
/// Error type for the `EmptyStructWithContentOnWireOp` operation.
         439  +
/// Each variant represents an error that can occur for the `EmptyStructWithContentOnWireOp` operation.
         440  +
#[derive(::std::fmt::Debug)]
         441  +
pub enum EmptyStructWithContentOnWireOpError {
  528    442   
    #[allow(missing_docs)] // documentation missing in model
  529    443   
    ExtraError(crate::error::ExtraError),
  530    444   
}
  531         -
impl ::std::fmt::Display for EnumQueryError {
         445  +
impl ::std::fmt::Display for EmptyStructWithContentOnWireOpError {
  532    446   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  533    447   
        match &self {
  534         -
            EnumQueryError::ValidationException(_inner) => _inner.fmt(f),
  535         -
            EnumQueryError::ExtraError(_inner) => _inner.fmt(f),
         448  +
            EmptyStructWithContentOnWireOpError::ExtraError(_inner) => _inner.fmt(f),
  536    449   
        }
  537    450   
    }
  538    451   
}
  539         -
impl EnumQueryError {
  540         -
    /// Returns `true` if the error kind is `EnumQueryError::ValidationException`.
  541         -
    pub fn is_validation_exception(&self) -> bool {
  542         -
        matches!(&self, EnumQueryError::ValidationException(_))
  543         -
    }
  544         -
    /// Returns `true` if the error kind is `EnumQueryError::ExtraError`.
         452  +
impl EmptyStructWithContentOnWireOpError {
         453  +
    /// Returns `true` if the error kind is `EmptyStructWithContentOnWireOpError::ExtraError`.
  545    454   
    pub fn is_extra_error(&self) -> bool {
  546         -
        matches!(&self, EnumQueryError::ExtraError(_))
         455  +
        matches!(&self, EmptyStructWithContentOnWireOpError::ExtraError(_))
  547    456   
    }
  548    457   
    /// Returns the error name string by matching the correct variant.
  549    458   
    pub fn name(&self) -> &'static str {
  550    459   
        match &self {
  551         -
            EnumQueryError::ValidationException(_inner) => _inner.name(),
  552         -
            EnumQueryError::ExtraError(_inner) => _inner.name(),
         460  +
            EmptyStructWithContentOnWireOpError::ExtraError(_inner) => _inner.name(),
  553    461   
        }
  554    462   
    }
  555    463   
}
  556         -
impl ::std::error::Error for EnumQueryError {
         464  +
impl ::std::error::Error for EmptyStructWithContentOnWireOpError {
  557    465   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  558    466   
        match &self {
  559         -
            EnumQueryError::ValidationException(_inner) => Some(_inner),
  560         -
            EnumQueryError::ExtraError(_inner) => Some(_inner),
  561         -
        }
         467  +
            EmptyStructWithContentOnWireOpError::ExtraError(_inner) => Some(_inner),
  562    468   
        }
  563         -
}
  564         -
impl ::std::convert::From<crate::error::ValidationException> for crate::error::EnumQueryError {
  565         -
    fn from(variant: crate::error::ValidationException) -> crate::error::EnumQueryError {
  566         -
        Self::ValidationException(variant)
  567    469   
    }
  568    470   
}
  569         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::EnumQueryError {
  570         -
    fn from(variant: crate::error::ExtraError) -> crate::error::EnumQueryError {
         471  +
impl ::std::convert::From<crate::error::ExtraError>
         472  +
    for crate::error::EmptyStructWithContentOnWireOpError
         473  +
{
         474  +
    fn from(
         475  +
        variant: crate::error::ExtraError,
         476  +
    ) -> crate::error::EmptyStructWithContentOnWireOpError {
  571    477   
        Self::ExtraError(variant)
  572    478   
    }
  573    479   
}
  574    480   
  575         -
/// Error type for the `PrimitiveIntHeader` operation.
  576         -
/// Each variant represents an error that can occur for the `PrimitiveIntHeader` operation.
         481  +
/// Error type for the `QueryPrecedence` operation.
         482  +
/// Each variant represents an error that can occur for the `QueryPrecedence` operation.
  577    483   
#[derive(::std::fmt::Debug)]
  578         -
pub enum PrimitiveIntHeaderError {
  579         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  580         -
    ValidationException(crate::error::ValidationException),
         484  +
pub enum QueryPrecedenceError {
  581    485   
    #[allow(missing_docs)] // documentation missing in model
  582    486   
    ExtraError(crate::error::ExtraError),
  583    487   
}
  584         -
impl ::std::fmt::Display for PrimitiveIntHeaderError {
         488  +
impl ::std::fmt::Display for QueryPrecedenceError {
  585    489   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  586    490   
        match &self {
  587         -
            PrimitiveIntHeaderError::ValidationException(_inner) => _inner.fmt(f),
  588         -
            PrimitiveIntHeaderError::ExtraError(_inner) => _inner.fmt(f),
         491  +
            QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
  589    492   
        }
  590    493   
    }
  591    494   
}
  592         -
impl PrimitiveIntHeaderError {
  593         -
    /// Returns `true` if the error kind is `PrimitiveIntHeaderError::ValidationException`.
  594         -
    pub fn is_validation_exception(&self) -> bool {
  595         -
        matches!(&self, PrimitiveIntHeaderError::ValidationException(_))
  596         -
    }
  597         -
    /// Returns `true` if the error kind is `PrimitiveIntHeaderError::ExtraError`.
         495  +
impl QueryPrecedenceError {
         496  +
    /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
  598    497   
    pub fn is_extra_error(&self) -> bool {
  599         -
        matches!(&self, PrimitiveIntHeaderError::ExtraError(_))
         498  +
        matches!(&self, QueryPrecedenceError::ExtraError(_))
  600    499   
    }
  601    500   
    /// Returns the error name string by matching the correct variant.
  602    501   
    pub fn name(&self) -> &'static str {
  603    502   
        match &self {
  604         -
            PrimitiveIntHeaderError::ValidationException(_inner) => _inner.name(),
  605         -
            PrimitiveIntHeaderError::ExtraError(_inner) => _inner.name(),
         503  +
            QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
  606    504   
        }
  607    505   
    }
  608    506   
}
  609         -
impl ::std::error::Error for PrimitiveIntHeaderError {
         507  +
impl ::std::error::Error for QueryPrecedenceError {
  610    508   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  611    509   
        match &self {
  612         -
            PrimitiveIntHeaderError::ValidationException(_inner) => Some(_inner),
  613         -
            PrimitiveIntHeaderError::ExtraError(_inner) => Some(_inner),
  614         -
        }
         510  +
            QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
  615    511   
        }
  616         -
}
  617         -
impl ::std::convert::From<crate::error::ValidationException>
  618         -
    for crate::error::PrimitiveIntHeaderError
  619         -
{
  620         -
    fn from(variant: crate::error::ValidationException) -> crate::error::PrimitiveIntHeaderError {
  621         -
        Self::ValidationException(variant)
  622    512   
    }
  623    513   
}
  624         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::PrimitiveIntHeaderError {
  625         -
    fn from(variant: crate::error::ExtraError) -> crate::error::PrimitiveIntHeaderError {
         514  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
         515  +
    fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
  626    516   
        Self::ExtraError(variant)
  627    517   
    }
  628    518   
}
  629    519   
  630         -
/// Error type for the `StringPayload` operation.
  631         -
/// Each variant represents an error that can occur for the `StringPayload` operation.
  632         -
#[derive(::std::fmt::Debug)]
  633         -
pub enum StringPayloadError {
  634         -
    #[allow(missing_docs)] // documentation missing in model
  635         -
    ExtraError(crate::error::ExtraError),
         520  +
#[allow(missing_docs)] // documentation missing in model
         521  +
#[derive(
         522  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         523  +
)]
         524  +
pub struct ExtraError {}
         525  +
impl ExtraError {
         526  +
    #[doc(hidden)]
         527  +
    /// Returns the error name.
         528  +
    pub fn name(&self) -> &'static str {
         529  +
        "ExtraError"
         530  +
    }
  636    531   
}
  637         -
impl ::std::fmt::Display for StringPayloadError {
         532  +
impl ::std::fmt::Display for ExtraError {
  638    533   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  639         -
        match &self {
  640         -
            StringPayloadError::ExtraError(_inner) => _inner.fmt(f),
         534  +
        ::std::write!(f, "ExtraError")?;
         535  +
        Ok(())
  641    536   
    }
         537  +
}
         538  +
impl ::std::error::Error for ExtraError {}
         539  +
impl ExtraError {
         540  +
    /// Creates a new builder-style object to manufacture [`ExtraError`](crate::error::ExtraError).
         541  +
    pub fn builder() -> crate::error::extra_error::Builder {
         542  +
        crate::error::extra_error::Builder::default()
  642    543   
    }
  643    544   
}
  644         -
impl StringPayloadError {
  645         -
    /// Returns `true` if the error kind is `StringPayloadError::ExtraError`.
  646         -
    pub fn is_extra_error(&self) -> bool {
  647         -
        matches!(&self, StringPayloadError::ExtraError(_))
         545  +
         546  +
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         547  +
#[derive(
         548  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         549  +
)]
         550  +
pub struct ValidationException {
         551  +
    /// A summary of the validation failure.
         552  +
    pub message: ::std::string::String,
         553  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         554  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         555  +
}
         556  +
impl ValidationException {
         557  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         558  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         559  +
        self.field_list.as_deref()
  648    560   
    }
  649         -
    /// Returns the error name string by matching the correct variant.
         561  +
}
         562  +
impl ValidationException {
         563  +
    /// Returns the error message.
         564  +
    pub fn message(&self) -> &str {
         565  +
        &self.message
         566  +
    }
         567  +
    #[doc(hidden)]
         568  +
    /// Returns the error name.
  650    569   
    pub fn name(&self) -> &'static str {
  651         -
        match &self {
  652         -
            StringPayloadError::ExtraError(_inner) => _inner.name(),
         570  +
        "ValidationException"
         571  +
    }
         572  +
}
         573  +
impl ::std::fmt::Display for ValidationException {
         574  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         575  +
        ::std::write!(f, "ValidationException")?;
         576  +
        {
         577  +
            ::std::write!(f, ": {}", &self.message)?;
  653    578   
        }
         579  +
        Ok(())
  654    580   
    }
  655    581   
}
  656         -
impl ::std::error::Error for StringPayloadError {
  657         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  658         -
        match &self {
  659         -
            StringPayloadError::ExtraError(_inner) => Some(_inner),
         582  +
impl ::std::error::Error for ValidationException {}
         583  +
impl ValidationException {
         584  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         585  +
    pub fn builder() -> crate::error::validation_exception::Builder {
         586  +
        crate::error::validation_exception::Builder::default()
         587  +
    }
         588  +
}
         589  +
         590  +
#[allow(missing_docs)] // documentation missing in model
         591  +
#[derive(
         592  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         593  +
)]
         594  +
pub struct CaseInsensitiveError {
         595  +
    #[allow(missing_docs)] // documentation missing in model
         596  +
    pub message: ::std::option::Option<::std::string::String>,
         597  +
}
         598  +
impl CaseInsensitiveError {
         599  +
    /// Returns the error message.
         600  +
    pub fn message(&self) -> ::std::option::Option<&str> {
         601  +
        self.message.as_deref()
         602  +
    }
         603  +
    #[doc(hidden)]
         604  +
    /// Returns the error name.
         605  +
    pub fn name(&self) -> &'static str {
         606  +
        "CaseInsensitiveError"
         607  +
    }
         608  +
}
         609  +
impl ::std::fmt::Display for CaseInsensitiveError {
         610  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         611  +
        ::std::write!(f, "CaseInsensitiveError")?;
         612  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
         613  +
            {
         614  +
                ::std::write!(f, ": {inner_1}")?;
  660    615   
            }
  661    616   
        }
         617  +
        Ok(())
         618  +
    }
  662    619   
}
  663         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::StringPayloadError {
  664         -
    fn from(variant: crate::error::ExtraError) -> crate::error::StringPayloadError {
  665         -
        Self::ExtraError(variant)
         620  +
impl ::std::error::Error for CaseInsensitiveError {}
         621  +
impl CaseInsensitiveError {
         622  +
    /// Creates a new builder-style object to manufacture [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
         623  +
    pub fn builder() -> crate::error::case_insensitive_error::Builder {
         624  +
        crate::error::case_insensitive_error::Builder::default()
  666    625   
    }
  667    626   
}
  668    627   
/// See [`ExtraError`](crate::error::ExtraError).
  669    628   
pub mod extra_error {
  670    629   
  671    630   
    impl ::std::convert::From<Builder> for crate::error::ExtraError {
  672    631   
        fn from(builder: Builder) -> Self {
  673    632   
            builder.build()
  674    633   
        }
  675    634   
    }
  676    635   
    /// A builder for [`ExtraError`](crate::error::ExtraError).
  677    636   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  678    637   
    pub struct Builder {}
  679    638   
    impl Builder {
  680    639   
        /// Consumes the builder and constructs a [`ExtraError`](crate::error::ExtraError).
  681    640   
        pub fn build(self) -> crate::error::ExtraError {
  682    641   
            self.build_enforcing_all_constraints()
  683    642   
        }
  684    643   
        fn build_enforcing_all_constraints(self) -> crate::error::ExtraError {
  685    644   
            crate::error::ExtraError {}
  686    645   
        }
  687    646   
    }
  688    647   
}
  689         -
/// See [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
  690         -
pub mod case_insensitive_error {
  691         -
  692         -
    impl ::std::convert::From<Builder> for crate::error::CaseInsensitiveError {
  693         -
        fn from(builder: Builder) -> Self {
  694         -
            builder.build()
  695         -
        }
  696         -
    }
  697         -
    /// A builder for [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
  698         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  699         -
    pub struct Builder {
  700         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
  701         -
    }
  702         -
    impl Builder {
  703         -
        #[allow(missing_docs)] // documentation missing in model
  704         -
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  705         -
            self.message = input;
  706         -
            self
  707         -
        }
  708         -
        /// Consumes the builder and constructs a [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
  709         -
        pub fn build(self) -> crate::error::CaseInsensitiveError {
  710         -
            self.build_enforcing_all_constraints()
  711         -
        }
  712         -
        fn build_enforcing_all_constraints(self) -> crate::error::CaseInsensitiveError {
  713         -
            crate::error::CaseInsensitiveError {
  714         -
                message: self.message,
  715         -
            }
  716         -
        }
  717         -
    }
  718         -
}
  719    648   
/// See [`ValidationException`](crate::error::ValidationException).
  720    649   
pub mod validation_exception {
  721    650   
  722    651   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  723    652   
    /// Holds one variant for each of the ways the builder can fail.
  724    653   
    #[non_exhaustive]
  725    654   
    #[allow(clippy::enum_variant_names)]
  726    655   
    pub enum ConstraintViolation {
  727    656   
        /// `message` was not provided but it is required when building `ValidationException`.
  728    657   
        MissingMessage,
@@ -753,682 +0,741 @@
  773    702   
        fn build_enforcing_all_constraints(
  774    703   
            self,
  775    704   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
  776    705   
            Ok(crate::error::ValidationException {
  777    706   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  778    707   
                field_list: self.field_list,
  779    708   
            })
  780    709   
        }
  781    710   
    }
  782    711   
}
         712  +
/// See [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
         713  +
pub mod case_insensitive_error {
         714  +
         715  +
    impl ::std::convert::From<Builder> for crate::error::CaseInsensitiveError {
         716  +
        fn from(builder: Builder) -> Self {
         717  +
            builder.build()
         718  +
        }
         719  +
    }
         720  +
    /// A builder for [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
         721  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         722  +
    pub struct Builder {
         723  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         724  +
    }
         725  +
    impl Builder {
         726  +
        #[allow(missing_docs)] // documentation missing in model
         727  +
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         728  +
            self.message = input;
         729  +
            self
         730  +
        }
         731  +
        /// Consumes the builder and constructs a [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
         732  +
        pub fn build(self) -> crate::error::CaseInsensitiveError {
         733  +
            self.build_enforcing_all_constraints()
         734  +
        }
         735  +
        fn build_enforcing_all_constraints(self) -> crate::error::CaseInsensitiveError {
         736  +
            crate::error::CaseInsensitiveError {
         737  +
                message: self.message,
         738  +
            }
         739  +
        }
         740  +
    }
         741  +
}