48 48 | }
|
49 49 | static CODESIGNINGCONFIG_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
50 50 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.lambda#CodeSigningConfig", "com.amazonaws.lambda", "CodeSigningConfig");
|
51 51 | static CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_CONFIG_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
52 52 | ::aws_smithy_schema::ShapeId::from_static(
|
53 53 | "com.amazonaws.lambda#CodeSigningConfig$CodeSigningConfigId",
|
54 54 | "com.amazonaws.lambda",
|
55 55 | "CodeSigningConfig",
|
56 56 | ),
|
57 57 | ::aws_smithy_schema::ShapeType::String,
|
58 - | "code_signing_config_id",
|
58 + | "CodeSigningConfigId",
|
59 59 | 0,
|
60 60 | );
|
61 61 | static CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_CONFIG_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
62 62 | ::aws_smithy_schema::ShapeId::from_static(
|
63 63 | "com.amazonaws.lambda#CodeSigningConfig$CodeSigningConfigArn",
|
64 64 | "com.amazonaws.lambda",
|
65 65 | "CodeSigningConfig",
|
66 66 | ),
|
67 67 | ::aws_smithy_schema::ShapeType::String,
|
68 - | "code_signing_config_arn",
|
68 + | "CodeSigningConfigArn",
|
69 69 | 1,
|
70 70 | );
|
71 71 | static CODESIGNINGCONFIG_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
72 72 | ::aws_smithy_schema::ShapeId::from_static(
|
73 73 | "com.amazonaws.lambda#CodeSigningConfig$Description",
|
74 74 | "com.amazonaws.lambda",
|
75 75 | "CodeSigningConfig",
|
76 76 | ),
|
77 77 | ::aws_smithy_schema::ShapeType::String,
|
78 - | "description",
|
78 + | "Description",
|
79 79 | 2,
|
80 80 | );
|
81 81 | static CODESIGNINGCONFIG_MEMBER_ALLOWED_PUBLISHERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
82 82 | ::aws_smithy_schema::ShapeId::from_static(
|
83 83 | "com.amazonaws.lambda#CodeSigningConfig$AllowedPublishers",
|
84 84 | "com.amazonaws.lambda",
|
85 85 | "CodeSigningConfig",
|
86 86 | ),
|
87 87 | ::aws_smithy_schema::ShapeType::Structure,
|
88 - | "allowed_publishers",
|
88 + | "AllowedPublishers",
|
89 89 | 3,
|
90 90 | );
|
91 91 | static CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_POLICIES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
92 92 | ::aws_smithy_schema::ShapeId::from_static(
|
93 93 | "com.amazonaws.lambda#CodeSigningConfig$CodeSigningPolicies",
|
94 94 | "com.amazonaws.lambda",
|
95 95 | "CodeSigningConfig",
|
96 96 | ),
|
97 97 | ::aws_smithy_schema::ShapeType::Structure,
|
98 - | "code_signing_policies",
|
98 + | "CodeSigningPolicies",
|
99 99 | 4,
|
100 100 | );
|
101 101 | static CODESIGNINGCONFIG_MEMBER_LAST_MODIFIED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
102 102 | ::aws_smithy_schema::ShapeId::from_static(
|
103 103 | "com.amazonaws.lambda#CodeSigningConfig$LastModified",
|
104 104 | "com.amazonaws.lambda",
|
105 105 | "CodeSigningConfig",
|
106 106 | ),
|
107 107 | ::aws_smithy_schema::ShapeType::String,
|
108 - | "last_modified",
|
108 + | "LastModified",
|
109 109 | 5,
|
110 110 | );
|
111 111 | static CODESIGNINGCONFIG_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
112 112 | CODESIGNINGCONFIG_SCHEMA_ID,
|
113 113 | ::aws_smithy_schema::ShapeType::Structure,
|
114 114 | &[
|
115 115 | &CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_CONFIG_ID,
|
116 116 | &CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_CONFIG_ARN,
|
117 117 | &CODESIGNINGCONFIG_MEMBER_DESCRIPTION,
|
118 118 | &CODESIGNINGCONFIG_MEMBER_ALLOWED_PUBLISHERS,
|
119 119 | &CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_POLICIES,
|
120 120 | &CODESIGNINGCONFIG_MEMBER_LAST_MODIFIED,
|
121 121 | ],
|
122 122 | );
|
123 123 | impl CodeSigningConfig {
|
124 124 | /// The schema for this shape.
|
125 125 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CODESIGNINGCONFIG_SCHEMA;
|
126 126 | }
|
127 127 | impl ::aws_smithy_schema::serde::SerializableStruct for CodeSigningConfig {
|
128 128 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
129 129 | fn serialize_members(
|
130 130 | &self,
|
131 131 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
132 132 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
133 133 | {
|
134 134 | let val = &self.code_signing_config_id;
|
135 135 | ser.write_string(&CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_CONFIG_ID, val)?;
|
136 136 | }
|
137 137 | {
|
138 138 | let val = &self.code_signing_config_arn;
|
139 139 | ser.write_string(&CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_CONFIG_ARN, val)?;
|
140 140 | }
|
141 141 | if let Some(ref val) = self.description {
|
142 142 | ser.write_string(&CODESIGNINGCONFIG_MEMBER_DESCRIPTION, val)?;
|
143 143 | }
|
144 144 | if let Some(ref val) = self.allowed_publishers {
|
145 145 | ser.write_struct(&CODESIGNINGCONFIG_MEMBER_ALLOWED_PUBLISHERS, val)?;
|
146 146 | }
|
147 147 | if let Some(ref val) = self.code_signing_policies {
|
148 148 | ser.write_struct(&CODESIGNINGCONFIG_MEMBER_CODE_SIGNING_POLICIES, val)?;
|
149 149 | }
|
150 150 | {
|
151 151 | let val = &self.last_modified;
|
152 152 | ser.write_string(&CODESIGNINGCONFIG_MEMBER_LAST_MODIFIED, val)?;
|
153 153 | }
|
154 154 | Ok(())
|
155 155 | }
|
156 156 | }
|
157 157 | impl CodeSigningConfig {
|
158 158 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
159 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
160 - | deserializer: &mut D,
|
159 + | pub fn deserialize(
|
160 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
161 161 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
162 162 | #[allow(unused_variables, unused_mut)]
|
163 163 | let mut builder = Self::builder();
|
164 164 | #[allow(
|
165 165 | unused_variables,
|
166 166 | unreachable_code,
|
167 167 | clippy::single_match,
|
168 168 | clippy::match_single_binding,
|
169 169 | clippy::diverging_sub_expression
|
170 170 | )]
|
171 - | deserializer.read_struct(&CODESIGNINGCONFIG_SCHEMA, (), |_, member, deser| {
|
171 + | deserializer.read_struct(&CODESIGNINGCONFIG_SCHEMA, &mut |member, deser| {
|
172 172 | match member.member_index() {
|
173 173 | Some(0) => {
|
174 174 | builder.code_signing_config_id = Some(deser.read_string(member)?);
|
175 175 | }
|
176 176 | Some(1) => {
|
177 177 | builder.code_signing_config_arn = Some(deser.read_string(member)?);
|
178 178 | }
|
179 179 | Some(2) => {
|
180 180 | builder.description = Some(deser.read_string(member)?);
|
181 181 | }
|
182 182 | Some(3) => {
|
183 183 | builder.allowed_publishers = Some(crate::types::AllowedPublishers::deserialize(deser)?);
|
184 184 | }
|
185 185 | Some(4) => {
|
186 186 | builder.code_signing_policies = Some(crate::types::CodeSigningPolicies::deserialize(deser)?);
|
187 187 | }
|
188 188 | Some(5) => {
|
189 189 | builder.last_modified = Some(deser.read_string(member)?);
|
190 190 | }
|
191 191 | _ => {}
|
192 192 | }
|
193 193 | Ok(())
|
194 194 | })?;
|
195 + | builder.code_signing_config_id = builder.code_signing_config_id.or(Some(String::new()));
|
196 + | builder.code_signing_config_arn = builder.code_signing_config_arn.or(Some(String::new()));
|
197 + | builder.last_modified = builder.last_modified.or(Some(String::new()));
|
195 198 | builder
|
196 199 | .build()
|
197 200 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
198 201 | }
|
199 202 | }
|
203 + | impl CodeSigningConfig {
|
204 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
205 + | pub fn deserialize_with_response(
|
206 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
207 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
208 + | _status: u16,
|
209 + | _body: &[u8],
|
210 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
211 + | Self::deserialize(deserializer)
|
212 + | }
|
213 + | }
|
200 214 | impl CodeSigningConfig {
|
201 215 | /// Creates a new builder-style object to manufacture [`CodeSigningConfig`](crate::types::CodeSigningConfig).
|
202 216 | pub fn builder() -> crate::types::builders::CodeSigningConfigBuilder {
|
203 217 | crate::types::builders::CodeSigningConfigBuilder::default()
|
204 218 | }
|
205 219 | }
|
206 220 |
|
207 221 | /// A builder for [`CodeSigningConfig`](crate::types::CodeSigningConfig).
|
208 222 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
209 223 | #[non_exhaustive]
|