41 41 | "com.amazonaws.s3control.synthetic",
|
42 42 | "PutStorageLensConfigurationInput",
|
43 43 | );
|
44 44 | static PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_CONFIG_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
45 45 | ::aws_smithy_schema::ShapeId::from_static(
|
46 46 | "com.amazonaws.s3control.synthetic#PutStorageLensConfigurationInput$ConfigId",
|
47 47 | "com.amazonaws.s3control.synthetic",
|
48 48 | "PutStorageLensConfigurationInput",
|
49 49 | ),
|
50 50 | ::aws_smithy_schema::ShapeType::String,
|
51 - | "config_id",
|
51 + | "ConfigId",
|
52 52 | 0,
|
53 53 | )
|
54 54 | .with_http_label();
|
55 55 | static PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
56 56 | ::aws_smithy_schema::ShapeId::from_static(
|
57 57 | "com.amazonaws.s3control.synthetic#PutStorageLensConfigurationInput$AccountId",
|
58 58 | "com.amazonaws.s3control.synthetic",
|
59 59 | "PutStorageLensConfigurationInput",
|
60 60 | ),
|
61 61 | ::aws_smithy_schema::ShapeType::String,
|
62 - | "account_id",
|
62 + | "AccountId",
|
63 63 | 1,
|
64 64 | )
|
65 65 | .with_host_label()
|
66 66 | .with_http_header("x-amz-account-id");
|
67 67 | static PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_STORAGE_LENS_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
68 68 | ::aws_smithy_schema::ShapeId::from_static(
|
69 69 | "com.amazonaws.s3control.synthetic#PutStorageLensConfigurationInput$StorageLensConfiguration",
|
70 70 | "com.amazonaws.s3control.synthetic",
|
71 71 | "PutStorageLensConfigurationInput",
|
72 72 | ),
|
73 73 | ::aws_smithy_schema::ShapeType::Structure,
|
74 - | "storage_lens_configuration",
|
74 + | "StorageLensConfiguration",
|
75 75 | 2,
|
76 76 | );
|
77 77 | static PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
78 78 | ::aws_smithy_schema::ShapeId::from_static(
|
79 79 | "com.amazonaws.s3control.synthetic#PutStorageLensConfigurationInput$Tags",
|
80 80 | "com.amazonaws.s3control.synthetic",
|
81 81 | "PutStorageLensConfigurationInput",
|
82 82 | ),
|
83 83 | ::aws_smithy_schema::ShapeType::List,
|
84 - | "tags",
|
84 + | "Tags",
|
85 85 | 3,
|
86 86 | );
|
87 87 | static PUTSTORAGELENSCONFIGURATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
88 88 | PUTSTORAGELENSCONFIGURATIONINPUT_SCHEMA_ID,
|
89 89 | ::aws_smithy_schema::ShapeType::Structure,
|
90 90 | &[
|
91 91 | &PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_CONFIG_ID,
|
92 92 | &PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_ACCOUNT_ID,
|
93 93 | &PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_STORAGE_LENS_CONFIGURATION,
|
94 94 | &PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_TAGS,
|
95 95 | ],
|
96 - | );
|
96 + | )
|
97 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
98 + | "PUT",
|
99 + | "/v20180820/storagelens/{ConfigId}",
|
100 + | None,
|
101 + | ));
|
97 102 | impl PutStorageLensConfigurationInput {
|
98 103 | /// The schema for this shape.
|
99 104 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTSTORAGELENSCONFIGURATIONINPUT_SCHEMA;
|
100 105 | }
|
101 106 | impl ::aws_smithy_schema::serde::SerializableStruct for PutStorageLensConfigurationInput {
|
102 107 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
103 108 | fn serialize_members(
|
104 109 | &self,
|
105 110 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
106 111 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
107 112 | if let Some(ref val) = self.config_id {
|
108 113 | ser.write_string(&PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_CONFIG_ID, val)?;
|
109 114 | }
|
110 115 | if let Some(ref val) = self.account_id {
|
111 116 | ser.write_string(&PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_ACCOUNT_ID, val)?;
|
112 117 | }
|
113 118 | if let Some(ref val) = self.storage_lens_configuration {
|
114 119 | ser.write_struct(&PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_STORAGE_LENS_CONFIGURATION, val)?;
|
115 120 | }
|
116 121 | if let Some(ref val) = self.tags {
|
117 122 | ser.write_list(
|
118 123 | &PUTSTORAGELENSCONFIGURATIONINPUT_MEMBER_TAGS,
|
119 124 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
120 125 | for item in val {
|
121 126 | ser.write_struct(crate::types::StorageLensTag::SCHEMA, item)?;
|
122 127 | }
|
123 128 | Ok(())
|
124 129 | },
|
125 130 | )?;
|
126 131 | }
|
127 132 | Ok(())
|
128 133 | }
|
129 134 | }
|
130 135 | impl PutStorageLensConfigurationInput {
|
131 136 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
132 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
133 - | deserializer: &mut D,
|
137 + | pub fn deserialize(
|
138 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
134 139 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
135 140 | #[allow(unused_variables, unused_mut)]
|
136 141 | let mut builder = Self::builder();
|
137 142 | #[allow(
|
138 143 | unused_variables,
|
139 144 | unreachable_code,
|
140 145 | clippy::single_match,
|
141 146 | clippy::match_single_binding,
|
142 147 | clippy::diverging_sub_expression
|
143 148 | )]
|
144 - | deserializer.read_struct(&PUTSTORAGELENSCONFIGURATIONINPUT_SCHEMA, (), |_, member, deser| {
|
149 + | deserializer.read_struct(&PUTSTORAGELENSCONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
|
145 150 | match member.member_index() {
|
146 151 | Some(0) => {
|
147 152 | builder.config_id = Some(deser.read_string(member)?);
|
148 153 | }
|
149 154 | Some(1) => {
|
150 155 | builder.account_id = Some(deser.read_string(member)?);
|
151 156 | }
|
152 157 | Some(2) => {
|
153 158 | builder.storage_lens_configuration = Some(crate::types::StorageLensConfiguration::deserialize(deser)?);
|
154 159 | }
|
155 160 | Some(3) => {
|
156 161 | builder.tags = Some({
|
157 - | let container = if let Some(cap) = deser.container_size() {
|
158 - | Vec::with_capacity(cap)
|
159 - | } else {
|
160 - | Vec::new()
|
161 - | };
|
162 - | deser.read_list(member, container, |mut list, deser| {
|
163 - | list.push(crate::types::StorageLensTag::deserialize(deser)?);
|
164 - | Ok(list)
|
165 - | })?
|
162 + | let mut container = Vec::new();
|
163 + | deser.read_list(member, &mut |deser| {
|
164 + | container.push(crate::types::StorageLensTag::deserialize(deser)?);
|
165 + | Ok(())
|
166 + | })?;
|
167 + | container
|
168 + | });
|
169 + | }
|
170 + | _ => {}
|
171 + | }
|
172 + | Ok(())
|
173 + | })?;
|
174 + | builder.config_id = builder.config_id.or(Some(String::new()));
|
175 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
176 + | builder
|
177 + | .build()
|
178 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
179 + | }
|
180 + | }
|
181 + | impl PutStorageLensConfigurationInput {
|
182 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
183 + | /// Header-bound members are read directly from headers, avoiding runtime
|
184 + | /// member iteration overhead. Body members are read via the deserializer.
|
185 + | pub fn deserialize_with_response(
|
186 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
187 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
188 + | _status: u16,
|
189 + | _body: &[u8],
|
190 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
191 + | #[allow(unused_variables, unused_mut)]
|
192 + | let mut builder = Self::builder();
|
193 + | if let Some(val) = headers.get("x-amz-account-id") {
|
194 + | builder.account_id = Some(val.to_string());
|
195 + | }
|
196 + | #[allow(
|
197 + | unused_variables,
|
198 + | unreachable_code,
|
199 + | clippy::single_match,
|
200 + | clippy::match_single_binding,
|
201 + | clippy::diverging_sub_expression
|
202 + | )]
|
203 + | deserializer.read_struct(&PUTSTORAGELENSCONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
|
204 + | match member.member_index() {
|
205 + | Some(0) => {
|
206 + | builder.config_id = Some(deser.read_string(member)?);
|
207 + | }
|
208 + | Some(1) => { /* read from headers above */ }
|
209 + | Some(2) => {
|
210 + | builder.storage_lens_configuration = Some(crate::types::StorageLensConfiguration::deserialize(deser)?);
|
211 + | }
|
212 + | Some(3) => {
|
213 + | builder.tags = Some({
|
214 + | let mut container = Vec::new();
|
215 + | deser.read_list(member, &mut |deser| {
|
216 + | container.push(crate::types::StorageLensTag::deserialize(deser)?);
|
217 + | Ok(())
|
218 + | })?;
|
219 + | container
|
166 220 | });
|
167 221 | }
|
168 222 | _ => {}
|
169 223 | }
|
170 224 | Ok(())
|
171 225 | })?;
|
172 226 | builder
|
173 227 | .build()
|
174 228 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
175 229 | }
|