33 33 | "com.amazonaws.s3.synthetic",
|
34 34 | "GetBucketAccelerateConfigurationInput",
|
35 35 | );
|
36 36 | static GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
37 37 | ::aws_smithy_schema::ShapeId::from_static(
|
38 38 | "com.amazonaws.s3.synthetic#GetBucketAccelerateConfigurationInput$Bucket",
|
39 39 | "com.amazonaws.s3.synthetic",
|
40 40 | "GetBucketAccelerateConfigurationInput",
|
41 41 | ),
|
42 42 | ::aws_smithy_schema::ShapeType::String,
|
43 - | "bucket",
|
43 + | "Bucket",
|
44 44 | 0,
|
45 45 | )
|
46 46 | .with_http_label();
|
47 47 | static GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_EXPECTED_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
48 48 | ::aws_smithy_schema::ShapeId::from_static(
|
49 49 | "com.amazonaws.s3.synthetic#GetBucketAccelerateConfigurationInput$ExpectedBucketOwner",
|
50 50 | "com.amazonaws.s3.synthetic",
|
51 51 | "GetBucketAccelerateConfigurationInput",
|
52 52 | ),
|
53 53 | ::aws_smithy_schema::ShapeType::String,
|
54 - | "expected_bucket_owner",
|
54 + | "ExpectedBucketOwner",
|
55 55 | 1,
|
56 56 | )
|
57 57 | .with_http_header("x-amz-expected-bucket-owner");
|
58 58 | static GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_REQUEST_PAYER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
59 59 | ::aws_smithy_schema::ShapeId::from_static(
|
60 60 | "com.amazonaws.s3.synthetic#GetBucketAccelerateConfigurationInput$RequestPayer",
|
61 61 | "com.amazonaws.s3.synthetic",
|
62 62 | "GetBucketAccelerateConfigurationInput",
|
63 63 | ),
|
64 64 | ::aws_smithy_schema::ShapeType::String,
|
65 - | "request_payer",
|
65 + | "RequestPayer",
|
66 66 | 2,
|
67 67 | )
|
68 68 | .with_http_header("x-amz-request-payer");
|
69 69 | static GETBUCKETACCELERATECONFIGURATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
70 70 | GETBUCKETACCELERATECONFIGURATIONINPUT_SCHEMA_ID,
|
71 71 | ::aws_smithy_schema::ShapeType::Structure,
|
72 72 | &[
|
73 73 | &GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_BUCKET,
|
74 74 | &GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_EXPECTED_BUCKET_OWNER,
|
75 75 | &GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_REQUEST_PAYER,
|
76 76 | ],
|
77 - | );
|
77 + | )
|
78 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/?accelerate", None));
|
78 79 | impl GetBucketAccelerateConfigurationInput {
|
79 80 | /// The schema for this shape.
|
80 81 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETBUCKETACCELERATECONFIGURATIONINPUT_SCHEMA;
|
81 82 | }
|
82 83 | impl ::aws_smithy_schema::serde::SerializableStruct for GetBucketAccelerateConfigurationInput {
|
83 84 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
84 85 | fn serialize_members(
|
85 86 | &self,
|
86 87 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
87 88 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
88 89 | if let Some(ref val) = self.bucket {
|
89 90 | ser.write_string(&GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_BUCKET, val)?;
|
90 91 | }
|
91 92 | if let Some(ref val) = self.expected_bucket_owner {
|
92 93 | ser.write_string(&GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_EXPECTED_BUCKET_OWNER, val)?;
|
93 94 | }
|
94 95 | if let Some(ref val) = self.request_payer {
|
95 96 | ser.write_string(&GETBUCKETACCELERATECONFIGURATIONINPUT_MEMBER_REQUEST_PAYER, val.as_str())?;
|
96 97 | }
|
97 98 | Ok(())
|
98 99 | }
|
99 100 | }
|
100 101 | impl GetBucketAccelerateConfigurationInput {
|
101 102 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
102 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
103 - | deserializer: &mut D,
|
103 + | pub fn deserialize(
|
104 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
104 105 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
105 106 | #[allow(unused_variables, unused_mut)]
|
106 107 | let mut builder = Self::builder();
|
107 108 | #[allow(
|
108 109 | unused_variables,
|
109 110 | unreachable_code,
|
110 111 | clippy::single_match,
|
111 112 | clippy::match_single_binding,
|
112 113 | clippy::diverging_sub_expression
|
113 114 | )]
|
114 - | deserializer.read_struct(&GETBUCKETACCELERATECONFIGURATIONINPUT_SCHEMA, (), |_, member, deser| {
|
115 + | deserializer.read_struct(&GETBUCKETACCELERATECONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
|
115 116 | match member.member_index() {
|
116 117 | Some(0) => {
|
117 118 | builder.bucket = Some(deser.read_string(member)?);
|
118 119 | }
|
119 120 | Some(1) => {
|
120 121 | builder.expected_bucket_owner = Some(deser.read_string(member)?);
|
121 122 | }
|
122 123 | Some(2) => {
|
123 124 | builder.request_payer = Some(crate::types::RequestPayer::from(deser.read_string(member)?.as_str()));
|
124 125 | }
|
125 126 | _ => {}
|
126 127 | }
|
127 128 | Ok(())
|
128 129 | })?;
|
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 GetBucketAccelerateConfigurationInput {
|
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-expected-bucket-owner") {
|
149 + | builder.expected_bucket_owner = Some(val.to_string());
|
150 + | }
|
151 + | if let Some(val) = headers.get("x-amz-request-payer") {
|
152 + | builder.request_payer = Some(crate::types::RequestPayer::from(val));
|
153 + | }
|
154 + | #[allow(
|
155 + | unused_variables,
|
156 + | unreachable_code,
|
157 + | clippy::single_match,
|
158 + | clippy::match_single_binding,
|
159 + | clippy::diverging_sub_expression
|
160 + | )]
|
161 + | deserializer.read_struct(&GETBUCKETACCELERATECONFIGURATIONINPUT_SCHEMA, &mut |member, deser| {
|
162 + | match member.member_index() {
|
163 + | Some(0) => {
|
164 + | builder.bucket = Some(deser.read_string(member)?);
|
165 + | }
|
166 + | Some(1) => { /* read from headers above */ }
|
167 + | Some(2) => { /* read from headers above */ }
|
168 + | _ => {}
|
169 + | }
|
170 + | Ok(())
|
171 + | })?;
|
129 172 | builder
|
130 173 | .build()
|
131 174 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
132 175 | }
|
133 176 | }
|
134 177 | impl GetBucketAccelerateConfigurationInput {
|
135 178 | /// Creates a new builder-style object to manufacture [`GetBucketAccelerateConfigurationInput`](crate::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationInput).
|
136 179 | pub fn builder() -> crate::operation::get_bucket_accelerate_configuration::builders::GetBucketAccelerateConfigurationInputBuilder {
|
137 180 | crate::operation::get_bucket_accelerate_configuration::builders::GetBucketAccelerateConfigurationInputBuilder::default()
|
138 181 | }
|