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