39 39 | "com.amazonaws.s3control.synthetic",
|
40 40 | "ListRegionalBucketsInput",
|
41 41 | );
|
42 42 | static LISTREGIONALBUCKETSINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
43 43 | ::aws_smithy_schema::ShapeId::from_static(
|
44 44 | "com.amazonaws.s3control.synthetic#ListRegionalBucketsInput$AccountId",
|
45 45 | "com.amazonaws.s3control.synthetic",
|
46 46 | "ListRegionalBucketsInput",
|
47 47 | ),
|
48 48 | ::aws_smithy_schema::ShapeType::String,
|
49 - | "account_id",
|
49 + | "AccountId",
|
50 50 | 0,
|
51 51 | )
|
52 52 | .with_host_label()
|
53 53 | .with_http_header("x-amz-account-id");
|
54 54 | static LISTREGIONALBUCKETSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
55 55 | ::aws_smithy_schema::ShapeId::from_static(
|
56 56 | "com.amazonaws.s3control.synthetic#ListRegionalBucketsInput$NextToken",
|
57 57 | "com.amazonaws.s3control.synthetic",
|
58 58 | "ListRegionalBucketsInput",
|
59 59 | ),
|
60 60 | ::aws_smithy_schema::ShapeType::String,
|
61 - | "next_token",
|
61 + | "NextToken",
|
62 62 | 1,
|
63 63 | )
|
64 64 | .with_http_query("nextToken");
|
65 65 | static LISTREGIONALBUCKETSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
66 66 | ::aws_smithy_schema::ShapeId::from_static(
|
67 67 | "com.amazonaws.s3control.synthetic#ListRegionalBucketsInput$MaxResults",
|
68 68 | "com.amazonaws.s3control.synthetic",
|
69 69 | "ListRegionalBucketsInput",
|
70 70 | ),
|
71 71 | ::aws_smithy_schema::ShapeType::Integer,
|
72 - | "max_results",
|
72 + | "MaxResults",
|
73 73 | 2,
|
74 74 | )
|
75 75 | .with_http_query("maxResults");
|
76 76 | static LISTREGIONALBUCKETSINPUT_MEMBER_OUTPOST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
77 77 | ::aws_smithy_schema::ShapeId::from_static(
|
78 78 | "com.amazonaws.s3control.synthetic#ListRegionalBucketsInput$OutpostId",
|
79 79 | "com.amazonaws.s3control.synthetic",
|
80 80 | "ListRegionalBucketsInput",
|
81 81 | ),
|
82 82 | ::aws_smithy_schema::ShapeType::String,
|
83 - | "outpost_id",
|
83 + | "OutpostId",
|
84 84 | 3,
|
85 85 | )
|
86 86 | .with_http_header("x-amz-outpost-id");
|
87 87 | static LISTREGIONALBUCKETSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
88 88 | LISTREGIONALBUCKETSINPUT_SCHEMA_ID,
|
89 89 | ::aws_smithy_schema::ShapeType::Structure,
|
90 90 | &[
|
91 91 | &LISTREGIONALBUCKETSINPUT_MEMBER_ACCOUNT_ID,
|
92 92 | &LISTREGIONALBUCKETSINPUT_MEMBER_NEXT_TOKEN,
|
93 93 | &LISTREGIONALBUCKETSINPUT_MEMBER_MAX_RESULTS,
|
94 94 | &LISTREGIONALBUCKETSINPUT_MEMBER_OUTPOST_ID,
|
95 95 | ],
|
96 - | );
|
96 + | )
|
97 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/v20180820/bucket", None));
|
97 98 | impl ListRegionalBucketsInput {
|
98 99 | /// The schema for this shape.
|
99 100 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTREGIONALBUCKETSINPUT_SCHEMA;
|
100 101 | }
|
101 102 | impl ::aws_smithy_schema::serde::SerializableStruct for ListRegionalBucketsInput {
|
102 103 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
103 104 | fn serialize_members(
|
104 105 | &self,
|
105 106 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
106 107 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
107 108 | if let Some(ref val) = self.account_id {
|
108 109 | ser.write_string(&LISTREGIONALBUCKETSINPUT_MEMBER_ACCOUNT_ID, val)?;
|
109 110 | }
|
110 111 | if let Some(ref val) = self.next_token {
|
111 112 | ser.write_string(&LISTREGIONALBUCKETSINPUT_MEMBER_NEXT_TOKEN, val)?;
|
112 113 | }
|
113 114 | if let Some(ref val) = self.max_results {
|
114 115 | ser.write_integer(&LISTREGIONALBUCKETSINPUT_MEMBER_MAX_RESULTS, *val)?;
|
115 116 | }
|
116 117 | if let Some(ref val) = self.outpost_id {
|
117 118 | ser.write_string(&LISTREGIONALBUCKETSINPUT_MEMBER_OUTPOST_ID, val)?;
|
118 119 | }
|
119 120 | Ok(())
|
120 121 | }
|
121 122 | }
|
122 123 | impl ListRegionalBucketsInput {
|
123 124 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
124 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
125 - | deserializer: &mut D,
|
125 + | pub fn deserialize(
|
126 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
126 127 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
127 128 | #[allow(unused_variables, unused_mut)]
|
128 129 | let mut builder = Self::builder();
|
129 130 | #[allow(
|
130 131 | unused_variables,
|
131 132 | unreachable_code,
|
132 133 | clippy::single_match,
|
133 134 | clippy::match_single_binding,
|
134 135 | clippy::diverging_sub_expression
|
135 136 | )]
|
136 - | deserializer.read_struct(&LISTREGIONALBUCKETSINPUT_SCHEMA, (), |_, member, deser| {
|
137 + | deserializer.read_struct(&LISTREGIONALBUCKETSINPUT_SCHEMA, &mut |member, deser| {
|
137 138 | match member.member_index() {
|
138 139 | Some(0) => {
|
139 140 | builder.account_id = Some(deser.read_string(member)?);
|
140 141 | }
|
141 142 | Some(1) => {
|
142 143 | builder.next_token = Some(deser.read_string(member)?);
|
143 144 | }
|
144 145 | Some(2) => {
|
145 146 | builder.max_results = Some(deser.read_integer(member)?);
|
146 147 | }
|
147 148 | Some(3) => {
|
148 149 | builder.outpost_id = Some(deser.read_string(member)?);
|
149 150 | }
|
150 151 | _ => {}
|
151 152 | }
|
152 153 | Ok(())
|
153 154 | })?;
|
155 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
156 + | builder
|
157 + | .build()
|
158 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
159 + | }
|
160 + | }
|
161 + | impl ListRegionalBucketsInput {
|
162 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
163 + | /// Header-bound members are read directly from headers, avoiding runtime
|
164 + | /// member iteration overhead. Body members are read via the deserializer.
|
165 + | pub fn deserialize_with_response(
|
166 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
167 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
168 + | _status: u16,
|
169 + | _body: &[u8],
|
170 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
171 + | #[allow(unused_variables, unused_mut)]
|
172 + | let mut builder = Self::builder();
|
173 + | if let Some(val) = headers.get("x-amz-account-id") {
|
174 + | builder.account_id = Some(val.to_string());
|
175 + | }
|
176 + | if let Some(val) = headers.get("x-amz-outpost-id") {
|
177 + | builder.outpost_id = Some(val.to_string());
|
178 + | }
|
179 + | #[allow(
|
180 + | unused_variables,
|
181 + | unreachable_code,
|
182 + | clippy::single_match,
|
183 + | clippy::match_single_binding,
|
184 + | clippy::diverging_sub_expression
|
185 + | )]
|
186 + | deserializer.read_struct(&LISTREGIONALBUCKETSINPUT_SCHEMA, &mut |member, deser| {
|
187 + | match member.member_index() {
|
188 + | Some(0) => { /* read from headers above */ }
|
189 + | Some(1) => {
|
190 + | builder.next_token = Some(deser.read_string(member)?);
|
191 + | }
|
192 + | Some(2) => {
|
193 + | builder.max_results = Some(deser.read_integer(member)?);
|
194 + | }
|
195 + | Some(3) => { /* read from headers above */ }
|
196 + | _ => {}
|
197 + | }
|
198 + | Ok(())
|
199 + | })?;
|
154 200 | builder
|
155 201 | .build()
|
156 202 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
157 203 | }
|
158 204 | }
|
159 205 | impl ListRegionalBucketsInput {
|
160 206 | /// Creates a new builder-style object to manufacture [`ListRegionalBucketsInput`](crate::operation::list_regional_buckets::ListRegionalBucketsInput).
|
161 207 | pub fn builder() -> crate::operation::list_regional_buckets::builders::ListRegionalBucketsInputBuilder {
|
162 208 | crate::operation::list_regional_buckets::builders::ListRegionalBucketsInputBuilder::default()
|
163 209 | }
|