64 64 | /// </note>
|
65 65 | pub fn storage_class(&self) -> ::std::option::Option<&crate::types::ReplicationStorageClass> {
|
66 66 | self.storage_class.as_ref()
|
67 67 | }
|
68 68 | }
|
69 69 | static DESTINATION_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
70 70 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3control#Destination", "com.amazonaws.s3control", "Destination");
|
71 71 | static DESTINATION_MEMBER_ACCOUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
72 72 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3control#Destination$Account", "com.amazonaws.s3control", "Destination"),
|
73 73 | ::aws_smithy_schema::ShapeType::String,
|
74 - | "account",
|
74 + | "Account",
|
75 75 | 0,
|
76 76 | );
|
77 77 | static DESTINATION_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
78 78 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3control#Destination$Bucket", "com.amazonaws.s3control", "Destination"),
|
79 79 | ::aws_smithy_schema::ShapeType::String,
|
80 - | "bucket",
|
80 + | "Bucket",
|
81 81 | 1,
|
82 82 | );
|
83 83 | static DESTINATION_MEMBER_REPLICATION_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
84 84 | ::aws_smithy_schema::ShapeId::from_static(
|
85 85 | "com.amazonaws.s3control#Destination$ReplicationTime",
|
86 86 | "com.amazonaws.s3control",
|
87 87 | "Destination",
|
88 88 | ),
|
89 89 | ::aws_smithy_schema::ShapeType::Structure,
|
90 - | "replication_time",
|
90 + | "ReplicationTime",
|
91 91 | 2,
|
92 92 | );
|
93 93 | static DESTINATION_MEMBER_ACCESS_CONTROL_TRANSLATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
94 94 | ::aws_smithy_schema::ShapeId::from_static(
|
95 95 | "com.amazonaws.s3control#Destination$AccessControlTranslation",
|
96 96 | "com.amazonaws.s3control",
|
97 97 | "Destination",
|
98 98 | ),
|
99 99 | ::aws_smithy_schema::ShapeType::Structure,
|
100 - | "access_control_translation",
|
100 + | "AccessControlTranslation",
|
101 101 | 3,
|
102 102 | );
|
103 103 | static DESTINATION_MEMBER_ENCRYPTION_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
104 104 | ::aws_smithy_schema::ShapeId::from_static(
|
105 105 | "com.amazonaws.s3control#Destination$EncryptionConfiguration",
|
106 106 | "com.amazonaws.s3control",
|
107 107 | "Destination",
|
108 108 | ),
|
109 109 | ::aws_smithy_schema::ShapeType::Structure,
|
110 - | "encryption_configuration",
|
110 + | "EncryptionConfiguration",
|
111 111 | 4,
|
112 112 | );
|
113 113 | static DESTINATION_MEMBER_METRICS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
114 114 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.s3control#Destination$Metrics", "com.amazonaws.s3control", "Destination"),
|
115 115 | ::aws_smithy_schema::ShapeType::Structure,
|
116 - | "metrics",
|
116 + | "Metrics",
|
117 117 | 5,
|
118 118 | );
|
119 119 | static DESTINATION_MEMBER_STORAGE_CLASS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
120 120 | ::aws_smithy_schema::ShapeId::from_static(
|
121 121 | "com.amazonaws.s3control#Destination$StorageClass",
|
122 122 | "com.amazonaws.s3control",
|
123 123 | "Destination",
|
124 124 | ),
|
125 125 | ::aws_smithy_schema::ShapeType::String,
|
126 - | "storage_class",
|
126 + | "StorageClass",
|
127 127 | 6,
|
128 128 | );
|
129 129 | static DESTINATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
130 130 | DESTINATION_SCHEMA_ID,
|
131 131 | ::aws_smithy_schema::ShapeType::Structure,
|
132 132 | &[
|
133 133 | &DESTINATION_MEMBER_ACCOUNT,
|
134 134 | &DESTINATION_MEMBER_BUCKET,
|
135 135 | &DESTINATION_MEMBER_REPLICATION_TIME,
|
136 136 | &DESTINATION_MEMBER_ACCESS_CONTROL_TRANSLATION,
|
137 137 | &DESTINATION_MEMBER_ENCRYPTION_CONFIGURATION,
|
138 138 | &DESTINATION_MEMBER_METRICS,
|
139 139 | &DESTINATION_MEMBER_STORAGE_CLASS,
|
140 140 | ],
|
141 141 | );
|
142 142 | impl Destination {
|
143 143 | /// The schema for this shape.
|
144 144 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESTINATION_SCHEMA;
|
145 145 | }
|
146 146 | impl ::aws_smithy_schema::serde::SerializableStruct for Destination {
|
147 147 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
148 148 | fn serialize_members(
|
149 149 | &self,
|
150 150 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
151 151 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
152 152 | if let Some(ref val) = self.account {
|
153 153 | ser.write_string(&DESTINATION_MEMBER_ACCOUNT, val)?;
|
154 154 | }
|
155 155 | {
|
156 156 | let val = &self.bucket;
|
157 157 | ser.write_string(&DESTINATION_MEMBER_BUCKET, val)?;
|
158 158 | }
|
159 159 | if let Some(ref val) = self.replication_time {
|
160 160 | ser.write_struct(&DESTINATION_MEMBER_REPLICATION_TIME, val)?;
|
161 161 | }
|
162 162 | if let Some(ref val) = self.access_control_translation {
|
163 163 | ser.write_struct(&DESTINATION_MEMBER_ACCESS_CONTROL_TRANSLATION, val)?;
|
164 164 | }
|
165 165 | if let Some(ref val) = self.encryption_configuration {
|
166 166 | ser.write_struct(&DESTINATION_MEMBER_ENCRYPTION_CONFIGURATION, val)?;
|
167 167 | }
|
168 168 | if let Some(ref val) = self.metrics {
|
169 169 | ser.write_struct(&DESTINATION_MEMBER_METRICS, val)?;
|
170 170 | }
|
171 171 | if let Some(ref val) = self.storage_class {
|
172 172 | ser.write_string(&DESTINATION_MEMBER_STORAGE_CLASS, val.as_str())?;
|
173 173 | }
|
174 174 | Ok(())
|
175 175 | }
|
176 176 | }
|
177 177 | impl Destination {
|
178 178 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
179 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
180 - | deserializer: &mut D,
|
179 + | pub fn deserialize(
|
180 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
181 181 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
182 182 | #[allow(unused_variables, unused_mut)]
|
183 183 | let mut builder = Self::builder();
|
184 184 | #[allow(
|
185 185 | unused_variables,
|
186 186 | unreachable_code,
|
187 187 | clippy::single_match,
|
188 188 | clippy::match_single_binding,
|
189 189 | clippy::diverging_sub_expression
|
190 190 | )]
|
191 - | deserializer.read_struct(&DESTINATION_SCHEMA, (), |_, member, deser| {
|
191 + | deserializer.read_struct(&DESTINATION_SCHEMA, &mut |member, deser| {
|
192 192 | match member.member_index() {
|
193 193 | Some(0) => {
|
194 194 | builder.account = Some(deser.read_string(member)?);
|
195 195 | }
|
196 196 | Some(1) => {
|
197 197 | builder.bucket = Some(deser.read_string(member)?);
|
198 198 | }
|
199 199 | Some(2) => {
|
200 200 | builder.replication_time = Some(crate::types::ReplicationTime::deserialize(deser)?);
|
201 201 | }
|
202 202 | Some(3) => {
|
203 203 | builder.access_control_translation = Some(crate::types::AccessControlTranslation::deserialize(deser)?);
|
204 204 | }
|
205 205 | Some(4) => {
|
206 206 | builder.encryption_configuration = Some(crate::types::EncryptionConfiguration::deserialize(deser)?);
|
207 207 | }
|
208 208 | Some(5) => {
|
209 209 | builder.metrics = Some(crate::types::Metrics::deserialize(deser)?);
|
210 210 | }
|
211 211 | Some(6) => {
|
212 212 | builder.storage_class = Some(crate::types::ReplicationStorageClass::from(deser.read_string(member)?.as_str()));
|
213 213 | }
|
214 214 | _ => {}
|
215 215 | }
|
216 216 | Ok(())
|
217 217 | })?;
|
218 + | builder.bucket = builder.bucket.or(Some(String::new()));
|
218 219 | builder
|
219 220 | .build()
|
220 221 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
221 222 | }
|
222 223 | }
|
224 + | impl Destination {
|
225 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
226 + | pub fn deserialize_with_response(
|
227 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
228 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
229 + | _status: u16,
|
230 + | _body: &[u8],
|
231 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
232 + | Self::deserialize(deserializer)
|
233 + | }
|
234 + | }
|
223 235 | impl Destination {
|
224 236 | /// Creates a new builder-style object to manufacture [`Destination`](crate::types::Destination).
|
225 237 | pub fn builder() -> crate::types::builders::DestinationBuilder {
|
226 238 | crate::types::builders::DestinationBuilder::default()
|
227 239 | }
|
228 240 | }
|
229 241 |
|
230 242 | /// A builder for [`Destination`](crate::types::Destination).
|
231 243 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
232 244 | #[non_exhaustive]
|