20 20 | "com.amazonaws.route53",
|
21 21 | "TooManyTrafficPolicyVersionsForCurrentPolicy",
|
22 22 | ),
|
23 23 | ::aws_smithy_schema::ShapeType::String,
|
24 24 | "message",
|
25 25 | 0,
|
26 26 | );
|
27 27 | static TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
28 28 | TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_SCHEMA_ID,
|
29 29 | ::aws_smithy_schema::ShapeType::Structure,
|
30 30 | &[&TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_MEMBER_MESSAGE],
|
31 31 | );
|
32 32 | impl TooManyTrafficPolicyVersionsForCurrentPolicy {
|
33 33 | /// The schema for this shape.
|
34 34 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_SCHEMA;
|
35 35 | }
|
36 36 | impl ::aws_smithy_schema::serde::SerializableStruct for TooManyTrafficPolicyVersionsForCurrentPolicy {
|
37 37 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
38 38 | fn serialize_members(
|
39 39 | &self,
|
40 40 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
41 41 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
42 42 | if let Some(ref val) = self.message {
|
43 43 | ser.write_string(&TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_MEMBER_MESSAGE, val)?;
|
44 44 | }
|
45 45 | Ok(())
|
46 46 | }
|
47 47 | }
|
48 48 | impl TooManyTrafficPolicyVersionsForCurrentPolicy {
|
49 49 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
50 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
51 - | deserializer: &mut D,
|
50 + | pub fn deserialize(
|
51 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
52 52 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
53 53 | #[allow(unused_variables, unused_mut)]
|
54 54 | let mut builder = Self::builder();
|
55 55 | #[allow(
|
56 56 | unused_variables,
|
57 57 | unreachable_code,
|
58 58 | clippy::single_match,
|
59 59 | clippy::match_single_binding,
|
60 60 | clippy::diverging_sub_expression
|
61 61 | )]
|
62 - | deserializer.read_struct(&TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_SCHEMA, (), |_, member, deser| {
|
62 + | deserializer.read_struct(&TOOMANYTRAFFICPOLICYVERSIONSFORCURRENTPOLICY_SCHEMA, &mut |member, deser| {
|
63 63 | match member.member_index() {
|
64 64 | Some(0) => {
|
65 65 | builder.message = Some(deser.read_string(member)?);
|
66 66 | }
|
67 67 | _ => {}
|
68 68 | }
|
69 69 | Ok(())
|
70 70 | })?;
|
71 71 | Ok(builder.build())
|
72 72 | }
|
73 73 | }
|
74 + | impl TooManyTrafficPolicyVersionsForCurrentPolicy {
|
75 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
76 + | pub fn deserialize_with_response(
|
77 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
78 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
79 + | _status: u16,
|
80 + | _body: &[u8],
|
81 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
82 + | Self::deserialize(deserializer)
|
83 + | }
|
84 + | }
|
74 85 | impl TooManyTrafficPolicyVersionsForCurrentPolicy {
|
75 86 | /// Returns the error message.
|
76 87 | pub fn message(&self) -> ::std::option::Option<&str> {
|
77 88 | self.message.as_deref()
|
78 89 | }
|
79 90 | }
|
80 91 | impl ::std::fmt::Display for TooManyTrafficPolicyVersionsForCurrentPolicy {
|
81 92 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
82 93 | ::std::write!(f, "TooManyTrafficPolicyVersionsForCurrentPolicy")?;
|
83 94 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
84 95 | {
|
85 96 | ::std::write!(f, ": {inner_1}")?;
|
86 97 | }
|
87 98 | }
|
88 99 | Ok(())
|
89 100 | }
|
90 101 | }
|
91 102 | impl ::std::error::Error for TooManyTrafficPolicyVersionsForCurrentPolicy {}
|
92 103 | impl ::aws_types::request_id::RequestId for crate::types::error::TooManyTrafficPolicyVersionsForCurrentPolicy {
|
93 104 | fn request_id(&self) -> Option<&str> {
|
94 105 | use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
|
95 106 | self.meta().request_id()
|
96 107 | }
|
97 108 | }
|
98 109 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TooManyTrafficPolicyVersionsForCurrentPolicy {
|
99 110 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
100 111 | &self.meta
|
101 112 | }
|
102 113 | }
|
103 114 | impl TooManyTrafficPolicyVersionsForCurrentPolicy {
|