40 40 | "com.amazonaws.s3control",
|
41 41 | "ObjectLambdaConfiguration",
|
42 42 | );
|
43 43 | static OBJECTLAMBDACONFIGURATION_MEMBER_SUPPORTING_ACCESS_POINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
44 44 | ::aws_smithy_schema::ShapeId::from_static(
|
45 45 | "com.amazonaws.s3control#ObjectLambdaConfiguration$SupportingAccessPoint",
|
46 46 | "com.amazonaws.s3control",
|
47 47 | "ObjectLambdaConfiguration",
|
48 48 | ),
|
49 49 | ::aws_smithy_schema::ShapeType::String,
|
50 - | "supporting_access_point",
|
50 + | "SupportingAccessPoint",
|
51 51 | 0,
|
52 52 | );
|
53 53 | static OBJECTLAMBDACONFIGURATION_MEMBER_CLOUD_WATCH_METRICS_ENABLED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
54 54 | ::aws_smithy_schema::ShapeId::from_static(
|
55 55 | "com.amazonaws.s3control#ObjectLambdaConfiguration$CloudWatchMetricsEnabled",
|
56 56 | "com.amazonaws.s3control",
|
57 57 | "ObjectLambdaConfiguration",
|
58 58 | ),
|
59 59 | ::aws_smithy_schema::ShapeType::Boolean,
|
60 - | "cloud_watch_metrics_enabled",
|
60 + | "CloudWatchMetricsEnabled",
|
61 61 | 1,
|
62 62 | );
|
63 63 | static OBJECTLAMBDACONFIGURATION_MEMBER_ALLOWED_FEATURES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
64 64 | ::aws_smithy_schema::ShapeId::from_static(
|
65 65 | "com.amazonaws.s3control#ObjectLambdaConfiguration$AllowedFeatures",
|
66 66 | "com.amazonaws.s3control",
|
67 67 | "ObjectLambdaConfiguration",
|
68 68 | ),
|
69 69 | ::aws_smithy_schema::ShapeType::List,
|
70 - | "allowed_features",
|
70 + | "AllowedFeatures",
|
71 71 | 2,
|
72 72 | );
|
73 73 | static OBJECTLAMBDACONFIGURATION_MEMBER_TRANSFORMATION_CONFIGURATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
74 74 | ::aws_smithy_schema::ShapeId::from_static(
|
75 75 | "com.amazonaws.s3control#ObjectLambdaConfiguration$TransformationConfigurations",
|
76 76 | "com.amazonaws.s3control",
|
77 77 | "ObjectLambdaConfiguration",
|
78 78 | ),
|
79 79 | ::aws_smithy_schema::ShapeType::List,
|
80 - | "transformation_configurations",
|
80 + | "TransformationConfigurations",
|
81 81 | 3,
|
82 82 | );
|
83 83 | static OBJECTLAMBDACONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
84 84 | OBJECTLAMBDACONFIGURATION_SCHEMA_ID,
|
85 85 | ::aws_smithy_schema::ShapeType::Structure,
|
86 86 | &[
|
87 87 | &OBJECTLAMBDACONFIGURATION_MEMBER_SUPPORTING_ACCESS_POINT,
|
88 88 | &OBJECTLAMBDACONFIGURATION_MEMBER_CLOUD_WATCH_METRICS_ENABLED,
|
89 89 | &OBJECTLAMBDACONFIGURATION_MEMBER_ALLOWED_FEATURES,
|
90 90 | &OBJECTLAMBDACONFIGURATION_MEMBER_TRANSFORMATION_CONFIGURATIONS,
|
91 91 | ],
|
92 92 | );
|
93 93 | impl ObjectLambdaConfiguration {
|
94 94 | /// The schema for this shape.
|
95 95 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &OBJECTLAMBDACONFIGURATION_SCHEMA;
|
96 96 | }
|
97 97 | impl ::aws_smithy_schema::serde::SerializableStruct for ObjectLambdaConfiguration {
|
98 98 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
99 99 | fn serialize_members(
|
100 100 | &self,
|
101 101 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
102 102 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
103 103 | {
|
104 104 | let val = &self.supporting_access_point;
|
105 105 | ser.write_string(&OBJECTLAMBDACONFIGURATION_MEMBER_SUPPORTING_ACCESS_POINT, val)?;
|
106 106 | }
|
107 107 | {
|
108 108 | let val = &self.cloud_watch_metrics_enabled;
|
109 109 | ser.write_boolean(&OBJECTLAMBDACONFIGURATION_MEMBER_CLOUD_WATCH_METRICS_ENABLED, *val)?;
|
110 110 | }
|
111 111 | if let Some(ref val) = self.allowed_features {
|
112 112 | ser.write_list(
|
113 113 | &OBJECTLAMBDACONFIGURATION_MEMBER_ALLOWED_FEATURES,
|
114 114 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
115 115 | for item in val {
|
116 116 | ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
|
117 117 | }
|
118 118 | Ok(())
|
119 119 | },
|
120 120 | )?;
|
121 121 | }
|
122 122 | {
|
123 123 | let val = &self.transformation_configurations;
|
124 124 |
|
125 125 | ser.write_list(
|
126 126 | &OBJECTLAMBDACONFIGURATION_MEMBER_TRANSFORMATION_CONFIGURATIONS,
|
127 127 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
128 128 | for item in val {
|
129 129 | ser.write_struct(crate::types::ObjectLambdaTransformationConfiguration::SCHEMA, item)?;
|
130 130 | }
|
131 131 | Ok(())
|
132 132 | },
|
133 133 | )?;
|
134 134 | }
|
135 135 | Ok(())
|
136 136 | }
|
137 137 | }
|
138 138 | impl ObjectLambdaConfiguration {
|
139 139 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
140 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
141 - | deserializer: &mut D,
|
140 + | pub fn deserialize(
|
141 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
142 142 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
143 143 | #[allow(unused_variables, unused_mut)]
|
144 144 | let mut builder = Self::builder();
|
145 145 | #[allow(
|
146 146 | unused_variables,
|
147 147 | unreachable_code,
|
148 148 | clippy::single_match,
|
149 149 | clippy::match_single_binding,
|
150 150 | clippy::diverging_sub_expression
|
151 151 | )]
|
152 - | deserializer.read_struct(&OBJECTLAMBDACONFIGURATION_SCHEMA, (), |_, member, deser| {
|
152 + | deserializer.read_struct(&OBJECTLAMBDACONFIGURATION_SCHEMA, &mut |member, deser| {
|
153 153 | match member.member_index() {
|
154 154 | Some(0) => {
|
155 155 | builder.supporting_access_point = Some(deser.read_string(member)?);
|
156 156 | }
|
157 157 | Some(1) => {
|
158 158 | builder.cloud_watch_metrics_enabled = Some(deser.read_boolean(member)?);
|
159 159 | }
|
160 160 | Some(2) => {
|
161 161 | builder.allowed_features = Some({
|
162 - | let container = if let Some(cap) = deser.container_size() {
|
163 - | Vec::with_capacity(cap)
|
164 - | } else {
|
165 - | Vec::new()
|
166 - | };
|
167 - | deser.read_list(member, container, |mut list, deser| {
|
168 - | list.push(crate::types::ObjectLambdaAllowedFeature::from(deser.read_string(member)?.as_str()));
|
169 - | Ok(list)
|
170 - | })?
|
162 + | let mut container = Vec::new();
|
163 + | deser.read_list(member, &mut |deser| {
|
164 + | container.push(crate::types::ObjectLambdaAllowedFeature::from(deser.read_string(member)?.as_str()));
|
165 + | Ok(())
|
166 + | })?;
|
167 + | container
|
171 168 | });
|
172 169 | }
|
173 170 | Some(3) => {
|
174 171 | builder.transformation_configurations = Some({
|
175 - | let container = if let Some(cap) = deser.container_size() {
|
176 - | Vec::with_capacity(cap)
|
177 - | } else {
|
178 - | Vec::new()
|
179 - | };
|
180 - | deser.read_list(member, container, |mut list, deser| {
|
181 - | list.push(crate::types::ObjectLambdaTransformationConfiguration::deserialize(deser)?);
|
182 - | Ok(list)
|
183 - | })?
|
172 + | let mut container = Vec::new();
|
173 + | deser.read_list(member, &mut |deser| {
|
174 + | container.push(crate::types::ObjectLambdaTransformationConfiguration::deserialize(deser)?);
|
175 + | Ok(())
|
176 + | })?;
|
177 + | container
|
184 178 | });
|
185 179 | }
|
186 180 | _ => {}
|
187 181 | }
|
188 182 | Ok(())
|
189 183 | })?;
|
184 + | builder.supporting_access_point = builder.supporting_access_point.or(Some(String::new()));
|
185 + | builder.transformation_configurations = builder.transformation_configurations.or(Some(Vec::new()));
|
190 186 | builder
|
191 187 | .build()
|
192 188 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
193 189 | }
|
194 190 | }
|
191 + | impl ObjectLambdaConfiguration {
|
192 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
193 + | pub fn deserialize_with_response(
|
194 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
195 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
196 + | _status: u16,
|
197 + | _body: &[u8],
|
198 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
199 + | Self::deserialize(deserializer)
|
200 + | }
|
201 + | }
|
195 202 | impl ObjectLambdaConfiguration {
|
196 203 | /// Creates a new builder-style object to manufacture [`ObjectLambdaConfiguration`](crate::types::ObjectLambdaConfiguration).
|
197 204 | pub fn builder() -> crate::types::builders::ObjectLambdaConfigurationBuilder {
|
198 205 | crate::types::builders::ObjectLambdaConfigurationBuilder::default()
|
199 206 | }
|
200 207 | }
|
201 208 |
|
202 209 | /// A builder for [`ObjectLambdaConfiguration`](crate::types::ObjectLambdaConfiguration).
|
203 210 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
204 211 | #[non_exhaustive]
|