127 127 | "com.amazonaws.iam.synthetic",
|
128 128 | "UploadServerCertificateInput",
|
129 129 | );
|
130 130 | static UPLOADSERVERCERTIFICATEINPUT_MEMBER_PATH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
131 131 | ::aws_smithy_schema::ShapeId::from_static(
|
132 132 | "com.amazonaws.iam.synthetic#UploadServerCertificateInput$Path",
|
133 133 | "com.amazonaws.iam.synthetic",
|
134 134 | "UploadServerCertificateInput",
|
135 135 | ),
|
136 136 | ::aws_smithy_schema::ShapeType::String,
|
137 - | "path",
|
137 + | "Path",
|
138 138 | 0,
|
139 139 | );
|
140 140 | static UPLOADSERVERCERTIFICATEINPUT_MEMBER_SERVER_CERTIFICATE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
141 141 | ::aws_smithy_schema::ShapeId::from_static(
|
142 142 | "com.amazonaws.iam.synthetic#UploadServerCertificateInput$ServerCertificateName",
|
143 143 | "com.amazonaws.iam.synthetic",
|
144 144 | "UploadServerCertificateInput",
|
145 145 | ),
|
146 146 | ::aws_smithy_schema::ShapeType::String,
|
147 - | "server_certificate_name",
|
147 + | "ServerCertificateName",
|
148 148 | 1,
|
149 149 | );
|
150 150 | static UPLOADSERVERCERTIFICATEINPUT_MEMBER_CERTIFICATE_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
151 151 | ::aws_smithy_schema::ShapeId::from_static(
|
152 152 | "com.amazonaws.iam.synthetic#UploadServerCertificateInput$CertificateBody",
|
153 153 | "com.amazonaws.iam.synthetic",
|
154 154 | "UploadServerCertificateInput",
|
155 155 | ),
|
156 156 | ::aws_smithy_schema::ShapeType::String,
|
157 - | "certificate_body",
|
157 + | "CertificateBody",
|
158 158 | 2,
|
159 159 | );
|
160 160 | static UPLOADSERVERCERTIFICATEINPUT_MEMBER_PRIVATE_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
161 161 | ::aws_smithy_schema::ShapeId::from_static(
|
162 162 | "com.amazonaws.iam.synthetic#UploadServerCertificateInput$PrivateKey",
|
163 163 | "com.amazonaws.iam.synthetic",
|
164 164 | "UploadServerCertificateInput",
|
165 165 | ),
|
166 166 | ::aws_smithy_schema::ShapeType::String,
|
167 - | "private_key",
|
167 + | "PrivateKey",
|
168 168 | 3,
|
169 169 | );
|
170 170 | static UPLOADSERVERCERTIFICATEINPUT_MEMBER_CERTIFICATE_CHAIN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
171 171 | ::aws_smithy_schema::ShapeId::from_static(
|
172 172 | "com.amazonaws.iam.synthetic#UploadServerCertificateInput$CertificateChain",
|
173 173 | "com.amazonaws.iam.synthetic",
|
174 174 | "UploadServerCertificateInput",
|
175 175 | ),
|
176 176 | ::aws_smithy_schema::ShapeType::String,
|
177 - | "certificate_chain",
|
177 + | "CertificateChain",
|
178 178 | 4,
|
179 179 | );
|
180 180 | static UPLOADSERVERCERTIFICATEINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
181 181 | ::aws_smithy_schema::ShapeId::from_static(
|
182 182 | "com.amazonaws.iam.synthetic#UploadServerCertificateInput$Tags",
|
183 183 | "com.amazonaws.iam.synthetic",
|
184 184 | "UploadServerCertificateInput",
|
185 185 | ),
|
186 186 | ::aws_smithy_schema::ShapeType::List,
|
187 - | "tags",
|
187 + | "Tags",
|
188 188 | 5,
|
189 189 | );
|
190 190 | static UPLOADSERVERCERTIFICATEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
191 191 | UPLOADSERVERCERTIFICATEINPUT_SCHEMA_ID,
|
192 192 | ::aws_smithy_schema::ShapeType::Structure,
|
193 193 | &[
|
194 194 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_PATH,
|
195 195 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_SERVER_CERTIFICATE_NAME,
|
196 196 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_CERTIFICATE_BODY,
|
197 197 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_PRIVATE_KEY,
|
198 198 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_CERTIFICATE_CHAIN,
|
199 199 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_TAGS,
|
200 200 | ],
|
201 201 | );
|
202 202 | impl UploadServerCertificateInput {
|
203 203 | /// The schema for this shape.
|
204 204 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPLOADSERVERCERTIFICATEINPUT_SCHEMA;
|
205 205 | }
|
206 206 | impl ::aws_smithy_schema::serde::SerializableStruct for UploadServerCertificateInput {
|
207 207 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
208 208 | fn serialize_members(
|
209 209 | &self,
|
210 210 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
211 211 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
212 212 | if let Some(ref val) = self.path {
|
213 213 | ser.write_string(&UPLOADSERVERCERTIFICATEINPUT_MEMBER_PATH, val)?;
|
214 214 | }
|
215 215 | if let Some(ref val) = self.server_certificate_name {
|
216 216 | ser.write_string(&UPLOADSERVERCERTIFICATEINPUT_MEMBER_SERVER_CERTIFICATE_NAME, val)?;
|
217 217 | }
|
218 218 | if let Some(ref val) = self.certificate_body {
|
219 219 | ser.write_string(&UPLOADSERVERCERTIFICATEINPUT_MEMBER_CERTIFICATE_BODY, val)?;
|
220 220 | }
|
221 221 | if let Some(ref val) = self.private_key {
|
222 222 | ser.write_string(&UPLOADSERVERCERTIFICATEINPUT_MEMBER_PRIVATE_KEY, val)?;
|
223 223 | }
|
224 224 | if let Some(ref val) = self.certificate_chain {
|
225 225 | ser.write_string(&UPLOADSERVERCERTIFICATEINPUT_MEMBER_CERTIFICATE_CHAIN, val)?;
|
226 226 | }
|
227 227 | if let Some(ref val) = self.tags {
|
228 228 | ser.write_list(
|
229 229 | &UPLOADSERVERCERTIFICATEINPUT_MEMBER_TAGS,
|
230 230 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
231 231 | for item in val {
|
232 232 | ser.write_struct(crate::types::Tag::SCHEMA, item)?;
|
233 233 | }
|
234 234 | Ok(())
|
235 235 | },
|
236 236 | )?;
|
237 237 | }
|
238 238 | Ok(())
|
239 239 | }
|
240 240 | }
|
241 241 | impl UploadServerCertificateInput {
|
242 242 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
243 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
244 - | deserializer: &mut D,
|
243 + | pub fn deserialize(
|
244 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
245 245 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
246 246 | #[allow(unused_variables, unused_mut)]
|
247 247 | let mut builder = Self::builder();
|
248 248 | #[allow(
|
249 249 | unused_variables,
|
250 250 | unreachable_code,
|
251 251 | clippy::single_match,
|
252 252 | clippy::match_single_binding,
|
253 253 | clippy::diverging_sub_expression
|
254 254 | )]
|
255 - | deserializer.read_struct(&UPLOADSERVERCERTIFICATEINPUT_SCHEMA, (), |_, member, deser| {
|
255 + | deserializer.read_struct(&UPLOADSERVERCERTIFICATEINPUT_SCHEMA, &mut |member, deser| {
|
256 256 | match member.member_index() {
|
257 257 | Some(0) => {
|
258 258 | builder.path = Some(deser.read_string(member)?);
|
259 259 | }
|
260 260 | Some(1) => {
|
261 261 | builder.server_certificate_name = Some(deser.read_string(member)?);
|
262 262 | }
|
263 263 | Some(2) => {
|
264 264 | builder.certificate_body = Some(deser.read_string(member)?);
|
265 265 | }
|
266 266 | Some(3) => {
|
267 267 | builder.private_key = Some(deser.read_string(member)?);
|
268 268 | }
|
269 269 | Some(4) => {
|
270 270 | builder.certificate_chain = Some(deser.read_string(member)?);
|
271 271 | }
|
272 272 | Some(5) => {
|
273 273 | builder.tags = Some({
|
274 - | let container = if let Some(cap) = deser.container_size() {
|
275 - | Vec::with_capacity(cap)
|
276 - | } else {
|
277 - | Vec::new()
|
278 - | };
|
279 - | deser.read_list(member, container, |mut list, deser| {
|
280 - | list.push(crate::types::Tag::deserialize(deser)?);
|
281 - | Ok(list)
|
282 - | })?
|
274 + | let mut container = Vec::new();
|
275 + | deser.read_list(member, &mut |deser| {
|
276 + | container.push(crate::types::Tag::deserialize(deser)?);
|
277 + | Ok(())
|
278 + | })?;
|
279 + | container
|
283 280 | });
|
284 281 | }
|
285 282 | _ => {}
|
286 283 | }
|
287 284 | Ok(())
|
288 285 | })?;
|
286 + | builder.server_certificate_name = builder.server_certificate_name.or(Some(String::new()));
|
287 + | builder.certificate_body = builder.certificate_body.or(Some(String::new()));
|
288 + | builder.private_key = builder.private_key.or(Some(String::new()));
|
289 289 | builder
|
290 290 | .build()
|
291 291 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
292 292 | }
|
293 293 | }
|
294 + | impl UploadServerCertificateInput {
|
295 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
296 + | pub fn deserialize_with_response(
|
297 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
298 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
299 + | _status: u16,
|
300 + | _body: &[u8],
|
301 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
302 + | Self::deserialize(deserializer)
|
303 + | }
|
304 + | }
|
294 305 | impl UploadServerCertificateInput {
|
295 306 | /// Creates a new builder-style object to manufacture [`UploadServerCertificateInput`](crate::operation::upload_server_certificate::UploadServerCertificateInput).
|
296 307 | pub fn builder() -> crate::operation::upload_server_certificate::builders::UploadServerCertificateInputBuilder {
|
297 308 | crate::operation::upload_server_certificate::builders::UploadServerCertificateInputBuilder::default()
|
298 309 | }
|
299 310 | }
|
300 311 |
|
301 312 | /// A builder for [`UploadServerCertificateInput`](crate::operation::upload_server_certificate::UploadServerCertificateInput).
|
302 313 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
303 314 | #[non_exhaustive]
|
304 315 | pub struct UploadServerCertificateInputBuilder {
|
305 316 | pub(crate) path: ::std::option::Option<::std::string::String>,
|
306 317 | pub(crate) server_certificate_name: ::std::option::Option<::std::string::String>,
|
307 318 | pub(crate) certificate_body: ::std::option::Option<::std::string::String>,
|
308 319 | pub(crate) private_key: ::std::option::Option<::std::string::String>,
|
309 320 | pub(crate) certificate_chain: ::std::option::Option<::std::string::String>,
|
310 321 | pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
311 322 | }
|
312 323 | impl UploadServerCertificateInputBuilder {
|
313 324 | /// <p>The path for the server certificate. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM identifiers</a> in the <i>IAM User Guide</i>.</p>
|
314 325 | /// <p>This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p><note>
|
315 326 | /// <p>If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the <code>path</code> parameter. The path must begin with <code>/cloudfront</code> and must include a trailing slash (for example, <code>/cloudfront/test/</code>).</p>
|
316 327 | /// </note>
|
317 328 | pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
318 329 | self.path = ::std::option::Option::Some(input.into());
|
319 330 | self
|
320 331 | }
|
321 332 | /// <p>The path for the server certificate. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM identifiers</a> in the <i>IAM User Guide</i>.</p>
|
322 333 | /// <p>This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p><note>
|
323 334 | /// <p>If you are uploading a server certificate specifically for use with Amazon CloudFront distributions, you must specify a path using the <code>path</code> parameter. The path must begin with <code>/cloudfront</code> and must include a trailing slash (for example, <code>/cloudfront/test/</code>).</p>
|