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 open_id_connect_provider_arn: ::std::option::Option<::std::string::String>,
|
9 9 | /// <p>The list of tags that you want to attach to the OIDC identity provider in IAM. Each tag consists of a key name and an associated value.</p>
|
10 10 | pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
11 11 | }
|
12 12 | impl TagOpenIdConnectProviderInput {
|
13 13 | /// <p>The ARN of the OIDC identity provider in IAM to which you want to add 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 open_id_connect_provider_arn(&self) -> ::std::option::Option<&str> {
|
16 16 | self.open_id_connect_provider_arn.as_deref()
|
17 17 | }
|
18 18 | /// <p>The list of tags that you want to attach to the OIDC identity provider in IAM. Each tag consists of a key name and an associated value.</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 `.tags.is_none()`.
|
21 21 | pub fn tags(&self) -> &[crate::types::Tag] {
|
22 22 | self.tags.as_deref().unwrap_or_default()
|
23 23 | }
|
24 24 | }
|
25 25 | static TAGOPENIDCONNECTPROVIDERINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
26 26 | "com.amazonaws.iam.synthetic#TagOpenIDConnectProviderInput",
|
27 27 | "com.amazonaws.iam.synthetic",
|
28 28 | "TagOpenIDConnectProviderInput",
|
29 29 | );
|
30 30 | static TAGOPENIDCONNECTPROVIDERINPUT_MEMBER_OPEN_ID_CONNECT_PROVIDER_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
31 31 | ::aws_smithy_schema::ShapeId::from_static(
|
32 32 | "com.amazonaws.iam.synthetic#TagOpenIDConnectProviderInput$OpenIDConnectProviderArn",
|
33 33 | "com.amazonaws.iam.synthetic",
|
34 34 | "TagOpenIDConnectProviderInput",
|
35 35 | ),
|
36 36 | ::aws_smithy_schema::ShapeType::String,
|
37 - | "open_id_connect_provider_arn",
|
37 + | "OpenIDConnectProviderArn",
|
38 38 | 0,
|
39 39 | );
|
40 40 | static TAGOPENIDCONNECTPROVIDERINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
41 41 | ::aws_smithy_schema::ShapeId::from_static(
|
42 42 | "com.amazonaws.iam.synthetic#TagOpenIDConnectProviderInput$Tags",
|
43 43 | "com.amazonaws.iam.synthetic",
|
44 44 | "TagOpenIDConnectProviderInput",
|
45 45 | ),
|
46 46 | ::aws_smithy_schema::ShapeType::List,
|
47 - | "tags",
|
47 + | "Tags",
|
48 48 | 1,
|
49 49 | );
|
50 50 | static TAGOPENIDCONNECTPROVIDERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
51 51 | TAGOPENIDCONNECTPROVIDERINPUT_SCHEMA_ID,
|
52 52 | ::aws_smithy_schema::ShapeType::Structure,
|
53 53 | &[
|
54 54 | &TAGOPENIDCONNECTPROVIDERINPUT_MEMBER_OPEN_ID_CONNECT_PROVIDER_ARN,
|
55 55 | &TAGOPENIDCONNECTPROVIDERINPUT_MEMBER_TAGS,
|
56 56 | ],
|
57 57 | );
|
58 58 | impl TagOpenIdConnectProviderInput {
|
59 59 | /// The schema for this shape.
|
60 60 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TAGOPENIDCONNECTPROVIDERINPUT_SCHEMA;
|
61 61 | }
|
62 62 | impl ::aws_smithy_schema::serde::SerializableStruct for TagOpenIdConnectProviderInput {
|
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.open_id_connect_provider_arn {
|
69 69 | ser.write_string(&TAGOPENIDCONNECTPROVIDERINPUT_MEMBER_OPEN_ID_CONNECT_PROVIDER_ARN, val)?;
|
70 70 | }
|
71 71 | if let Some(ref val) = self.tags {
|
72 72 | ser.write_list(
|
73 73 | &TAGOPENIDCONNECTPROVIDERINPUT_MEMBER_TAGS,
|
74 74 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
75 75 | for item in val {
|
76 76 | ser.write_struct(crate::types::Tag::SCHEMA, item)?;
|
77 77 | }
|
78 78 | Ok(())
|
79 79 | },
|
80 80 | )?;
|
81 81 | }
|
82 82 | Ok(())
|
83 83 | }
|
84 84 | }
|
85 85 | impl TagOpenIdConnectProviderInput {
|
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(&TAGOPENIDCONNECTPROVIDERINPUT_SCHEMA, (), |_, member, deser| {
|
99 + | deserializer.read_struct(&TAGOPENIDCONNECTPROVIDERINPUT_SCHEMA, &mut |member, deser| {
|
100 100 | match member.member_index() {
|
101 101 | Some(0) => {
|
102 102 | builder.open_id_connect_provider_arn = Some(deser.read_string(member)?);
|
103 103 | }
|
104 104 | Some(1) => {
|
105 105 | builder.tags = 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(crate::types::Tag::deserialize(deser)?);
|
113 - | Ok(list)
|
114 - | })?
|
106 + | let mut container = Vec::new();
|
107 + | deser.read_list(member, &mut |deser| {
|
108 + | container.push(crate::types::Tag::deserialize(deser)?);
|
109 + | Ok(())
|
110 + | })?;
|
111 + | container
|
115 112 | });
|
116 113 | }
|
117 114 | _ => {}
|
118 115 | }
|
119 116 | Ok(())
|
120 117 | })?;
|
118 + | builder.open_id_connect_provider_arn = builder.open_id_connect_provider_arn.or(Some(String::new()));
|
119 + | builder.tags = builder.tags.or(Some(Vec::new()));
|
121 120 | builder
|
122 121 | .build()
|
123 122 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
124 123 | }
|
125 124 | }
|
125 + | impl TagOpenIdConnectProviderInput {
|
126 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
127 + | pub fn deserialize_with_response(
|
128 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
129 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
130 + | _status: u16,
|
131 + | _body: &[u8],
|
132 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
133 + | Self::deserialize(deserializer)
|
134 + | }
|
135 + | }
|
126 136 | impl TagOpenIdConnectProviderInput {
|
127 137 | /// Creates a new builder-style object to manufacture [`TagOpenIdConnectProviderInput`](crate::operation::tag_open_id_connect_provider::TagOpenIdConnectProviderInput).
|
128 138 | pub fn builder() -> crate::operation::tag_open_id_connect_provider::builders::TagOpenIdConnectProviderInputBuilder {
|
129 139 | crate::operation::tag_open_id_connect_provider::builders::TagOpenIdConnectProviderInputBuilder::default()
|
130 140 | }
|
131 141 | }
|
132 142 |
|
133 143 | /// A builder for [`TagOpenIdConnectProviderInput`](crate::operation::tag_open_id_connect_provider::TagOpenIdConnectProviderInput).
|
134 144 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
135 145 | #[non_exhaustive]
|
136 146 | pub struct TagOpenIdConnectProviderInputBuilder {
|
137 147 | pub(crate) open_id_connect_provider_arn: ::std::option::Option<::std::string::String>,
|
138 148 | pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
139 149 | }
|
140 150 | impl TagOpenIdConnectProviderInputBuilder {
|
141 151 | /// <p>The ARN of the OIDC identity provider in IAM to which you want to add tags.</p>
|
142 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>
|
143 153 | /// This field is required.
|
144 154 | pub fn open_id_connect_provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
145 155 | self.open_id_connect_provider_arn = ::std::option::Option::Some(input.into());
|
146 156 | self
|
147 157 | }
|
148 158 | /// <p>The ARN of the OIDC identity provider in IAM to which you want to add tags.</p>
|
149 159 | /// <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 160 | pub fn set_open_id_connect_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
151 161 | self.open_id_connect_provider_arn = input;
|
152 162 | self
|
153 163 | }
|
154 164 | /// <p>The ARN of the OIDC identity provider in IAM to which you want to add tags.</p>
|
155 165 | /// <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>
|