55 55 | "com.amazonaws.ec2.synthetic",
|
56 56 | "CreateFpgaImageInput",
|
57 57 | );
|
58 58 | static CREATEFPGAIMAGEINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
59 59 | ::aws_smithy_schema::ShapeId::from_static(
|
60 60 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$DryRun",
|
61 61 | "com.amazonaws.ec2.synthetic",
|
62 62 | "CreateFpgaImageInput",
|
63 63 | ),
|
64 64 | ::aws_smithy_schema::ShapeType::Boolean,
|
65 - | "dry_run",
|
65 + | "DryRun",
|
66 66 | 0,
|
67 67 | );
|
68 68 | static CREATEFPGAIMAGEINPUT_MEMBER_INPUT_STORAGE_LOCATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
69 69 | ::aws_smithy_schema::ShapeId::from_static(
|
70 70 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$InputStorageLocation",
|
71 71 | "com.amazonaws.ec2.synthetic",
|
72 72 | "CreateFpgaImageInput",
|
73 73 | ),
|
74 74 | ::aws_smithy_schema::ShapeType::Structure,
|
75 - | "input_storage_location",
|
75 + | "InputStorageLocation",
|
76 76 | 1,
|
77 77 | );
|
78 78 | static CREATEFPGAIMAGEINPUT_MEMBER_LOGS_STORAGE_LOCATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
79 79 | ::aws_smithy_schema::ShapeId::from_static(
|
80 80 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$LogsStorageLocation",
|
81 81 | "com.amazonaws.ec2.synthetic",
|
82 82 | "CreateFpgaImageInput",
|
83 83 | ),
|
84 84 | ::aws_smithy_schema::ShapeType::Structure,
|
85 - | "logs_storage_location",
|
85 + | "LogsStorageLocation",
|
86 86 | 2,
|
87 87 | );
|
88 88 | static CREATEFPGAIMAGEINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
89 89 | ::aws_smithy_schema::ShapeId::from_static(
|
90 90 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$Description",
|
91 91 | "com.amazonaws.ec2.synthetic",
|
92 92 | "CreateFpgaImageInput",
|
93 93 | ),
|
94 94 | ::aws_smithy_schema::ShapeType::String,
|
95 - | "description",
|
95 + | "Description",
|
96 96 | 3,
|
97 97 | );
|
98 98 | static CREATEFPGAIMAGEINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
99 99 | ::aws_smithy_schema::ShapeId::from_static(
|
100 100 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$Name",
|
101 101 | "com.amazonaws.ec2.synthetic",
|
102 102 | "CreateFpgaImageInput",
|
103 103 | ),
|
104 104 | ::aws_smithy_schema::ShapeType::String,
|
105 - | "name",
|
105 + | "Name",
|
106 106 | 4,
|
107 107 | );
|
108 108 | static CREATEFPGAIMAGEINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
109 109 | ::aws_smithy_schema::ShapeId::from_static(
|
110 110 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$ClientToken",
|
111 111 | "com.amazonaws.ec2.synthetic",
|
112 112 | "CreateFpgaImageInput",
|
113 113 | ),
|
114 114 | ::aws_smithy_schema::ShapeType::String,
|
115 - | "client_token",
|
115 + | "ClientToken",
|
116 116 | 5,
|
117 117 | );
|
118 118 | static CREATEFPGAIMAGEINPUT_MEMBER_TAG_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
119 119 | ::aws_smithy_schema::ShapeId::from_static(
|
120 120 | "com.amazonaws.ec2.synthetic#CreateFpgaImageInput$TagSpecifications",
|
121 121 | "com.amazonaws.ec2.synthetic",
|
122 122 | "CreateFpgaImageInput",
|
123 123 | ),
|
124 124 | ::aws_smithy_schema::ShapeType::List,
|
125 - | "tag_specifications",
|
125 + | "TagSpecifications",
|
126 126 | 6,
|
127 127 | )
|
128 128 | .with_xml_name("TagSpecification");
|
129 129 | static CREATEFPGAIMAGEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
130 130 | CREATEFPGAIMAGEINPUT_SCHEMA_ID,
|
131 131 | ::aws_smithy_schema::ShapeType::Structure,
|
132 132 | &[
|
133 133 | &CREATEFPGAIMAGEINPUT_MEMBER_DRY_RUN,
|
134 134 | &CREATEFPGAIMAGEINPUT_MEMBER_INPUT_STORAGE_LOCATION,
|
135 135 | &CREATEFPGAIMAGEINPUT_MEMBER_LOGS_STORAGE_LOCATION,
|
136 136 | &CREATEFPGAIMAGEINPUT_MEMBER_DESCRIPTION,
|
137 137 | &CREATEFPGAIMAGEINPUT_MEMBER_NAME,
|
138 138 | &CREATEFPGAIMAGEINPUT_MEMBER_CLIENT_TOKEN,
|
139 139 | &CREATEFPGAIMAGEINPUT_MEMBER_TAG_SPECIFICATIONS,
|
140 140 | ],
|
141 141 | );
|
142 142 | impl CreateFpgaImageInput {
|
143 143 | /// The schema for this shape.
|
144 144 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEFPGAIMAGEINPUT_SCHEMA;
|
145 145 | }
|
146 146 | impl ::aws_smithy_schema::serde::SerializableStruct for CreateFpgaImageInput {
|
147 147 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
148 148 | fn serialize_members(
|
149 149 | &self,
|
150 150 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
151 151 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
152 152 | if let Some(ref val) = self.dry_run {
|
153 153 | ser.write_boolean(&CREATEFPGAIMAGEINPUT_MEMBER_DRY_RUN, *val)?;
|
154 154 | }
|
155 155 | if let Some(ref val) = self.input_storage_location {
|
156 156 | ser.write_struct(&CREATEFPGAIMAGEINPUT_MEMBER_INPUT_STORAGE_LOCATION, val)?;
|
157 157 | }
|
158 158 | if let Some(ref val) = self.logs_storage_location {
|
159 159 | ser.write_struct(&CREATEFPGAIMAGEINPUT_MEMBER_LOGS_STORAGE_LOCATION, val)?;
|
160 160 | }
|
161 161 | if let Some(ref val) = self.description {
|
162 162 | ser.write_string(&CREATEFPGAIMAGEINPUT_MEMBER_DESCRIPTION, val)?;
|
163 163 | }
|
164 164 | if let Some(ref val) = self.name {
|
165 165 | ser.write_string(&CREATEFPGAIMAGEINPUT_MEMBER_NAME, val)?;
|
166 166 | }
|
167 167 | if let Some(ref val) = self.client_token {
|
168 168 | ser.write_string(&CREATEFPGAIMAGEINPUT_MEMBER_CLIENT_TOKEN, val)?;
|
169 169 | }
|
170 170 | if let Some(ref val) = self.tag_specifications {
|
171 171 | ser.write_list(
|
172 172 | &CREATEFPGAIMAGEINPUT_MEMBER_TAG_SPECIFICATIONS,
|
173 173 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
174 174 | for item in val {
|
175 175 | ser.write_struct(crate::types::TagSpecification::SCHEMA, item)?;
|
176 176 | }
|
177 177 | Ok(())
|
178 178 | },
|
179 179 | )?;
|
180 180 | }
|
181 181 | Ok(())
|
182 182 | }
|
183 183 | }
|
184 184 | impl CreateFpgaImageInput {
|
185 185 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
186 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
187 - | deserializer: &mut D,
|
186 + | pub fn deserialize(
|
187 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
188 188 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
189 189 | #[allow(unused_variables, unused_mut)]
|
190 190 | let mut builder = Self::builder();
|
191 191 | #[allow(
|
192 192 | unused_variables,
|
193 193 | unreachable_code,
|
194 194 | clippy::single_match,
|
195 195 | clippy::match_single_binding,
|
196 196 | clippy::diverging_sub_expression
|
197 197 | )]
|
198 - | deserializer.read_struct(&CREATEFPGAIMAGEINPUT_SCHEMA, (), |_, member, deser| {
|
198 + | deserializer.read_struct(&CREATEFPGAIMAGEINPUT_SCHEMA, &mut |member, deser| {
|
199 199 | match member.member_index() {
|
200 200 | Some(0) => {
|
201 201 | builder.dry_run = Some(deser.read_boolean(member)?);
|
202 202 | }
|
203 203 | Some(1) => {
|
204 204 | builder.input_storage_location = Some(crate::types::StorageLocation::deserialize(deser)?);
|
205 205 | }
|
206 206 | Some(2) => {
|
207 207 | builder.logs_storage_location = Some(crate::types::StorageLocation::deserialize(deser)?);
|
208 208 | }
|
209 209 | Some(3) => {
|
210 210 | builder.description = Some(deser.read_string(member)?);
|
211 211 | }
|
212 212 | Some(4) => {
|
213 213 | builder.name = Some(deser.read_string(member)?);
|
214 214 | }
|
215 215 | Some(5) => {
|
216 216 | builder.client_token = Some(deser.read_string(member)?);
|
217 217 | }
|
218 218 | Some(6) => {
|
219 219 | builder.tag_specifications = Some({
|
220 - | let container = if let Some(cap) = deser.container_size() {
|
221 - | Vec::with_capacity(cap)
|
222 - | } else {
|
223 - | Vec::new()
|
224 - | };
|
225 - | deser.read_list(member, container, |mut list, deser| {
|
226 - | list.push(crate::types::TagSpecification::deserialize(deser)?);
|
227 - | Ok(list)
|
228 - | })?
|
220 + | let mut container = Vec::new();
|
221 + | deser.read_list(member, &mut |deser| {
|
222 + | container.push(crate::types::TagSpecification::deserialize(deser)?);
|
223 + | Ok(())
|
224 + | })?;
|
225 + | container
|
229 226 | });
|
230 227 | }
|
231 228 | _ => {}
|
232 229 | }
|
233 230 | Ok(())
|
234 231 | })?;
|
235 232 | builder
|
236 233 | .build()
|
237 234 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
238 235 | }
|
239 236 | }
|
237 + | impl CreateFpgaImageInput {
|
238 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
239 + | pub fn deserialize_with_response(
|
240 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
241 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
242 + | _status: u16,
|
243 + | _body: &[u8],
|
244 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
245 + | Self::deserialize(deserializer)
|
246 + | }
|
247 + | }
|
240 248 | impl CreateFpgaImageInput {
|
241 249 | /// Creates a new builder-style object to manufacture [`CreateFpgaImageInput`](crate::operation::create_fpga_image::CreateFpgaImageInput).
|
242 250 | pub fn builder() -> crate::operation::create_fpga_image::builders::CreateFpgaImageInputBuilder {
|
243 251 | crate::operation::create_fpga_image::builders::CreateFpgaImageInputBuilder::default()
|
244 252 | }
|
245 253 | }
|
246 254 |
|
247 255 | /// A builder for [`CreateFpgaImageInput`](crate::operation::create_fpga_image::CreateFpgaImageInput).
|
248 256 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
249 257 | #[non_exhaustive]
|