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