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 server_certificate_name: ::std::option::Option<::std::string::String>,
|
9 9 | /// <p>A list of key names as a simple array of strings. The tags with matching keys are removed from the specified IAM server certificate.</p>
|
10 10 | pub tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
11 11 | }
|
12 12 | impl UntagServerCertificateInput {
|
13 13 | /// <p>The name of the IAM server certificate from which you want to remove tags.</p>
|
14 14 | /// <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>
|
15 15 | pub fn server_certificate_name(&self) -> ::std::option::Option<&str> {
|
16 16 | self.server_certificate_name.as_deref()
|
17 17 | }
|
18 18 | /// <p>A list of key names as a simple array of strings. The tags with matching keys are removed from the specified IAM server certificate.</p>
|
19 19 | ///
|
20 20 | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_keys.is_none()`.
|
21 21 | pub fn tag_keys(&self) -> &[::std::string::String] {
|
22 22 | self.tag_keys.as_deref().unwrap_or_default()
|
23 23 | }
|
24 24 | }
|
25 25 | static UNTAGSERVERCERTIFICATEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
26 26 | "com.amazonaws.iam.synthetic#UntagServerCertificateInput",
|
27 27 | "com.amazonaws.iam.synthetic",
|
28 28 | "UntagServerCertificateInput",
|
29 29 | );
|
30 30 | static UNTAGSERVERCERTIFICATEINPUT_MEMBER_SERVER_CERTIFICATE_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#UntagServerCertificateInput$ServerCertificateName",
|
33 33 | "com.amazonaws.iam.synthetic",
|
34 34 | "UntagServerCertificateInput",
|
35 35 | ),
|
36 36 | ::aws_smithy_schema::ShapeType::String,
|
37 - | "server_certificate_name",
|
37 + | "ServerCertificateName",
|
38 38 | 0,
|
39 39 | );
|
40 40 | static UNTAGSERVERCERTIFICATEINPUT_MEMBER_TAG_KEYS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
41 41 | ::aws_smithy_schema::ShapeId::from_static(
|
42 42 | "com.amazonaws.iam.synthetic#UntagServerCertificateInput$TagKeys",
|
43 43 | "com.amazonaws.iam.synthetic",
|
44 44 | "UntagServerCertificateInput",
|
45 45 | ),
|
46 46 | ::aws_smithy_schema::ShapeType::List,
|
47 - | "tag_keys",
|
47 + | "TagKeys",
|
48 48 | 1,
|
49 49 | );
|
50 50 | static UNTAGSERVERCERTIFICATEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
51 51 | UNTAGSERVERCERTIFICATEINPUT_SCHEMA_ID,
|
52 52 | ::aws_smithy_schema::ShapeType::Structure,
|
53 53 | &[
|
54 54 | &UNTAGSERVERCERTIFICATEINPUT_MEMBER_SERVER_CERTIFICATE_NAME,
|
55 55 | &UNTAGSERVERCERTIFICATEINPUT_MEMBER_TAG_KEYS,
|
56 56 | ],
|
57 57 | );
|
58 58 | impl UntagServerCertificateInput {
|
59 59 | /// The schema for this shape.
|
60 60 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UNTAGSERVERCERTIFICATEINPUT_SCHEMA;
|
61 61 | }
|
62 62 | impl ::aws_smithy_schema::serde::SerializableStruct for UntagServerCertificateInput {
|
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.server_certificate_name {
|
69 69 | ser.write_string(&UNTAGSERVERCERTIFICATEINPUT_MEMBER_SERVER_CERTIFICATE_NAME, val)?;
|
70 70 | }
|
71 71 | if let Some(ref val) = self.tag_keys {
|
72 72 | ser.write_list(
|
73 73 | &UNTAGSERVERCERTIFICATEINPUT_MEMBER_TAG_KEYS,
|
74 74 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
75 75 | for item in val {
|
76 76 | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
77 77 | }
|
78 78 | Ok(())
|
79 79 | },
|
80 80 | )?;
|
81 81 | }
|
82 82 | Ok(())
|
83 83 | }
|
84 84 | }
|
85 85 | impl UntagServerCertificateInput {
|
86 86 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
87 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
88 - | deserializer: &mut D,
|
87 + | pub fn deserialize(
|
88 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
89 89 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
90 90 | #[allow(unused_variables, unused_mut)]
|
91 91 | let mut builder = Self::builder();
|
92 92 | #[allow(
|
93 93 | unused_variables,
|
94 94 | unreachable_code,
|
95 95 | clippy::single_match,
|
96 96 | clippy::match_single_binding,
|
97 97 | clippy::diverging_sub_expression
|
98 98 | )]
|
99 - | deserializer.read_struct(&UNTAGSERVERCERTIFICATEINPUT_SCHEMA, (), |_, member, deser| {
|
99 + | deserializer.read_struct(&UNTAGSERVERCERTIFICATEINPUT_SCHEMA, &mut |member, deser| {
|
100 100 | match member.member_index() {
|
101 101 | Some(0) => {
|
102 102 | builder.server_certificate_name = Some(deser.read_string(member)?);
|
103 103 | }
|
104 104 | Some(1) => {
|
105 - | builder.tag_keys = Some({
|
106 - | let container = if let Some(cap) = deser.container_size() {
|
107 - | Vec::with_capacity(cap)
|
108 - | } else {
|
109 - | Vec::new()
|
110 - | };
|
111 - | deser.read_list(member, container, |mut list, deser| {
|
112 - | list.push(deser.read_string(member)?);
|
113 - | Ok(list)
|
114 - | })?
|
115 - | });
|
105 + | builder.tag_keys = Some(deser.read_string_list(member)?);
|
116 106 | }
|
117 107 | _ => {}
|
118 108 | }
|
119 109 | Ok(())
|
120 110 | })?;
|
111 + | builder.server_certificate_name = builder.server_certificate_name.or(Some(String::new()));
|
112 + | builder.tag_keys = builder.tag_keys.or(Some(Vec::new()));
|
121 113 | builder
|
122 114 | .build()
|
123 115 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
124 116 | }
|
125 117 | }
|
118 + | impl UntagServerCertificateInput {
|
119 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
120 + | pub fn deserialize_with_response(
|
121 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
122 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
123 + | _status: u16,
|
124 + | _body: &[u8],
|
125 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
126 + | Self::deserialize(deserializer)
|
127 + | }
|
128 + | }
|
126 129 | impl UntagServerCertificateInput {
|
127 130 | /// Creates a new builder-style object to manufacture [`UntagServerCertificateInput`](crate::operation::untag_server_certificate::UntagServerCertificateInput).
|
128 131 | pub fn builder() -> crate::operation::untag_server_certificate::builders::UntagServerCertificateInputBuilder {
|
129 132 | crate::operation::untag_server_certificate::builders::UntagServerCertificateInputBuilder::default()
|
130 133 | }
|
131 134 | }
|
132 135 |
|
133 136 | /// A builder for [`UntagServerCertificateInput`](crate::operation::untag_server_certificate::UntagServerCertificateInput).
|
134 137 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
135 138 | #[non_exhaustive]
|
136 139 | pub struct UntagServerCertificateInputBuilder {
|
137 140 | pub(crate) server_certificate_name: ::std::option::Option<::std::string::String>,
|
138 141 | pub(crate) tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
139 142 | }
|
140 143 | impl UntagServerCertificateInputBuilder {
|
141 144 | /// <p>The name of the IAM server certificate from which you want to remove tags.</p>
|
142 145 | /// <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>
|
143 146 | /// This field is required.
|
144 147 | pub fn server_certificate_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
145 148 | self.server_certificate_name = ::std::option::Option::Some(input.into());
|
146 149 | self
|
147 150 | }
|
148 151 | /// <p>The name of the IAM server certificate from which you want to remove tags.</p>
|
149 152 | /// <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>
|
150 153 | pub fn set_server_certificate_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
151 154 | self.server_certificate_name = input;
|
152 155 | self
|
153 156 | }
|
154 157 | /// <p>The name of the IAM server certificate from which you want to remove tags.</p>
|
155 158 | /// <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>
|