45 45 | "com.amazonaws.ec2.synthetic",
|
46 46 | "DescribeIpamScopesInput",
|
47 47 | );
|
48 48 | static DESCRIBEIPAMSCOPESINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
49 49 | ::aws_smithy_schema::ShapeId::from_static(
|
50 50 | "com.amazonaws.ec2.synthetic#DescribeIpamScopesInput$DryRun",
|
51 51 | "com.amazonaws.ec2.synthetic",
|
52 52 | "DescribeIpamScopesInput",
|
53 53 | ),
|
54 54 | ::aws_smithy_schema::ShapeType::Boolean,
|
55 - | "dry_run",
|
55 + | "DryRun",
|
56 56 | 0,
|
57 57 | );
|
58 58 | static DESCRIBEIPAMSCOPESINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
59 59 | ::aws_smithy_schema::ShapeId::from_static(
|
60 60 | "com.amazonaws.ec2.synthetic#DescribeIpamScopesInput$Filters",
|
61 61 | "com.amazonaws.ec2.synthetic",
|
62 62 | "DescribeIpamScopesInput",
|
63 63 | ),
|
64 64 | ::aws_smithy_schema::ShapeType::List,
|
65 - | "filters",
|
65 + | "Filters",
|
66 66 | 1,
|
67 67 | )
|
68 68 | .with_xml_name("Filter");
|
69 69 | static DESCRIBEIPAMSCOPESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
70 70 | ::aws_smithy_schema::ShapeId::from_static(
|
71 71 | "com.amazonaws.ec2.synthetic#DescribeIpamScopesInput$MaxResults",
|
72 72 | "com.amazonaws.ec2.synthetic",
|
73 73 | "DescribeIpamScopesInput",
|
74 74 | ),
|
75 75 | ::aws_smithy_schema::ShapeType::Integer,
|
76 - | "max_results",
|
76 + | "MaxResults",
|
77 77 | 2,
|
78 78 | );
|
79 79 | static DESCRIBEIPAMSCOPESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
80 80 | ::aws_smithy_schema::ShapeId::from_static(
|
81 81 | "com.amazonaws.ec2.synthetic#DescribeIpamScopesInput$NextToken",
|
82 82 | "com.amazonaws.ec2.synthetic",
|
83 83 | "DescribeIpamScopesInput",
|
84 84 | ),
|
85 85 | ::aws_smithy_schema::ShapeType::String,
|
86 - | "next_token",
|
86 + | "NextToken",
|
87 87 | 3,
|
88 88 | );
|
89 89 | static DESCRIBEIPAMSCOPESINPUT_MEMBER_IPAM_SCOPE_IDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
90 90 | ::aws_smithy_schema::ShapeId::from_static(
|
91 91 | "com.amazonaws.ec2.synthetic#DescribeIpamScopesInput$IpamScopeIds",
|
92 92 | "com.amazonaws.ec2.synthetic",
|
93 93 | "DescribeIpamScopesInput",
|
94 94 | ),
|
95 95 | ::aws_smithy_schema::ShapeType::List,
|
96 - | "ipam_scope_ids",
|
96 + | "IpamScopeIds",
|
97 97 | 4,
|
98 98 | )
|
99 99 | .with_xml_name("IpamScopeId");
|
100 100 | static DESCRIBEIPAMSCOPESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
101 101 | DESCRIBEIPAMSCOPESINPUT_SCHEMA_ID,
|
102 102 | ::aws_smithy_schema::ShapeType::Structure,
|
103 103 | &[
|
104 104 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_DRY_RUN,
|
105 105 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_FILTERS,
|
106 106 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_MAX_RESULTS,
|
107 107 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_NEXT_TOKEN,
|
108 108 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_IPAM_SCOPE_IDS,
|
109 109 | ],
|
110 110 | );
|
111 111 | impl DescribeIpamScopesInput {
|
112 112 | /// The schema for this shape.
|
113 113 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEIPAMSCOPESINPUT_SCHEMA;
|
114 114 | }
|
115 115 | impl ::aws_smithy_schema::serde::SerializableStruct for DescribeIpamScopesInput {
|
116 116 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
117 117 | fn serialize_members(
|
118 118 | &self,
|
119 119 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
120 120 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
121 121 | if let Some(ref val) = self.dry_run {
|
122 122 | ser.write_boolean(&DESCRIBEIPAMSCOPESINPUT_MEMBER_DRY_RUN, *val)?;
|
123 123 | }
|
124 124 | if let Some(ref val) = self.filters {
|
125 125 | ser.write_list(
|
126 126 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_FILTERS,
|
127 127 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
128 128 | for item in val {
|
129 129 | ser.write_struct(crate::types::Filter::SCHEMA, item)?;
|
130 130 | }
|
131 131 | Ok(())
|
132 132 | },
|
133 133 | )?;
|
134 134 | }
|
135 135 | if let Some(ref val) = self.max_results {
|
136 136 | ser.write_integer(&DESCRIBEIPAMSCOPESINPUT_MEMBER_MAX_RESULTS, *val)?;
|
137 137 | }
|
138 138 | if let Some(ref val) = self.next_token {
|
139 139 | ser.write_string(&DESCRIBEIPAMSCOPESINPUT_MEMBER_NEXT_TOKEN, val)?;
|
140 140 | }
|
141 141 | if let Some(ref val) = self.ipam_scope_ids {
|
142 142 | ser.write_list(
|
143 143 | &DESCRIBEIPAMSCOPESINPUT_MEMBER_IPAM_SCOPE_IDS,
|
144 144 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
145 145 | for item in val {
|
146 146 | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
147 147 | }
|
148 148 | Ok(())
|
149 149 | },
|
150 150 | )?;
|
151 151 | }
|
152 152 | Ok(())
|
153 153 | }
|
154 154 | }
|
155 155 | impl DescribeIpamScopesInput {
|
156 156 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
157 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
158 - | deserializer: &mut D,
|
157 + | pub fn deserialize(
|
158 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
159 159 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
160 160 | #[allow(unused_variables, unused_mut)]
|
161 161 | let mut builder = Self::builder();
|
162 162 | #[allow(
|
163 163 | unused_variables,
|
164 164 | unreachable_code,
|
165 165 | clippy::single_match,
|
166 166 | clippy::match_single_binding,
|
167 167 | clippy::diverging_sub_expression
|
168 168 | )]
|
169 - | deserializer.read_struct(&DESCRIBEIPAMSCOPESINPUT_SCHEMA, (), |_, member, deser| {
|
169 + | deserializer.read_struct(&DESCRIBEIPAMSCOPESINPUT_SCHEMA, &mut |member, deser| {
|
170 170 | match member.member_index() {
|
171 171 | Some(0) => {
|
172 172 | builder.dry_run = Some(deser.read_boolean(member)?);
|
173 173 | }
|
174 174 | Some(1) => {
|
175 175 | builder.filters = Some({
|
176 - | let container = if let Some(cap) = deser.container_size() {
|
177 - | Vec::with_capacity(cap)
|
178 - | } else {
|
179 - | Vec::new()
|
180 - | };
|
181 - | deser.read_list(member, container, |mut list, deser| {
|
182 - | list.push(crate::types::Filter::deserialize(deser)?);
|
183 - | Ok(list)
|
184 - | })?
|
176 + | let mut container = Vec::new();
|
177 + | deser.read_list(member, &mut |deser| {
|
178 + | container.push(crate::types::Filter::deserialize(deser)?);
|
179 + | Ok(())
|
180 + | })?;
|
181 + | container
|
185 182 | });
|
186 183 | }
|
187 184 | Some(2) => {
|
188 185 | builder.max_results = Some(deser.read_integer(member)?);
|
189 186 | }
|
190 187 | Some(3) => {
|
191 188 | builder.next_token = Some(deser.read_string(member)?);
|
192 189 | }
|
193 190 | Some(4) => {
|
194 - | builder.ipam_scope_ids = Some({
|
195 - | let container = if let Some(cap) = deser.container_size() {
|
196 - | Vec::with_capacity(cap)
|
197 - | } else {
|
198 - | Vec::new()
|
199 - | };
|
200 - | deser.read_list(member, container, |mut list, deser| {
|
201 - | list.push(deser.read_string(member)?);
|
202 - | Ok(list)
|
203 - | })?
|
204 - | });
|
191 + | builder.ipam_scope_ids = Some(deser.read_string_list(member)?);
|
205 192 | }
|
206 193 | _ => {}
|
207 194 | }
|
208 195 | Ok(())
|
209 196 | })?;
|
210 197 | builder
|
211 198 | .build()
|
212 199 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
213 200 | }
|
214 201 | }
|
202 + | impl DescribeIpamScopesInput {
|
203 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
204 + | pub fn deserialize_with_response(
|
205 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
206 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
207 + | _status: u16,
|
208 + | _body: &[u8],
|
209 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
210 + | Self::deserialize(deserializer)
|
211 + | }
|
212 + | }
|
215 213 | impl DescribeIpamScopesInput {
|
216 214 | /// Creates a new builder-style object to manufacture [`DescribeIpamScopesInput`](crate::operation::describe_ipam_scopes::DescribeIpamScopesInput).
|
217 215 | pub fn builder() -> crate::operation::describe_ipam_scopes::builders::DescribeIpamScopesInputBuilder {
|
218 216 | crate::operation::describe_ipam_scopes::builders::DescribeIpamScopesInputBuilder::default()
|
219 217 | }
|
220 218 | }
|
221 219 |
|
222 220 | /// A builder for [`DescribeIpamScopesInput`](crate::operation::describe_ipam_scopes::DescribeIpamScopesInput).
|
223 221 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
224 222 | #[non_exhaustive]
|