7 7 | #[allow(missing_docs)] // documentation missing in model
|
8 8 | pub r#type: ::std::option::Option<::std::string::String>,
|
9 9 | #[allow(missing_docs)] // documentation missing in model
|
10 10 | pub message: ::std::option::Option<::std::string::String>,
|
11 11 | #[allow(missing_docs)] // documentation missing in model
|
12 12 | pub ec2_error_code: ::std::option::Option<::std::string::String>,
|
13 13 | pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
14 14 | }
|
15 15 | impl Ec2UnexpectedException {
|
16 16 | #[allow(missing_docs)] // documentation missing in model
|
17 17 | pub fn r#type(&self) -> ::std::option::Option<&str> {
|
18 18 | self.r#type.as_deref()
|
19 19 | }
|
20 20 | #[allow(missing_docs)] // documentation missing in model
|
21 21 | pub fn ec2_error_code(&self) -> ::std::option::Option<&str> {
|
22 22 | self.ec2_error_code.as_deref()
|
23 23 | }
|
24 24 | }
|
25 25 | static EC2UNEXPECTEDEXCEPTION_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
26 26 | "com.amazonaws.lambda#EC2UnexpectedException",
|
27 27 | "com.amazonaws.lambda",
|
28 28 | "EC2UnexpectedException",
|
29 29 | );
|
30 30 | static EC2UNEXPECTEDEXCEPTION_MEMBER_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
31 31 | ::aws_smithy_schema::ShapeId::from_static(
|
32 32 | "com.amazonaws.lambda#EC2UnexpectedException$Type",
|
33 33 | "com.amazonaws.lambda",
|
34 34 | "EC2UnexpectedException",
|
35 35 | ),
|
36 36 | ::aws_smithy_schema::ShapeType::String,
|
37 - | "r##type",
|
37 + | "Type",
|
38 38 | 0,
|
39 39 | );
|
40 40 | static EC2UNEXPECTEDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
41 41 | ::aws_smithy_schema::ShapeId::from_static(
|
42 42 | "com.amazonaws.lambda#EC2UnexpectedException$Message",
|
43 43 | "com.amazonaws.lambda",
|
44 44 | "EC2UnexpectedException",
|
45 45 | ),
|
46 46 | ::aws_smithy_schema::ShapeType::String,
|
47 - | "message",
|
47 + | "Message",
|
48 48 | 1,
|
49 49 | );
|
50 50 | static EC2UNEXPECTEDEXCEPTION_MEMBER_EC2_ERROR_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
51 51 | ::aws_smithy_schema::ShapeId::from_static(
|
52 52 | "com.amazonaws.lambda#EC2UnexpectedException$EC2ErrorCode",
|
53 53 | "com.amazonaws.lambda",
|
54 54 | "EC2UnexpectedException",
|
55 55 | ),
|
56 56 | ::aws_smithy_schema::ShapeType::String,
|
57 - | "ec2_error_code",
|
57 + | "EC2ErrorCode",
|
58 58 | 2,
|
59 59 | );
|
60 60 | static EC2UNEXPECTEDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
61 61 | EC2UNEXPECTEDEXCEPTION_SCHEMA_ID,
|
62 62 | ::aws_smithy_schema::ShapeType::Structure,
|
63 63 | &[
|
64 64 | &EC2UNEXPECTEDEXCEPTION_MEMBER_TYPE,
|
65 65 | &EC2UNEXPECTEDEXCEPTION_MEMBER_MESSAGE,
|
66 66 | &EC2UNEXPECTEDEXCEPTION_MEMBER_EC2_ERROR_CODE,
|
67 67 | ],
|
68 68 | );
|
69 69 | impl Ec2UnexpectedException {
|
70 70 | /// The schema for this shape.
|
71 71 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &EC2UNEXPECTEDEXCEPTION_SCHEMA;
|
72 72 | }
|
73 73 | impl ::aws_smithy_schema::serde::SerializableStruct for Ec2UnexpectedException {
|
74 74 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
75 75 | fn serialize_members(
|
76 76 | &self,
|
77 77 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
78 78 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
79 79 | if let Some(ref val) = self.r#type {
|
80 80 | ser.write_string(&EC2UNEXPECTEDEXCEPTION_MEMBER_TYPE, val)?;
|
81 81 | }
|
82 82 | if let Some(ref val) = self.message {
|
83 83 | ser.write_string(&EC2UNEXPECTEDEXCEPTION_MEMBER_MESSAGE, val)?;
|
84 84 | }
|
85 85 | if let Some(ref val) = self.ec2_error_code {
|
86 86 | ser.write_string(&EC2UNEXPECTEDEXCEPTION_MEMBER_EC2_ERROR_CODE, val)?;
|
87 87 | }
|
88 88 | Ok(())
|
89 89 | }
|
90 90 | }
|
91 91 | impl Ec2UnexpectedException {
|
92 92 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
93 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
94 - | deserializer: &mut D,
|
93 + | pub fn deserialize(
|
94 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
95 95 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
96 96 | #[allow(unused_variables, unused_mut)]
|
97 97 | let mut builder = Self::builder();
|
98 98 | #[allow(
|
99 99 | unused_variables,
|
100 100 | unreachable_code,
|
101 101 | clippy::single_match,
|
102 102 | clippy::match_single_binding,
|
103 103 | clippy::diverging_sub_expression
|
104 104 | )]
|
105 - | deserializer.read_struct(&EC2UNEXPECTEDEXCEPTION_SCHEMA, (), |_, member, deser| {
|
105 + | deserializer.read_struct(&EC2UNEXPECTEDEXCEPTION_SCHEMA, &mut |member, deser| {
|
106 106 | match member.member_index() {
|
107 107 | Some(0) => {
|
108 108 | builder.r#type = Some(deser.read_string(member)?);
|
109 109 | }
|
110 110 | Some(1) => {
|
111 111 | builder.message = Some(deser.read_string(member)?);
|
112 112 | }
|
113 113 | Some(2) => {
|
114 114 | builder.ec2_error_code = Some(deser.read_string(member)?);
|
115 115 | }
|
116 116 | _ => {}
|
117 117 | }
|
118 118 | Ok(())
|
119 119 | })?;
|
120 120 | Ok(builder.build())
|
121 121 | }
|
122 122 | }
|
123 + | impl Ec2UnexpectedException {
|
124 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
125 + | pub fn deserialize_with_response(
|
126 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
127 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
128 + | _status: u16,
|
129 + | _body: &[u8],
|
130 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
131 + | Self::deserialize(deserializer)
|
132 + | }
|
133 + | }
|
123 134 | impl Ec2UnexpectedException {
|
124 135 | /// Returns the error message.
|
125 136 | pub fn message(&self) -> ::std::option::Option<&str> {
|
126 137 | self.message.as_deref()
|
127 138 | }
|
128 139 | }
|
129 140 | impl ::std::fmt::Display for Ec2UnexpectedException {
|
130 141 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
131 142 | ::std::write!(f, "Ec2UnexpectedException [EC2UnexpectedException]")?;
|
132 143 | if let ::std::option::Option::Some(inner_1) = &self.message {
|