7 7 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
|
8 8 | pub user_name: ::std::option::Option<::std::string::String>,
|
9 9 | /// <p>The unique identifier for the SSH public key.</p>
|
10 10 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters that can consist of any upper or lowercased letter or digit.</p>
|
11 11 | pub ssh_public_key_id: ::std::option::Option<::std::string::String>,
|
12 12 | }
|
13 13 | impl DeleteSshPublicKeyInput {
|
14 14 | /// <p>The name of the IAM user associated with the SSH public key.</p>
|
15 15 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
|
16 16 | pub fn user_name(&self) -> ::std::option::Option<&str> {
|
17 17 | self.user_name.as_deref()
|
18 18 | }
|
19 19 | /// <p>The unique identifier for the SSH public key.</p>
|
20 20 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters that can consist of any upper or lowercased letter or digit.</p>
|
21 21 | pub fn ssh_public_key_id(&self) -> ::std::option::Option<&str> {
|
22 22 | self.ssh_public_key_id.as_deref()
|
23 23 | }
|
24 24 | }
|
25 25 | static DELETESSHPUBLICKEYINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
26 26 | "com.amazonaws.iam.synthetic#DeleteSSHPublicKeyInput",
|
27 27 | "com.amazonaws.iam.synthetic",
|
28 28 | "DeleteSSHPublicKeyInput",
|
29 29 | );
|
30 30 | static DELETESSHPUBLICKEYINPUT_MEMBER_USER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
31 31 | ::aws_smithy_schema::ShapeId::from_static(
|
32 32 | "com.amazonaws.iam.synthetic#DeleteSSHPublicKeyInput$UserName",
|
33 33 | "com.amazonaws.iam.synthetic",
|
34 34 | "DeleteSSHPublicKeyInput",
|
35 35 | ),
|
36 36 | ::aws_smithy_schema::ShapeType::String,
|
37 - | "user_name",
|
37 + | "UserName",
|
38 38 | 0,
|
39 39 | );
|
40 40 | static DELETESSHPUBLICKEYINPUT_MEMBER_SSH_PUBLIC_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
41 41 | ::aws_smithy_schema::ShapeId::from_static(
|
42 42 | "com.amazonaws.iam.synthetic#DeleteSSHPublicKeyInput$SSHPublicKeyId",
|
43 43 | "com.amazonaws.iam.synthetic",
|
44 44 | "DeleteSSHPublicKeyInput",
|
45 45 | ),
|
46 46 | ::aws_smithy_schema::ShapeType::String,
|
47 - | "ssh_public_key_id",
|
47 + | "SSHPublicKeyId",
|
48 48 | 1,
|
49 49 | );
|
50 50 | static DELETESSHPUBLICKEYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
51 51 | DELETESSHPUBLICKEYINPUT_SCHEMA_ID,
|
52 52 | ::aws_smithy_schema::ShapeType::Structure,
|
53 53 | &[
|
54 54 | &DELETESSHPUBLICKEYINPUT_MEMBER_USER_NAME,
|
55 55 | &DELETESSHPUBLICKEYINPUT_MEMBER_SSH_PUBLIC_KEY_ID,
|
56 56 | ],
|
57 57 | );
|
58 58 | impl DeleteSshPublicKeyInput {
|
59 59 | /// The schema for this shape.
|
60 60 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETESSHPUBLICKEYINPUT_SCHEMA;
|
61 61 | }
|
62 62 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteSshPublicKeyInput {
|
63 63 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
64 64 | fn serialize_members(
|
65 65 | &self,
|
66 66 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
67 67 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
68 68 | if let Some(ref val) = self.user_name {
|
69 69 | ser.write_string(&DELETESSHPUBLICKEYINPUT_MEMBER_USER_NAME, val)?;
|
70 70 | }
|
71 71 | if let Some(ref val) = self.ssh_public_key_id {
|
72 72 | ser.write_string(&DELETESSHPUBLICKEYINPUT_MEMBER_SSH_PUBLIC_KEY_ID, val)?;
|
73 73 | }
|
74 74 | Ok(())
|
75 75 | }
|
76 76 | }
|
77 77 | impl DeleteSshPublicKeyInput {
|
78 78 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
79 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
80 - | deserializer: &mut D,
|
79 + | pub fn deserialize(
|
80 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
81 81 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
82 82 | #[allow(unused_variables, unused_mut)]
|
83 83 | let mut builder = Self::builder();
|
84 84 | #[allow(
|
85 85 | unused_variables,
|
86 86 | unreachable_code,
|
87 87 | clippy::single_match,
|
88 88 | clippy::match_single_binding,
|
89 89 | clippy::diverging_sub_expression
|
90 90 | )]
|
91 - | deserializer.read_struct(&DELETESSHPUBLICKEYINPUT_SCHEMA, (), |_, member, deser| {
|
91 + | deserializer.read_struct(&DELETESSHPUBLICKEYINPUT_SCHEMA, &mut |member, deser| {
|
92 92 | match member.member_index() {
|
93 93 | Some(0) => {
|
94 94 | builder.user_name = Some(deser.read_string(member)?);
|
95 95 | }
|
96 96 | Some(1) => {
|
97 97 | builder.ssh_public_key_id = Some(deser.read_string(member)?);
|
98 98 | }
|
99 99 | _ => {}
|
100 100 | }
|
101 101 | Ok(())
|
102 102 | })?;
|
103 + | builder.user_name = builder.user_name.or(Some(String::new()));
|
104 + | builder.ssh_public_key_id = builder.ssh_public_key_id.or(Some(String::new()));
|
103 105 | builder
|
104 106 | .build()
|
105 107 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
106 108 | }
|
107 109 | }
|
110 + | impl DeleteSshPublicKeyInput {
|
111 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
112 + | pub fn deserialize_with_response(
|
113 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
114 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
115 + | _status: u16,
|
116 + | _body: &[u8],
|
117 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
118 + | Self::deserialize(deserializer)
|
119 + | }
|
120 + | }
|
108 121 | impl DeleteSshPublicKeyInput {
|
109 122 | /// Creates a new builder-style object to manufacture [`DeleteSshPublicKeyInput`](crate::operation::delete_ssh_public_key::DeleteSshPublicKeyInput).
|
110 123 | pub fn builder() -> crate::operation::delete_ssh_public_key::builders::DeleteSshPublicKeyInputBuilder {
|
111 124 | crate::operation::delete_ssh_public_key::builders::DeleteSshPublicKeyInputBuilder::default()
|
112 125 | }
|
113 126 | }
|
114 127 |
|
115 128 | /// A builder for [`DeleteSshPublicKeyInput`](crate::operation::delete_ssh_public_key::DeleteSshPublicKeyInput).
|
116 129 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
117 130 | #[non_exhaustive]
|
118 131 | pub struct DeleteSshPublicKeyInputBuilder {
|
119 132 | pub(crate) user_name: ::std::option::Option<::std::string::String>,
|
120 133 | pub(crate) ssh_public_key_id: ::std::option::Option<::std::string::String>,
|
121 134 | }
|
122 135 | impl DeleteSshPublicKeyInputBuilder {
|
123 136 | /// <p>The name of the IAM user associated with the SSH public key.</p>
|
124 137 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
|
125 138 | /// This field is required.
|
126 139 | pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
127 140 | self.user_name = ::std::option::Option::Some(input.into());
|
128 141 | self
|
129 142 | }
|
130 143 | /// <p>The name of the IAM user associated with the SSH public key.</p>
|
131 144 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
|
132 145 | pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
133 146 | self.user_name = input;
|
134 147 | self
|
135 148 | }
|
136 149 | /// <p>The name of the IAM user associated with the SSH public key.</p>
|
137 150 | /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
|