77 77 | /// </note>
|
78 78 | pub fn delete_marker_replication(&self) -> ::std::option::Option<&crate::types::DeleteMarkerReplication> {
|
79 79 | self.delete_marker_replication.as_ref()
|
80 80 | }
|
81 81 | }
|
82 82 | static REPLICATIONRULE_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
83 83 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule", "com.amazonaws.s3", "ReplicationRule");
|
84 84 | static REPLICATIONRULE_MEMBER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
85 85 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule$ID", "com.amazonaws.s3", "ReplicationRule"),
|
86 86 | ::aws_smithy_schema::ShapeType::String,
|
87 - | "id",
|
87 + | "ID",
|
88 88 | 0,
|
89 89 | );
|
90 90 | static REPLICATIONRULE_MEMBER_PRIORITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
91 91 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule$Priority", "com.amazonaws.s3", "ReplicationRule"),
|
92 92 | ::aws_smithy_schema::ShapeType::Integer,
|
93 - | "priority",
|
93 + | "Priority",
|
94 94 | 1,
|
95 95 | );
|
96 96 | static REPLICATIONRULE_MEMBER_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
97 97 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule$Prefix", "com.amazonaws.s3", "ReplicationRule"),
|
98 98 | ::aws_smithy_schema::ShapeType::String,
|
99 - | "prefix",
|
99 + | "Prefix",
|
100 100 | 2,
|
101 101 | );
|
102 102 | static REPLICATIONRULE_MEMBER_FILTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
103 103 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule$Filter", "com.amazonaws.s3", "ReplicationRule"),
|
104 104 | ::aws_smithy_schema::ShapeType::Structure,
|
105 - | "filter",
|
105 + | "Filter",
|
106 106 | 3,
|
107 107 | );
|
108 108 | static REPLICATIONRULE_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
109 109 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule$Status", "com.amazonaws.s3", "ReplicationRule"),
|
110 110 | ::aws_smithy_schema::ShapeType::String,
|
111 - | "status",
|
111 + | "Status",
|
112 112 | 4,
|
113 113 | );
|
114 114 | static REPLICATIONRULE_MEMBER_SOURCE_SELECTION_CRITERIA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
115 115 | ::aws_smithy_schema::ShapeId::from_static(
|
116 116 | "com.amazonaws.s3#ReplicationRule$SourceSelectionCriteria",
|
117 117 | "com.amazonaws.s3",
|
118 118 | "ReplicationRule",
|
119 119 | ),
|
120 120 | ::aws_smithy_schema::ShapeType::Structure,
|
121 - | "source_selection_criteria",
|
121 + | "SourceSelectionCriteria",
|
122 122 | 5,
|
123 123 | );
|
124 124 | static REPLICATIONRULE_MEMBER_EXISTING_OBJECT_REPLICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
125 125 | ::aws_smithy_schema::ShapeId::from_static(
|
126 126 | "com.amazonaws.s3#ReplicationRule$ExistingObjectReplication",
|
127 127 | "com.amazonaws.s3",
|
128 128 | "ReplicationRule",
|
129 129 | ),
|
130 130 | ::aws_smithy_schema::ShapeType::Structure,
|
131 - | "existing_object_replication",
|
131 + | "ExistingObjectReplication",
|
132 132 | 6,
|
133 133 | );
|
134 134 | static REPLICATIONRULE_MEMBER_DESTINATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
135 135 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3#ReplicationRule$Destination", "com.amazonaws.s3", "ReplicationRule"),
|
136 136 | ::aws_smithy_schema::ShapeType::Structure,
|
137 - | "destination",
|
137 + | "Destination",
|
138 138 | 7,
|
139 139 | );
|
140 140 | static REPLICATIONRULE_MEMBER_DELETE_MARKER_REPLICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
141 141 | ::aws_smithy_schema::ShapeId::from_static(
|
142 142 | "com.amazonaws.s3#ReplicationRule$DeleteMarkerReplication",
|
143 143 | "com.amazonaws.s3",
|
144 144 | "ReplicationRule",
|
145 145 | ),
|
146 146 | ::aws_smithy_schema::ShapeType::Structure,
|
147 - | "delete_marker_replication",
|
147 + | "DeleteMarkerReplication",
|
148 148 | 8,
|
149 149 | );
|
150 150 | static REPLICATIONRULE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
151 151 | REPLICATIONRULE_SCHEMA_ID,
|
152 152 | ::aws_smithy_schema::ShapeType::Structure,
|
153 153 | &[
|
154 154 | &REPLICATIONRULE_MEMBER_ID,
|
155 155 | &REPLICATIONRULE_MEMBER_PRIORITY,
|
156 156 | &REPLICATIONRULE_MEMBER_PREFIX,
|
157 157 | &REPLICATIONRULE_MEMBER_FILTER,
|
158 158 | &REPLICATIONRULE_MEMBER_STATUS,
|
159 159 | &REPLICATIONRULE_MEMBER_SOURCE_SELECTION_CRITERIA,
|
160 160 | &REPLICATIONRULE_MEMBER_EXISTING_OBJECT_REPLICATION,
|
161 161 | &REPLICATIONRULE_MEMBER_DESTINATION,
|
162 162 | &REPLICATIONRULE_MEMBER_DELETE_MARKER_REPLICATION,
|
163 163 | ],
|
164 164 | );
|
165 165 | impl ReplicationRule {
|
166 166 | /// The schema for this shape.
|
167 167 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REPLICATIONRULE_SCHEMA;
|
168 168 | }
|
169 169 | impl ::aws_smithy_schema::serde::SerializableStruct for ReplicationRule {
|
170 170 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
171 171 | fn serialize_members(
|
172 172 | &self,
|
173 173 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
174 174 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
175 175 | if let Some(ref val) = self.id {
|
176 176 | ser.write_string(&REPLICATIONRULE_MEMBER_ID, val)?;
|
177 177 | }
|
178 178 | if let Some(ref val) = self.priority {
|
179 179 | ser.write_integer(&REPLICATIONRULE_MEMBER_PRIORITY, *val)?;
|
180 180 | }
|
181 181 | if let Some(ref val) = self.prefix {
|
182 182 | ser.write_string(&REPLICATIONRULE_MEMBER_PREFIX, val)?;
|
183 183 | }
|
184 184 | if let Some(ref val) = self.filter {
|
185 185 | ser.write_struct(&REPLICATIONRULE_MEMBER_FILTER, val)?;
|
186 186 | }
|
187 187 | {
|
188 188 | let val = &self.status;
|
189 189 | ser.write_string(&REPLICATIONRULE_MEMBER_STATUS, val.as_str())?;
|
190 190 | }
|
191 191 | if let Some(ref val) = self.source_selection_criteria {
|
192 192 | ser.write_struct(&REPLICATIONRULE_MEMBER_SOURCE_SELECTION_CRITERIA, val)?;
|
193 193 | }
|
194 194 | if let Some(ref val) = self.existing_object_replication {
|
195 195 | ser.write_struct(&REPLICATIONRULE_MEMBER_EXISTING_OBJECT_REPLICATION, val)?;
|
196 196 | }
|
197 197 | if let Some(ref val) = self.destination {
|
198 198 | ser.write_struct(&REPLICATIONRULE_MEMBER_DESTINATION, val)?;
|
199 199 | }
|
200 200 | if let Some(ref val) = self.delete_marker_replication {
|
201 201 | ser.write_struct(&REPLICATIONRULE_MEMBER_DELETE_MARKER_REPLICATION, val)?;
|
202 202 | }
|
203 203 | Ok(())
|
204 204 | }
|
205 205 | }
|
206 206 | impl ReplicationRule {
|
207 207 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
208 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
209 - | deserializer: &mut D,
|
208 + | pub fn deserialize(
|
209 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
210 210 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
211 211 | #[allow(unused_variables, unused_mut)]
|
212 212 | let mut builder = Self::builder();
|
213 213 | #[allow(
|
214 214 | unused_variables,
|
215 215 | unreachable_code,
|
216 216 | clippy::single_match,
|
217 217 | clippy::match_single_binding,
|
218 218 | clippy::diverging_sub_expression
|
219 219 | )]
|
220 - | deserializer.read_struct(&REPLICATIONRULE_SCHEMA, (), |_, member, deser| {
|
220 + | deserializer.read_struct(&REPLICATIONRULE_SCHEMA, &mut |member, deser| {
|
221 221 | match member.member_index() {
|
222 222 | Some(0) => {
|
223 223 | builder.id = Some(deser.read_string(member)?);
|
224 224 | }
|
225 225 | Some(1) => {
|
226 226 | builder.priority = Some(deser.read_integer(member)?);
|
227 227 | }
|
228 228 | Some(2) => {
|
229 229 | builder.prefix = Some(deser.read_string(member)?);
|
230 230 | }
|
231 231 | Some(3) => {
|
232 232 | builder.filter = Some(crate::types::ReplicationRuleFilter::deserialize(deser)?);
|
233 233 | }
|
234 234 | Some(4) => {
|
235 235 | builder.status = Some(crate::types::ReplicationRuleStatus::from(deser.read_string(member)?.as_str()));
|
236 236 | }
|
237 237 | Some(5) => {
|
238 238 | builder.source_selection_criteria = Some(crate::types::SourceSelectionCriteria::deserialize(deser)?);
|
239 239 | }
|
240 240 | Some(6) => {
|
241 241 | builder.existing_object_replication = Some(crate::types::ExistingObjectReplication::deserialize(deser)?);
|
242 242 | }
|
243 243 | Some(7) => {
|
244 244 | builder.destination = Some(crate::types::Destination::deserialize(deser)?);
|
245 245 | }
|
246 246 | Some(8) => {
|
247 247 | builder.delete_marker_replication = Some(crate::types::DeleteMarkerReplication::deserialize(deser)?);
|
248 248 | }
|
249 249 | _ => {}
|
250 250 | }
|
251 251 | Ok(())
|
252 252 | })?;
|
253 253 | builder
|
254 254 | .build()
|
255 255 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
256 256 | }
|
257 257 | }
|
258 + | impl ReplicationRule {
|
259 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
260 + | pub fn deserialize_with_response(
|
261 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
262 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
263 + | _status: u16,
|
264 + | _body: &[u8],
|
265 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
266 + | Self::deserialize(deserializer)
|
267 + | }
|
268 + | }
|
258 269 | impl ReplicationRule {
|
259 270 | /// Creates a new builder-style object to manufacture [`ReplicationRule`](crate::types::ReplicationRule).
|
260 271 | pub fn builder() -> crate::types::builders::ReplicationRuleBuilder {
|
261 272 | crate::types::builders::ReplicationRuleBuilder::default()
|
262 273 | }
|
263 274 | }
|
264 275 |
|
265 276 | /// A builder for [`ReplicationRule`](crate::types::ReplicationRule).
|
266 277 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
267 278 | #[non_exhaustive]
|