61 61 | "com.amazonaws.s3control",
|
62 62 | "StorageLensConfiguration",
|
63 63 | );
|
64 64 | static STORAGELENSCONFIGURATION_MEMBER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
65 65 | ::aws_smithy_schema::ShapeId::from_static(
|
66 66 | "com.amazonaws.s3control#StorageLensConfiguration$Id",
|
67 67 | "com.amazonaws.s3control",
|
68 68 | "StorageLensConfiguration",
|
69 69 | ),
|
70 70 | ::aws_smithy_schema::ShapeType::String,
|
71 - | "id",
|
71 + | "Id",
|
72 72 | 0,
|
73 73 | );
|
74 74 | static STORAGELENSCONFIGURATION_MEMBER_ACCOUNT_LEVEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
75 75 | ::aws_smithy_schema::ShapeId::from_static(
|
76 76 | "com.amazonaws.s3control#StorageLensConfiguration$AccountLevel",
|
77 77 | "com.amazonaws.s3control",
|
78 78 | "StorageLensConfiguration",
|
79 79 | ),
|
80 80 | ::aws_smithy_schema::ShapeType::Structure,
|
81 - | "account_level",
|
81 + | "AccountLevel",
|
82 82 | 1,
|
83 83 | );
|
84 84 | static STORAGELENSCONFIGURATION_MEMBER_INCLUDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
85 85 | ::aws_smithy_schema::ShapeId::from_static(
|
86 86 | "com.amazonaws.s3control#StorageLensConfiguration$Include",
|
87 87 | "com.amazonaws.s3control",
|
88 88 | "StorageLensConfiguration",
|
89 89 | ),
|
90 90 | ::aws_smithy_schema::ShapeType::Structure,
|
91 - | "include",
|
91 + | "Include",
|
92 92 | 2,
|
93 93 | );
|
94 94 | static STORAGELENSCONFIGURATION_MEMBER_EXCLUDE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
95 95 | ::aws_smithy_schema::ShapeId::from_static(
|
96 96 | "com.amazonaws.s3control#StorageLensConfiguration$Exclude",
|
97 97 | "com.amazonaws.s3control",
|
98 98 | "StorageLensConfiguration",
|
99 99 | ),
|
100 100 | ::aws_smithy_schema::ShapeType::Structure,
|
101 - | "exclude",
|
101 + | "Exclude",
|
102 102 | 3,
|
103 103 | );
|
104 104 | static STORAGELENSCONFIGURATION_MEMBER_DATA_EXPORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
105 105 | ::aws_smithy_schema::ShapeId::from_static(
|
106 106 | "com.amazonaws.s3control#StorageLensConfiguration$DataExport",
|
107 107 | "com.amazonaws.s3control",
|
108 108 | "StorageLensConfiguration",
|
109 109 | ),
|
110 110 | ::aws_smithy_schema::ShapeType::Structure,
|
111 - | "data_export",
|
111 + | "DataExport",
|
112 112 | 4,
|
113 113 | );
|
114 114 | static STORAGELENSCONFIGURATION_MEMBER_IS_ENABLED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
115 115 | ::aws_smithy_schema::ShapeId::from_static(
|
116 116 | "com.amazonaws.s3control#StorageLensConfiguration$IsEnabled",
|
117 117 | "com.amazonaws.s3control",
|
118 118 | "StorageLensConfiguration",
|
119 119 | ),
|
120 120 | ::aws_smithy_schema::ShapeType::Boolean,
|
121 - | "is_enabled",
|
121 + | "IsEnabled",
|
122 122 | 5,
|
123 123 | );
|
124 124 | static STORAGELENSCONFIGURATION_MEMBER_AWS_ORG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
125 125 | ::aws_smithy_schema::ShapeId::from_static(
|
126 126 | "com.amazonaws.s3control#StorageLensConfiguration$AwsOrg",
|
127 127 | "com.amazonaws.s3control",
|
128 128 | "StorageLensConfiguration",
|
129 129 | ),
|
130 130 | ::aws_smithy_schema::ShapeType::Structure,
|
131 - | "aws_org",
|
131 + | "AwsOrg",
|
132 132 | 6,
|
133 133 | );
|
134 134 | static STORAGELENSCONFIGURATION_MEMBER_STORAGE_LENS_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
135 135 | ::aws_smithy_schema::ShapeId::from_static(
|
136 136 | "com.amazonaws.s3control#StorageLensConfiguration$StorageLensArn",
|
137 137 | "com.amazonaws.s3control",
|
138 138 | "StorageLensConfiguration",
|
139 139 | ),
|
140 140 | ::aws_smithy_schema::ShapeType::String,
|
141 - | "storage_lens_arn",
|
141 + | "StorageLensArn",
|
142 142 | 7,
|
143 143 | );
|
144 144 | static STORAGELENSCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
145 145 | STORAGELENSCONFIGURATION_SCHEMA_ID,
|
146 146 | ::aws_smithy_schema::ShapeType::Structure,
|
147 147 | &[
|
148 148 | &STORAGELENSCONFIGURATION_MEMBER_ID,
|
149 149 | &STORAGELENSCONFIGURATION_MEMBER_ACCOUNT_LEVEL,
|
150 150 | &STORAGELENSCONFIGURATION_MEMBER_INCLUDE,
|
151 151 | &STORAGELENSCONFIGURATION_MEMBER_EXCLUDE,
|
152 152 | &STORAGELENSCONFIGURATION_MEMBER_DATA_EXPORT,
|
153 153 | &STORAGELENSCONFIGURATION_MEMBER_IS_ENABLED,
|
154 154 | &STORAGELENSCONFIGURATION_MEMBER_AWS_ORG,
|
155 155 | &STORAGELENSCONFIGURATION_MEMBER_STORAGE_LENS_ARN,
|
156 156 | ],
|
157 157 | );
|
158 158 | impl StorageLensConfiguration {
|
159 159 | /// The schema for this shape.
|
160 160 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STORAGELENSCONFIGURATION_SCHEMA;
|
161 161 | }
|
162 162 | impl ::aws_smithy_schema::serde::SerializableStruct for StorageLensConfiguration {
|
163 163 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
164 164 | fn serialize_members(
|
165 165 | &self,
|
166 166 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
167 167 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
168 168 | {
|
169 169 | let val = &self.id;
|
170 170 | ser.write_string(&STORAGELENSCONFIGURATION_MEMBER_ID, val)?;
|
171 171 | }
|
172 172 | if let Some(ref val) = self.account_level {
|
173 173 | ser.write_struct(&STORAGELENSCONFIGURATION_MEMBER_ACCOUNT_LEVEL, val)?;
|
174 174 | }
|
175 175 | if let Some(ref val) = self.include {
|
176 176 | ser.write_struct(&STORAGELENSCONFIGURATION_MEMBER_INCLUDE, val)?;
|
177 177 | }
|
178 178 | if let Some(ref val) = self.exclude {
|
179 179 | ser.write_struct(&STORAGELENSCONFIGURATION_MEMBER_EXCLUDE, val)?;
|
180 180 | }
|
181 181 | if let Some(ref val) = self.data_export {
|
182 182 | ser.write_struct(&STORAGELENSCONFIGURATION_MEMBER_DATA_EXPORT, val)?;
|
183 183 | }
|
184 184 | {
|
185 185 | let val = &self.is_enabled;
|
186 186 | ser.write_boolean(&STORAGELENSCONFIGURATION_MEMBER_IS_ENABLED, *val)?;
|
187 187 | }
|
188 188 | if let Some(ref val) = self.aws_org {
|
189 189 | ser.write_struct(&STORAGELENSCONFIGURATION_MEMBER_AWS_ORG, val)?;
|
190 190 | }
|
191 191 | if let Some(ref val) = self.storage_lens_arn {
|
192 192 | ser.write_string(&STORAGELENSCONFIGURATION_MEMBER_STORAGE_LENS_ARN, val)?;
|
193 193 | }
|
194 194 | Ok(())
|
195 195 | }
|
196 196 | }
|
197 197 | impl StorageLensConfiguration {
|
198 198 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
199 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
200 - | deserializer: &mut D,
|
199 + | pub fn deserialize(
|
200 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
201 201 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
202 202 | #[allow(unused_variables, unused_mut)]
|
203 203 | let mut builder = Self::builder();
|
204 204 | #[allow(
|
205 205 | unused_variables,
|
206 206 | unreachable_code,
|
207 207 | clippy::single_match,
|
208 208 | clippy::match_single_binding,
|
209 209 | clippy::diverging_sub_expression
|
210 210 | )]
|
211 - | deserializer.read_struct(&STORAGELENSCONFIGURATION_SCHEMA, (), |_, member, deser| {
|
211 + | deserializer.read_struct(&STORAGELENSCONFIGURATION_SCHEMA, &mut |member, deser| {
|
212 212 | match member.member_index() {
|
213 213 | Some(0) => {
|
214 214 | builder.id = Some(deser.read_string(member)?);
|
215 215 | }
|
216 216 | Some(1) => {
|
217 217 | builder.account_level = Some(crate::types::AccountLevel::deserialize(deser)?);
|
218 218 | }
|
219 219 | Some(2) => {
|
220 220 | builder.include = Some(crate::types::Include::deserialize(deser)?);
|
221 221 | }
|
222 222 | Some(3) => {
|
223 223 | builder.exclude = Some(crate::types::Exclude::deserialize(deser)?);
|
224 224 | }
|
225 225 | Some(4) => {
|
226 226 | builder.data_export = Some(crate::types::StorageLensDataExport::deserialize(deser)?);
|
227 227 | }
|
228 228 | Some(5) => {
|
229 229 | builder.is_enabled = Some(deser.read_boolean(member)?);
|
230 230 | }
|
231 231 | Some(6) => {
|
232 232 | builder.aws_org = Some(crate::types::StorageLensAwsOrg::deserialize(deser)?);
|
233 233 | }
|
234 234 | Some(7) => {
|
235 235 | builder.storage_lens_arn = Some(deser.read_string(member)?);
|
236 236 | }
|
237 237 | _ => {}
|
238 238 | }
|
239 239 | Ok(())
|
240 240 | })?;
|
241 + | builder.id = builder.id.or(Some(String::new()));
|
242 + | builder.is_enabled = builder.is_enabled.or(Some(false));
|
241 243 | builder
|
242 244 | .build()
|
243 245 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
244 246 | }
|
245 247 | }
|
248 + | impl StorageLensConfiguration {
|
249 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
250 + | pub fn deserialize_with_response(
|
251 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
252 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
253 + | _status: u16,
|
254 + | _body: &[u8],
|
255 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
256 + | Self::deserialize(deserializer)
|
257 + | }
|
258 + | }
|
246 259 | impl StorageLensConfiguration {
|
247 260 | /// Creates a new builder-style object to manufacture [`StorageLensConfiguration`](crate::types::StorageLensConfiguration).
|
248 261 | pub fn builder() -> crate::types::builders::StorageLensConfigurationBuilder {
|
249 262 | crate::types::builders::StorageLensConfigurationBuilder::default()
|
250 263 | }
|
251 264 | }
|
252 265 |
|
253 266 | /// A builder for [`StorageLensConfiguration`](crate::types::StorageLensConfiguration).
|
254 267 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
255 268 | #[non_exhaustive]
|