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