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 of the service-specific credential. You can get this value by calling <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListServiceSpecificCredentials.html">ListServiceSpecificCredentials</a>.</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 service_specific_credential_id: ::std::option::Option<::std::string::String>,
|
12 12 | }
|
13 13 | impl DeleteServiceSpecificCredentialInput {
|
14 14 | /// <p>The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.</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 of the service-specific credential. You can get this value by calling <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListServiceSpecificCredentials.html">ListServiceSpecificCredentials</a>.</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 service_specific_credential_id(&self) -> ::std::option::Option<&str> {
|
22 22 | self.service_specific_credential_id.as_deref()
|
23 23 | }
|
24 24 | }
|
25 25 | static DELETESERVICESPECIFICCREDENTIALINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
26 26 | "com.amazonaws.iam.synthetic#DeleteServiceSpecificCredentialInput",
|
27 27 | "com.amazonaws.iam.synthetic",
|
28 28 | "DeleteServiceSpecificCredentialInput",
|
29 29 | );
|
30 30 | static DELETESERVICESPECIFICCREDENTIALINPUT_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#DeleteServiceSpecificCredentialInput$UserName",
|
33 33 | "com.amazonaws.iam.synthetic",
|
34 34 | "DeleteServiceSpecificCredentialInput",
|
35 35 | ),
|
36 36 | ::aws_smithy_schema::ShapeType::String,
|
37 - | "user_name",
|
37 + | "UserName",
|
38 38 | 0,
|
39 39 | );
|
40 40 | static DELETESERVICESPECIFICCREDENTIALINPUT_MEMBER_SERVICE_SPECIFIC_CREDENTIAL_ID: ::aws_smithy_schema::Schema =
|
41 41 | ::aws_smithy_schema::Schema::new_member(
|
42 42 | ::aws_smithy_schema::ShapeId::from_static(
|
43 43 | "com.amazonaws.iam.synthetic#DeleteServiceSpecificCredentialInput$ServiceSpecificCredentialId",
|
44 44 | "com.amazonaws.iam.synthetic",
|
45 45 | "DeleteServiceSpecificCredentialInput",
|
46 46 | ),
|
47 47 | ::aws_smithy_schema::ShapeType::String,
|
48 - | "service_specific_credential_id",
|
48 + | "ServiceSpecificCredentialId",
|
49 49 | 1,
|
50 50 | );
|
51 51 | static DELETESERVICESPECIFICCREDENTIALINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
52 52 | DELETESERVICESPECIFICCREDENTIALINPUT_SCHEMA_ID,
|
53 53 | ::aws_smithy_schema::ShapeType::Structure,
|
54 54 | &[
|
55 55 | &DELETESERVICESPECIFICCREDENTIALINPUT_MEMBER_USER_NAME,
|
56 56 | &DELETESERVICESPECIFICCREDENTIALINPUT_MEMBER_SERVICE_SPECIFIC_CREDENTIAL_ID,
|
57 57 | ],
|
58 58 | );
|
59 59 | impl DeleteServiceSpecificCredentialInput {
|
60 60 | /// The schema for this shape.
|
61 61 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETESERVICESPECIFICCREDENTIALINPUT_SCHEMA;
|
62 62 | }
|
63 63 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteServiceSpecificCredentialInput {
|
64 64 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
65 65 | fn serialize_members(
|
66 66 | &self,
|
67 67 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
68 68 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
69 69 | if let Some(ref val) = self.user_name {
|
70 70 | ser.write_string(&DELETESERVICESPECIFICCREDENTIALINPUT_MEMBER_USER_NAME, val)?;
|
71 71 | }
|
72 72 | if let Some(ref val) = self.service_specific_credential_id {
|
73 73 | ser.write_string(&DELETESERVICESPECIFICCREDENTIALINPUT_MEMBER_SERVICE_SPECIFIC_CREDENTIAL_ID, val)?;
|
74 74 | }
|
75 75 | Ok(())
|
76 76 | }
|
77 77 | }
|
78 78 | impl DeleteServiceSpecificCredentialInput {
|
79 79 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
80 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
81 - | deserializer: &mut D,
|
80 + | pub fn deserialize(
|
81 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
82 82 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
83 83 | #[allow(unused_variables, unused_mut)]
|
84 84 | let mut builder = Self::builder();
|
85 85 | #[allow(
|
86 86 | unused_variables,
|
87 87 | unreachable_code,
|
88 88 | clippy::single_match,
|
89 89 | clippy::match_single_binding,
|
90 90 | clippy::diverging_sub_expression
|
91 91 | )]
|
92 - | deserializer.read_struct(&DELETESERVICESPECIFICCREDENTIALINPUT_SCHEMA, (), |_, member, deser| {
|
92 + | deserializer.read_struct(&DELETESERVICESPECIFICCREDENTIALINPUT_SCHEMA, &mut |member, deser| {
|
93 93 | match member.member_index() {
|
94 94 | Some(0) => {
|
95 95 | builder.user_name = Some(deser.read_string(member)?);
|
96 96 | }
|
97 97 | Some(1) => {
|
98 98 | builder.service_specific_credential_id = Some(deser.read_string(member)?);
|
99 99 | }
|
100 100 | _ => {}
|
101 101 | }
|
102 102 | Ok(())
|
103 103 | })?;
|
104 + | builder.service_specific_credential_id = builder.service_specific_credential_id.or(Some(String::new()));
|
104 105 | builder
|
105 106 | .build()
|
106 107 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
107 108 | }
|
108 109 | }
|
110 + | impl DeleteServiceSpecificCredentialInput {
|
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 + | }
|
109 121 | impl DeleteServiceSpecificCredentialInput {
|
110 122 | /// Creates a new builder-style object to manufacture [`DeleteServiceSpecificCredentialInput`](crate::operation::delete_service_specific_credential::DeleteServiceSpecificCredentialInput).
|
111 123 | pub fn builder() -> crate::operation::delete_service_specific_credential::builders::DeleteServiceSpecificCredentialInputBuilder {
|
112 124 | crate::operation::delete_service_specific_credential::builders::DeleteServiceSpecificCredentialInputBuilder::default()
|
113 125 | }
|
114 126 | }
|
115 127 |
|
116 128 | /// A builder for [`DeleteServiceSpecificCredentialInput`](crate::operation::delete_service_specific_credential::DeleteServiceSpecificCredentialInput).
|
117 129 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
118 130 | #[non_exhaustive]
|
119 131 | pub struct DeleteServiceSpecificCredentialInputBuilder {
|
120 132 | pub(crate) user_name: ::std::option::Option<::std::string::String>,
|
121 133 | pub(crate) service_specific_credential_id: ::std::option::Option<::std::string::String>,
|
122 134 | }
|
123 135 | impl DeleteServiceSpecificCredentialInputBuilder {
|
124 136 | /// <p>The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.</p>
|
125 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>
|
126 138 | pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
127 139 | self.user_name = ::std::option::Option::Some(input.into());
|
128 140 | self
|
129 141 | }
|
130 142 | /// <p>The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.</p>
|
131 143 | /// <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 144 | pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
133 145 | self.user_name = input;
|
134 146 | self
|
135 147 | }
|
136 148 | /// <p>The name of the IAM user associated with the service-specific credential. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.</p>
|
137 149 | /// <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>
|
138 150 | pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
|