39 39 | "com.amazonaws.s3",
|
40 40 | "IntelligentTieringConfiguration",
|
41 41 | );
|
42 42 | static INTELLIGENTTIERINGCONFIGURATION_MEMBER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
43 43 | ::aws_smithy_schema::ShapeId::from_static(
|
44 44 | "com.amazonaws.s3#IntelligentTieringConfiguration$Id",
|
45 45 | "com.amazonaws.s3",
|
46 46 | "IntelligentTieringConfiguration",
|
47 47 | ),
|
48 48 | ::aws_smithy_schema::ShapeType::String,
|
49 - | "id",
|
49 + | "Id",
|
50 50 | 0,
|
51 51 | );
|
52 52 | static INTELLIGENTTIERINGCONFIGURATION_MEMBER_FILTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
53 53 | ::aws_smithy_schema::ShapeId::from_static(
|
54 54 | "com.amazonaws.s3#IntelligentTieringConfiguration$Filter",
|
55 55 | "com.amazonaws.s3",
|
56 56 | "IntelligentTieringConfiguration",
|
57 57 | ),
|
58 58 | ::aws_smithy_schema::ShapeType::Structure,
|
59 - | "filter",
|
59 + | "Filter",
|
60 60 | 1,
|
61 61 | );
|
62 62 | static INTELLIGENTTIERINGCONFIGURATION_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
63 63 | ::aws_smithy_schema::ShapeId::from_static(
|
64 64 | "com.amazonaws.s3#IntelligentTieringConfiguration$Status",
|
65 65 | "com.amazonaws.s3",
|
66 66 | "IntelligentTieringConfiguration",
|
67 67 | ),
|
68 68 | ::aws_smithy_schema::ShapeType::String,
|
69 - | "status",
|
69 + | "Status",
|
70 70 | 2,
|
71 71 | );
|
72 72 | static INTELLIGENTTIERINGCONFIGURATION_MEMBER_TIERINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
73 73 | ::aws_smithy_schema::ShapeId::from_static(
|
74 74 | "com.amazonaws.s3#IntelligentTieringConfiguration$Tierings",
|
75 75 | "com.amazonaws.s3",
|
76 76 | "IntelligentTieringConfiguration",
|
77 77 | ),
|
78 78 | ::aws_smithy_schema::ShapeType::List,
|
79 - | "tierings",
|
79 + | "Tierings",
|
80 80 | 3,
|
81 81 | )
|
82 82 | .with_xml_name("Tiering")
|
83 83 | .with_xml_flattened();
|
84 84 | static INTELLIGENTTIERINGCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
85 85 | INTELLIGENTTIERINGCONFIGURATION_SCHEMA_ID,
|
86 86 | ::aws_smithy_schema::ShapeType::Structure,
|
87 87 | &[
|
88 88 | &INTELLIGENTTIERINGCONFIGURATION_MEMBER_ID,
|
89 89 | &INTELLIGENTTIERINGCONFIGURATION_MEMBER_FILTER,
|
90 90 | &INTELLIGENTTIERINGCONFIGURATION_MEMBER_STATUS,
|
91 91 | &INTELLIGENTTIERINGCONFIGURATION_MEMBER_TIERINGS,
|
92 92 | ],
|
93 93 | );
|
94 94 | impl IntelligentTieringConfiguration {
|
95 95 | /// The schema for this shape.
|
96 96 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INTELLIGENTTIERINGCONFIGURATION_SCHEMA;
|
97 97 | }
|
98 98 | impl ::aws_smithy_schema::serde::SerializableStruct for IntelligentTieringConfiguration {
|
99 99 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
100 100 | fn serialize_members(
|
101 101 | &self,
|
102 102 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
103 103 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
104 104 | {
|
105 105 | let val = &self.id;
|
106 106 | ser.write_string(&INTELLIGENTTIERINGCONFIGURATION_MEMBER_ID, val)?;
|
107 107 | }
|
108 108 | if let Some(ref val) = self.filter {
|
109 109 | ser.write_struct(&INTELLIGENTTIERINGCONFIGURATION_MEMBER_FILTER, val)?;
|
110 110 | }
|
111 111 | {
|
112 112 | let val = &self.status;
|
113 113 | ser.write_string(&INTELLIGENTTIERINGCONFIGURATION_MEMBER_STATUS, val.as_str())?;
|
114 114 | }
|
115 115 | {
|
116 116 | let val = &self.tierings;
|
117 117 |
|
118 118 | ser.write_list(
|
119 119 | &INTELLIGENTTIERINGCONFIGURATION_MEMBER_TIERINGS,
|
120 120 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
121 121 | for item in val {
|
122 122 | ser.write_struct(crate::types::Tiering::SCHEMA, item)?;
|
123 123 | }
|
124 124 | Ok(())
|
125 125 | },
|
126 126 | )?;
|
127 127 | }
|
128 128 | Ok(())
|
129 129 | }
|
130 130 | }
|
131 131 | impl IntelligentTieringConfiguration {
|
132 132 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
133 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
134 - | deserializer: &mut D,
|
133 + | pub fn deserialize(
|
134 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
135 135 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
136 136 | #[allow(unused_variables, unused_mut)]
|
137 137 | let mut builder = Self::builder();
|
138 138 | #[allow(
|
139 139 | unused_variables,
|
140 140 | unreachable_code,
|
141 141 | clippy::single_match,
|
142 142 | clippy::match_single_binding,
|
143 143 | clippy::diverging_sub_expression
|
144 144 | )]
|
145 - | deserializer.read_struct(&INTELLIGENTTIERINGCONFIGURATION_SCHEMA, (), |_, member, deser| {
|
145 + | deserializer.read_struct(&INTELLIGENTTIERINGCONFIGURATION_SCHEMA, &mut |member, deser| {
|
146 146 | match member.member_index() {
|
147 147 | Some(0) => {
|
148 148 | builder.id = Some(deser.read_string(member)?);
|
149 149 | }
|
150 150 | Some(1) => {
|
151 151 | builder.filter = Some(crate::types::IntelligentTieringFilter::deserialize(deser)?);
|
152 152 | }
|
153 153 | Some(2) => {
|
154 154 | builder.status = Some(crate::types::IntelligentTieringStatus::from(deser.read_string(member)?.as_str()));
|
155 155 | }
|
156 156 | Some(3) => {
|
157 157 | builder.tierings = Some({
|
158 - | let container = if let Some(cap) = deser.container_size() {
|
159 - | Vec::with_capacity(cap)
|
160 - | } else {
|
161 - | Vec::new()
|
162 - | };
|
163 - | deser.read_list(member, container, |mut list, deser| {
|
164 - | list.push(crate::types::Tiering::deserialize(deser)?);
|
165 - | Ok(list)
|
166 - | })?
|
158 + | let mut container = Vec::new();
|
159 + | deser.read_list(member, &mut |deser| {
|
160 + | container.push(crate::types::Tiering::deserialize(deser)?);
|
161 + | Ok(())
|
162 + | })?;
|
163 + | container
|
167 164 | });
|
168 165 | }
|
169 166 | _ => {}
|
170 167 | }
|
171 168 | Ok(())
|
172 169 | })?;
|
170 + | builder.id = builder.id.or(Some(String::new()));
|
171 + | builder.tierings = builder.tierings.or(Some(Vec::new()));
|
173 172 | builder
|
174 173 | .build()
|
175 174 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
176 175 | }
|
177 176 | }
|
177 + | impl IntelligentTieringConfiguration {
|
178 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
179 + | pub fn deserialize_with_response(
|
180 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
181 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
182 + | _status: u16,
|
183 + | _body: &[u8],
|
184 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
185 + | Self::deserialize(deserializer)
|
186 + | }
|
187 + | }
|
178 188 | impl IntelligentTieringConfiguration {
|
179 189 | /// Creates a new builder-style object to manufacture [`IntelligentTieringConfiguration`](crate::types::IntelligentTieringConfiguration).
|
180 190 | pub fn builder() -> crate::types::builders::IntelligentTieringConfigurationBuilder {
|
181 191 | crate::types::builders::IntelligentTieringConfigurationBuilder::default()
|
182 192 | }
|
183 193 | }
|
184 194 |
|
185 195 | /// A builder for [`IntelligentTieringConfiguration`](crate::types::IntelligentTieringConfiguration).
|
186 196 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
187 197 | #[non_exhaustive]
|