45 45 | "com.amazonaws.s3control.synthetic",
|
46 46 | "DeleteBucketLifecycleConfigurationInput",
|
47 47 | );
|
48 48 | static DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
49 49 | ::aws_smithy_schema::ShapeId::from_static(
|
50 50 | "com.amazonaws.s3control.synthetic#DeleteBucketLifecycleConfigurationInput$AccountId",
|
51 51 | "com.amazonaws.s3control.synthetic",
|
52 52 | "DeleteBucketLifecycleConfigurationInput",
|
53 53 | ),
|
54 54 | ::aws_smithy_schema::ShapeType::String,
|
55 - | "account_id",
|
55 + | "AccountId",
|
56 56 | 0,
|
57 57 | )
|
58 58 | .with_host_label()
|
59 59 | .with_http_header("x-amz-account-id");
|
60 60 | static DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
61 61 | ::aws_smithy_schema::ShapeId::from_static(
|
62 62 | "com.amazonaws.s3control.synthetic#DeleteBucketLifecycleConfigurationInput$Bucket",
|
63 63 | "com.amazonaws.s3control.synthetic",
|
64 64 | "DeleteBucketLifecycleConfigurationInput",
|
65 65 | ),
|
66 66 | ::aws_smithy_schema::ShapeType::String,
|
67 - | "bucket",
|
67 + | "Bucket",
|
68 68 | 1,
|
69 69 | )
|
70 70 | .with_http_label();
|
71 71 | static DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
72 72 | DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_SCHEMA_ID,
|
73 73 | ::aws_smithy_schema::ShapeType::Structure,
|
74 74 | &[
|
75 75 | &DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_MEMBER_ACCOUNT_ID,
|
76 76 | &DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_MEMBER_BUCKET,
|
77 77 | ],
|
78 - | );
|
78 + | )
|
79 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
80 + | "DELETE",
|
81 + | "/v20180820/bucket/{Bucket}/lifecycleconfiguration",
|
82 + | None,
|
83 + | ));
|
79 84 | impl DeleteBucketLifecycleConfigurationInput {
|
80 85 | /// The schema for this shape.
|
81 86 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_SCHEMA;
|
82 87 | }
|
83 88 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteBucketLifecycleConfigurationInput {
|
84 89 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
85 90 | fn serialize_members(
|
86 91 | &self,
|
87 92 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
88 93 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
89 94 | if let Some(ref val) = self.account_id {
|
90 95 | ser.write_string(&DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_MEMBER_ACCOUNT_ID, val)?;
|
91 96 | }
|
92 97 | if let Some(ref val) = self.bucket {
|
93 98 | ser.write_string(&DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_MEMBER_BUCKET, val)?;
|
94 99 | }
|
95 100 | Ok(())
|
96 101 | }
|
97 102 | }
|
98 103 | impl DeleteBucketLifecycleConfigurationInput {
|
99 104 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
100 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
101 - | deserializer: &mut D,
|
105 + | pub fn deserialize(
|
106 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
102 107 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
103 108 | #[allow(unused_variables, unused_mut)]
|
104 109 | let mut builder = Self::builder();
|
105 110 | #[allow(
|
106 111 | unused_variables,
|
107 112 | unreachable_code,
|
108 113 | clippy::single_match,
|
109 114 | clippy::match_single_binding,
|
110 115 | clippy::diverging_sub_expression
|
111 116 | )]
|
112 - | deserializer.read_struct(&DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_SCHEMA, (), |_, member, deser| {
|
117 + | deserializer.read_struct(&DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
|
113 118 | match member.member_index() {
|
114 119 | Some(0) => {
|
115 120 | builder.account_id = Some(deser.read_string(member)?);
|
116 121 | }
|
117 122 | Some(1) => {
|
118 123 | builder.bucket = Some(deser.read_string(member)?);
|
119 124 | }
|
120 125 | _ => {}
|
121 126 | }
|
122 127 | Ok(())
|
123 128 | })?;
|
129 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
130 + | builder.bucket = builder.bucket.or(Some(String::new()));
|
131 + | builder
|
132 + | .build()
|
133 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
134 + | }
|
135 + | }
|
136 + | impl DeleteBucketLifecycleConfigurationInput {
|
137 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
138 + | /// Header-bound members are read directly from headers, avoiding runtime
|
139 + | /// member iteration overhead. Body members are read via the deserializer.
|
140 + | pub fn deserialize_with_response(
|
141 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
142 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
143 + | _status: u16,
|
144 + | _body: &[u8],
|
145 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
146 + | #[allow(unused_variables, unused_mut)]
|
147 + | let mut builder = Self::builder();
|
148 + | if let Some(val) = headers.get("x-amz-account-id") {
|
149 + | builder.account_id = Some(val.to_string());
|
150 + | }
|
151 + | #[allow(
|
152 + | unused_variables,
|
153 + | unreachable_code,
|
154 + | clippy::single_match,
|
155 + | clippy::match_single_binding,
|
156 + | clippy::diverging_sub_expression
|
157 + | )]
|
158 + | deserializer.read_struct(&DELETEBUCKETLIFECYCLECONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
|
159 + | match member.member_index() {
|
160 + | Some(0) => { /* read from headers above */ }
|
161 + | Some(1) => {
|
162 + | builder.bucket = Some(deser.read_string(member)?);
|
163 + | }
|
164 + | _ => {}
|
165 + | }
|
166 + | Ok(())
|
167 + | })?;
|
124 168 | builder
|
125 169 | .build()
|
126 170 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
127 171 | }
|
128 172 | }
|
129 173 | impl DeleteBucketLifecycleConfigurationInput {
|
130 174 | /// Creates a new builder-style object to manufacture [`DeleteBucketLifecycleConfigurationInput`](crate::operation::delete_bucket_lifecycle_configuration::DeleteBucketLifecycleConfigurationInput).
|
131 175 | pub fn builder() -> crate::operation::delete_bucket_lifecycle_configuration::builders::DeleteBucketLifecycleConfigurationInputBuilder {
|
132 176 | crate::operation::delete_bucket_lifecycle_configuration::builders::DeleteBucketLifecycleConfigurationInputBuilder::default()
|
133 177 | }
|