55 55 | "com.amazonaws.ec2.synthetic",
|
56 56 | "AssociateAddressInput",
|
57 57 | );
|
58 58 | static ASSOCIATEADDRESSINPUT_MEMBER_ALLOCATION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
59 59 | ::aws_smithy_schema::ShapeId::from_static(
|
60 60 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$AllocationId",
|
61 61 | "com.amazonaws.ec2.synthetic",
|
62 62 | "AssociateAddressInput",
|
63 63 | ),
|
64 64 | ::aws_smithy_schema::ShapeType::String,
|
65 - | "allocation_id",
|
65 + | "AllocationId",
|
66 66 | 0,
|
67 67 | );
|
68 68 | static ASSOCIATEADDRESSINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
69 69 | ::aws_smithy_schema::ShapeId::from_static(
|
70 70 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$InstanceId",
|
71 71 | "com.amazonaws.ec2.synthetic",
|
72 72 | "AssociateAddressInput",
|
73 73 | ),
|
74 74 | ::aws_smithy_schema::ShapeType::String,
|
75 - | "instance_id",
|
75 + | "InstanceId",
|
76 76 | 1,
|
77 77 | );
|
78 78 | static ASSOCIATEADDRESSINPUT_MEMBER_PUBLIC_IP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
79 79 | ::aws_smithy_schema::ShapeId::from_static(
|
80 80 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$PublicIp",
|
81 81 | "com.amazonaws.ec2.synthetic",
|
82 82 | "AssociateAddressInput",
|
83 83 | ),
|
84 84 | ::aws_smithy_schema::ShapeType::String,
|
85 - | "public_ip",
|
85 + | "PublicIp",
|
86 86 | 2,
|
87 87 | );
|
88 88 | static ASSOCIATEADDRESSINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
89 89 | ::aws_smithy_schema::ShapeId::from_static(
|
90 90 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$DryRun",
|
91 91 | "com.amazonaws.ec2.synthetic",
|
92 92 | "AssociateAddressInput",
|
93 93 | ),
|
94 94 | ::aws_smithy_schema::ShapeType::Boolean,
|
95 - | "dry_run",
|
95 + | "DryRun",
|
96 96 | 3,
|
97 97 | )
|
98 98 | .with_xml_name("dryRun");
|
99 99 | static ASSOCIATEADDRESSINPUT_MEMBER_NETWORK_INTERFACE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
100 100 | ::aws_smithy_schema::ShapeId::from_static(
|
101 101 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$NetworkInterfaceId",
|
102 102 | "com.amazonaws.ec2.synthetic",
|
103 103 | "AssociateAddressInput",
|
104 104 | ),
|
105 105 | ::aws_smithy_schema::ShapeType::String,
|
106 - | "network_interface_id",
|
106 + | "NetworkInterfaceId",
|
107 107 | 4,
|
108 108 | )
|
109 109 | .with_xml_name("networkInterfaceId");
|
110 110 | static ASSOCIATEADDRESSINPUT_MEMBER_PRIVATE_IP_ADDRESS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
111 111 | ::aws_smithy_schema::ShapeId::from_static(
|
112 112 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$PrivateIpAddress",
|
113 113 | "com.amazonaws.ec2.synthetic",
|
114 114 | "AssociateAddressInput",
|
115 115 | ),
|
116 116 | ::aws_smithy_schema::ShapeType::String,
|
117 - | "private_ip_address",
|
117 + | "PrivateIpAddress",
|
118 118 | 5,
|
119 119 | )
|
120 120 | .with_xml_name("privateIpAddress");
|
121 121 | static ASSOCIATEADDRESSINPUT_MEMBER_ALLOW_REASSOCIATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
122 122 | ::aws_smithy_schema::ShapeId::from_static(
|
123 123 | "com.amazonaws.ec2.synthetic#AssociateAddressInput$AllowReassociation",
|
124 124 | "com.amazonaws.ec2.synthetic",
|
125 125 | "AssociateAddressInput",
|
126 126 | ),
|
127 127 | ::aws_smithy_schema::ShapeType::Boolean,
|
128 - | "allow_reassociation",
|
128 + | "AllowReassociation",
|
129 129 | 6,
|
130 130 | )
|
131 131 | .with_xml_name("allowReassociation");
|
132 132 | static ASSOCIATEADDRESSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
133 133 | ASSOCIATEADDRESSINPUT_SCHEMA_ID,
|
134 134 | ::aws_smithy_schema::ShapeType::Structure,
|
135 135 | &[
|
136 136 | &ASSOCIATEADDRESSINPUT_MEMBER_ALLOCATION_ID,
|
137 137 | &ASSOCIATEADDRESSINPUT_MEMBER_INSTANCE_ID,
|
138 138 | &ASSOCIATEADDRESSINPUT_MEMBER_PUBLIC_IP,
|
139 139 | &ASSOCIATEADDRESSINPUT_MEMBER_DRY_RUN,
|
140 140 | &ASSOCIATEADDRESSINPUT_MEMBER_NETWORK_INTERFACE_ID,
|
141 141 | &ASSOCIATEADDRESSINPUT_MEMBER_PRIVATE_IP_ADDRESS,
|
142 142 | &ASSOCIATEADDRESSINPUT_MEMBER_ALLOW_REASSOCIATION,
|
143 143 | ],
|
144 144 | );
|
145 145 | impl AssociateAddressInput {
|
146 146 | /// The schema for this shape.
|
147 147 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ASSOCIATEADDRESSINPUT_SCHEMA;
|
148 148 | }
|
149 149 | impl ::aws_smithy_schema::serde::SerializableStruct for AssociateAddressInput {
|
150 150 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
151 151 | fn serialize_members(
|
152 152 | &self,
|
153 153 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
154 154 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
155 155 | if let Some(ref val) = self.allocation_id {
|
156 156 | ser.write_string(&ASSOCIATEADDRESSINPUT_MEMBER_ALLOCATION_ID, val)?;
|
157 157 | }
|
158 158 | if let Some(ref val) = self.instance_id {
|
159 159 | ser.write_string(&ASSOCIATEADDRESSINPUT_MEMBER_INSTANCE_ID, val)?;
|
160 160 | }
|
161 161 | if let Some(ref val) = self.public_ip {
|
162 162 | ser.write_string(&ASSOCIATEADDRESSINPUT_MEMBER_PUBLIC_IP, val)?;
|
163 163 | }
|
164 164 | if let Some(ref val) = self.dry_run {
|
165 165 | ser.write_boolean(&ASSOCIATEADDRESSINPUT_MEMBER_DRY_RUN, *val)?;
|
166 166 | }
|
167 167 | if let Some(ref val) = self.network_interface_id {
|
168 168 | ser.write_string(&ASSOCIATEADDRESSINPUT_MEMBER_NETWORK_INTERFACE_ID, val)?;
|
169 169 | }
|
170 170 | if let Some(ref val) = self.private_ip_address {
|
171 171 | ser.write_string(&ASSOCIATEADDRESSINPUT_MEMBER_PRIVATE_IP_ADDRESS, val)?;
|
172 172 | }
|
173 173 | if let Some(ref val) = self.allow_reassociation {
|
174 174 | ser.write_boolean(&ASSOCIATEADDRESSINPUT_MEMBER_ALLOW_REASSOCIATION, *val)?;
|
175 175 | }
|
176 176 | Ok(())
|
177 177 | }
|
178 178 | }
|
179 179 | impl AssociateAddressInput {
|
180 180 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
181 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
182 - | deserializer: &mut D,
|
181 + | pub fn deserialize(
|
182 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
183 183 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
184 184 | #[allow(unused_variables, unused_mut)]
|
185 185 | let mut builder = Self::builder();
|
186 186 | #[allow(
|
187 187 | unused_variables,
|
188 188 | unreachable_code,
|
189 189 | clippy::single_match,
|
190 190 | clippy::match_single_binding,
|
191 191 | clippy::diverging_sub_expression
|
192 192 | )]
|
193 - | deserializer.read_struct(&ASSOCIATEADDRESSINPUT_SCHEMA, (), |_, member, deser| {
|
193 + | deserializer.read_struct(&ASSOCIATEADDRESSINPUT_SCHEMA, &mut |member, deser| {
|
194 194 | match member.member_index() {
|
195 195 | Some(0) => {
|
196 196 | builder.allocation_id = Some(deser.read_string(member)?);
|
197 197 | }
|
198 198 | Some(1) => {
|
199 199 | builder.instance_id = Some(deser.read_string(member)?);
|
200 200 | }
|
201 201 | Some(2) => {
|
202 202 | builder.public_ip = Some(deser.read_string(member)?);
|
203 203 | }
|
204 204 | Some(3) => {
|
205 205 | builder.dry_run = Some(deser.read_boolean(member)?);
|
206 206 | }
|
207 207 | Some(4) => {
|
208 208 | builder.network_interface_id = Some(deser.read_string(member)?);
|
209 209 | }
|
210 210 | Some(5) => {
|
211 211 | builder.private_ip_address = Some(deser.read_string(member)?);
|
212 212 | }
|
213 213 | Some(6) => {
|
214 214 | builder.allow_reassociation = Some(deser.read_boolean(member)?);
|
215 215 | }
|
216 216 | _ => {}
|
217 217 | }
|
218 218 | Ok(())
|
219 219 | })?;
|
220 220 | builder
|
221 221 | .build()
|
222 222 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
223 223 | }
|
224 224 | }
|
225 + | impl AssociateAddressInput {
|
226 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
227 + | pub fn deserialize_with_response(
|
228 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
229 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
230 + | _status: u16,
|
231 + | _body: &[u8],
|
232 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
233 + | Self::deserialize(deserializer)
|
234 + | }
|
235 + | }
|
225 236 | impl AssociateAddressInput {
|
226 237 | /// Creates a new builder-style object to manufacture [`AssociateAddressInput`](crate::operation::associate_address::AssociateAddressInput).
|
227 238 | pub fn builder() -> crate::operation::associate_address::builders::AssociateAddressInputBuilder {
|
228 239 | crate::operation::associate_address::builders::AssociateAddressInputBuilder::default()
|
229 240 | }
|
230 241 | }
|
231 242 |
|
232 243 | /// A builder for [`AssociateAddressInput`](crate::operation::associate_address::AssociateAddressInput).
|
233 244 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
234 245 | #[non_exhaustive]
|