45 45 | "com.amazonaws.s3.synthetic",
|
46 46 | "GetBucketLifecycleConfigurationOutput",
|
47 47 | );
|
48 48 | static GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER_RULES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
49 49 | ::aws_smithy_schema::ShapeId::from_static(
|
50 50 | "com.amazonaws.s3.synthetic#GetBucketLifecycleConfigurationOutput$Rules",
|
51 51 | "com.amazonaws.s3.synthetic",
|
52 52 | "GetBucketLifecycleConfigurationOutput",
|
53 53 | ),
|
54 54 | ::aws_smithy_schema::ShapeType::List,
|
55 - | "rules",
|
55 + | "Rules",
|
56 56 | 0,
|
57 57 | )
|
58 58 | .with_xml_name("Rule")
|
59 59 | .with_xml_flattened();
|
60 60 | static GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: ::aws_smithy_schema::Schema =
|
61 61 | ::aws_smithy_schema::Schema::new_member(
|
62 62 | ::aws_smithy_schema::ShapeId::from_static(
|
63 63 | "com.amazonaws.s3.synthetic#GetBucketLifecycleConfigurationOutput$TransitionDefaultMinimumObjectSize",
|
64 64 | "com.amazonaws.s3.synthetic",
|
65 65 | "GetBucketLifecycleConfigurationOutput",
|
66 66 | ),
|
67 67 | ::aws_smithy_schema::ShapeType::String,
|
68 - | "transition_default_minimum_object_size",
|
68 + | "TransitionDefaultMinimumObjectSize",
|
69 69 | 1,
|
70 70 | )
|
71 71 | .with_http_header("x-amz-transition-default-minimum-object-size");
|
72 + | static GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
73 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
74 + | ::aws_smithy_schema::ShapeType::String,
|
75 + | "request_id",
|
76 + | 2,
|
77 + | )
|
78 + | .with_http_header("x-amzn-requestid");
|
72 79 | static GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
73 80 | GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_SCHEMA_ID,
|
74 81 | ::aws_smithy_schema::ShapeType::Structure,
|
75 82 | &[
|
76 83 | &GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER_RULES,
|
77 84 | &GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE,
|
85 + | &GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER__REQUEST_ID,
|
78 86 | ],
|
79 87 | )
|
80 88 | .with_xml_name("LifecycleConfiguration");
|
81 89 | impl GetBucketLifecycleConfigurationOutput {
|
82 90 | /// The schema for this shape.
|
83 91 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_SCHEMA;
|
84 92 | }
|
85 93 | impl ::aws_smithy_schema::serde::SerializableStruct for GetBucketLifecycleConfigurationOutput {
|
86 94 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
87 95 | fn serialize_members(
|
88 96 | &self,
|
89 97 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
90 98 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
91 99 | if let Some(ref val) = self.rules {
|
92 100 | ser.write_list(
|
93 101 | &GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER_RULES,
|
94 102 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
95 103 | for item in val {
|
96 104 | ser.write_struct(crate::types::LifecycleRule::SCHEMA, item)?;
|
97 105 | }
|
98 106 | Ok(())
|
99 107 | },
|
100 108 | )?;
|
101 109 | }
|
102 110 | if let Some(ref val) = self.transition_default_minimum_object_size {
|
103 111 | ser.write_string(
|
104 112 | &GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_MEMBER_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE,
|
105 113 | val.as_str(),
|
106 114 | )?;
|
107 115 | }
|
108 116 | Ok(())
|
109 117 | }
|
110 118 | }
|
111 119 | impl GetBucketLifecycleConfigurationOutput {
|
112 120 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
113 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
114 - | deserializer: &mut D,
|
121 + | pub fn deserialize(
|
122 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
115 123 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
116 124 | #[allow(unused_variables, unused_mut)]
|
117 125 | let mut builder = Self::builder();
|
118 126 | #[allow(
|
119 127 | unused_variables,
|
120 128 | unreachable_code,
|
121 129 | clippy::single_match,
|
122 130 | clippy::match_single_binding,
|
123 131 | clippy::diverging_sub_expression
|
124 132 | )]
|
125 - | deserializer.read_struct(&GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_SCHEMA, (), |_, member, deser| {
|
133 + | deserializer.read_struct(&GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_SCHEMA, &mut |member, deser| {
|
126 134 | match member.member_index() {
|
127 135 | Some(0) => {
|
128 136 | builder.rules = Some({
|
129 - | let container = if let Some(cap) = deser.container_size() {
|
130 - | Vec::with_capacity(cap)
|
131 - | } else {
|
132 - | Vec::new()
|
133 - | };
|
134 - | deser.read_list(member, container, |mut list, deser| {
|
135 - | list.push(crate::types::LifecycleRule::deserialize(deser)?);
|
136 - | Ok(list)
|
137 - | })?
|
137 + | let mut container = Vec::new();
|
138 + | deser.read_list(member, &mut |deser| {
|
139 + | container.push(crate::types::LifecycleRule::deserialize(deser)?);
|
140 + | Ok(())
|
141 + | })?;
|
142 + | container
|
138 143 | });
|
139 144 | }
|
140 145 | Some(1) => {
|
141 146 | builder.transition_default_minimum_object_size = Some(crate::types::TransitionDefaultMinimumObjectSize::from(
|
142 147 | deser.read_string(member)?.as_str(),
|
143 148 | ));
|
144 149 | }
|
150 + | Some(2) => {
|
151 + | builder._request_id = Some(deser.read_string(member)?);
|
152 + | }
|
153 + | _ => {}
|
154 + | }
|
155 + | Ok(())
|
156 + | })?;
|
157 + | Ok(builder.build())
|
158 + | }
|
159 + | }
|
160 + | impl GetBucketLifecycleConfigurationOutput {
|
161 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
162 + | /// Header-bound members are read directly from headers, avoiding runtime
|
163 + | /// member iteration overhead. Body members are read via the deserializer.
|
164 + | pub fn deserialize_with_response(
|
165 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
166 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
167 + | _status: u16,
|
168 + | _body: &[u8],
|
169 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
170 + | #[allow(unused_variables, unused_mut)]
|
171 + | let mut builder = Self::builder();
|
172 + | if let Some(val) = headers.get("x-amz-transition-default-minimum-object-size") {
|
173 + | builder.transition_default_minimum_object_size = Some(crate::types::TransitionDefaultMinimumObjectSize::from(val));
|
174 + | }
|
175 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
176 + | builder._request_id = Some(val.to_string());
|
177 + | }
|
178 + | #[allow(
|
179 + | unused_variables,
|
180 + | unreachable_code,
|
181 + | clippy::single_match,
|
182 + | clippy::match_single_binding,
|
183 + | clippy::diverging_sub_expression
|
184 + | )]
|
185 + | deserializer.read_struct(&GETBUCKETLIFECYCLECONFIGURATIONOUTPUT_SCHEMA, &mut |member, deser| {
|
186 + | match member.member_index() {
|
187 + | Some(0) => {
|
188 + | builder.rules = Some({
|
189 + | let mut container = Vec::new();
|
190 + | deser.read_list(member, &mut |deser| {
|
191 + | container.push(crate::types::LifecycleRule::deserialize(deser)?);
|
192 + | Ok(())
|
193 + | })?;
|
194 + | container
|
195 + | });
|
196 + | }
|
197 + | Some(1) => { /* read from headers above */ }
|
145 198 | _ => {}
|
146 199 | }
|
147 200 | Ok(())
|
148 201 | })?;
|
149 202 | Ok(builder.build())
|
150 203 | }
|
151 204 | }
|
152 205 | impl crate::s3_request_id::RequestIdExt for GetBucketLifecycleConfigurationOutput {
|
153 206 | fn extended_request_id(&self) -> Option<&str> {
|
154 207 | self._extended_request_id.as_deref()
|