29 29 | "com.amazonaws.ec2.synthetic",
|
30 30 | "DisassociateCapacityReservationBillingOwnerInput",
|
31 31 | );
|
32 32 | static DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
33 33 | ::aws_smithy_schema::ShapeId::from_static(
|
34 34 | "com.amazonaws.ec2.synthetic#DisassociateCapacityReservationBillingOwnerInput$DryRun",
|
35 35 | "com.amazonaws.ec2.synthetic",
|
36 36 | "DisassociateCapacityReservationBillingOwnerInput",
|
37 37 | ),
|
38 38 | ::aws_smithy_schema::ShapeType::Boolean,
|
39 - | "dry_run",
|
39 + | "DryRun",
|
40 40 | 0,
|
41 41 | );
|
42 42 | static DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_CAPACITY_RESERVATION_ID: ::aws_smithy_schema::Schema =
|
43 43 | ::aws_smithy_schema::Schema::new_member(
|
44 44 | ::aws_smithy_schema::ShapeId::from_static(
|
45 45 | "com.amazonaws.ec2.synthetic#DisassociateCapacityReservationBillingOwnerInput$CapacityReservationId",
|
46 46 | "com.amazonaws.ec2.synthetic",
|
47 47 | "DisassociateCapacityReservationBillingOwnerInput",
|
48 48 | ),
|
49 49 | ::aws_smithy_schema::ShapeType::String,
|
50 - | "capacity_reservation_id",
|
50 + | "CapacityReservationId",
|
51 51 | 1,
|
52 52 | );
|
53 53 | static DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_UNUSED_RESERVATION_BILLING_OWNER_ID: ::aws_smithy_schema::Schema =
|
54 54 | ::aws_smithy_schema::Schema::new_member(
|
55 55 | ::aws_smithy_schema::ShapeId::from_static(
|
56 56 | "com.amazonaws.ec2.synthetic#DisassociateCapacityReservationBillingOwnerInput$UnusedReservationBillingOwnerId",
|
57 57 | "com.amazonaws.ec2.synthetic",
|
58 58 | "DisassociateCapacityReservationBillingOwnerInput",
|
59 59 | ),
|
60 60 | ::aws_smithy_schema::ShapeType::String,
|
61 - | "unused_reservation_billing_owner_id",
|
61 + | "UnusedReservationBillingOwnerId",
|
62 62 | 2,
|
63 63 | );
|
64 64 | static DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
65 65 | DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_SCHEMA_ID,
|
66 66 | ::aws_smithy_schema::ShapeType::Structure,
|
67 67 | &[
|
68 68 | &DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_DRY_RUN,
|
69 69 | &DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_CAPACITY_RESERVATION_ID,
|
70 70 | &DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_UNUSED_RESERVATION_BILLING_OWNER_ID,
|
71 71 | ],
|
72 72 | );
|
73 73 | impl DisassociateCapacityReservationBillingOwnerInput {
|
74 74 | /// The schema for this shape.
|
75 75 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_SCHEMA;
|
76 76 | }
|
77 77 | impl ::aws_smithy_schema::serde::SerializableStruct for DisassociateCapacityReservationBillingOwnerInput {
|
78 78 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
79 79 | fn serialize_members(
|
80 80 | &self,
|
81 81 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
82 82 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
83 83 | if let Some(ref val) = self.dry_run {
|
84 84 | ser.write_boolean(&DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_DRY_RUN, *val)?;
|
85 85 | }
|
86 86 | if let Some(ref val) = self.capacity_reservation_id {
|
87 87 | ser.write_string(&DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_CAPACITY_RESERVATION_ID, val)?;
|
88 88 | }
|
89 89 | if let Some(ref val) = self.unused_reservation_billing_owner_id {
|
90 90 | ser.write_string(
|
91 91 | &DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_MEMBER_UNUSED_RESERVATION_BILLING_OWNER_ID,
|
92 92 | val,
|
93 93 | )?;
|
94 94 | }
|
95 95 | Ok(())
|
96 96 | }
|
97 97 | }
|
98 98 | impl DisassociateCapacityReservationBillingOwnerInput {
|
99 99 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
100 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
101 - | deserializer: &mut D,
|
100 + | pub fn deserialize(
|
101 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
102 102 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
103 103 | #[allow(unused_variables, unused_mut)]
|
104 104 | let mut builder = Self::builder();
|
105 105 | #[allow(
|
106 106 | unused_variables,
|
107 107 | unreachable_code,
|
108 108 | clippy::single_match,
|
109 109 | clippy::match_single_binding,
|
110 110 | clippy::diverging_sub_expression
|
111 111 | )]
|
112 - | deserializer.read_struct(&DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_SCHEMA, (), |_, member, deser| {
|
112 + | deserializer.read_struct(&DISASSOCIATECAPACITYRESERVATIONBILLINGOWNERINPUT_SCHEMA, &mut |member, deser| {
|
113 113 | match member.member_index() {
|
114 114 | Some(0) => {
|
115 115 | builder.dry_run = Some(deser.read_boolean(member)?);
|
116 116 | }
|
117 117 | Some(1) => {
|
118 118 | builder.capacity_reservation_id = Some(deser.read_string(member)?);
|
119 119 | }
|
120 120 | Some(2) => {
|
121 121 | builder.unused_reservation_billing_owner_id = Some(deser.read_string(member)?);
|
122 122 | }
|
123 123 | _ => {}
|
124 124 | }
|
125 125 | Ok(())
|
126 126 | })?;
|
127 + | builder.capacity_reservation_id = builder.capacity_reservation_id.or(Some(String::new()));
|
128 + | builder.unused_reservation_billing_owner_id = builder.unused_reservation_billing_owner_id.or(Some(String::new()));
|
127 129 | builder
|
128 130 | .build()
|
129 131 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
130 132 | }
|
131 133 | }
|
134 + | impl DisassociateCapacityReservationBillingOwnerInput {
|
135 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
136 + | pub fn deserialize_with_response(
|
137 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
138 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
139 + | _status: u16,
|
140 + | _body: &[u8],
|
141 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
142 + | Self::deserialize(deserializer)
|
143 + | }
|
144 + | }
|
132 145 | impl DisassociateCapacityReservationBillingOwnerInput {
|
133 146 | /// Creates a new builder-style object to manufacture [`DisassociateCapacityReservationBillingOwnerInput`](crate::operation::disassociate_capacity_reservation_billing_owner::DisassociateCapacityReservationBillingOwnerInput).
|
134 147 | pub fn builder(
|
135 148 | ) -> crate::operation::disassociate_capacity_reservation_billing_owner::builders::DisassociateCapacityReservationBillingOwnerInputBuilder {
|
136 149 | crate::operation::disassociate_capacity_reservation_billing_owner::builders::DisassociateCapacityReservationBillingOwnerInputBuilder::default(
|
137 150 | )
|
138 151 | }
|
139 152 | }
|
140 153 |
|
141 154 | /// A builder for [`DisassociateCapacityReservationBillingOwnerInput`](crate::operation::disassociate_capacity_reservation_billing_owner::DisassociateCapacityReservationBillingOwnerInput).
|
142 155 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
143 156 | #[non_exhaustive]
|
144 157 | pub struct DisassociateCapacityReservationBillingOwnerInputBuilder {
|
145 158 | pub(crate) dry_run: ::std::option::Option<bool>,
|
146 159 | pub(crate) capacity_reservation_id: ::std::option::Option<::std::string::String>,
|
147 160 | pub(crate) unused_reservation_billing_owner_id: ::std::option::Option<::std::string::String>,
|
148 161 | }
|
149 162 | impl DisassociateCapacityReservationBillingOwnerInputBuilder {
|
150 163 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
151 164 | pub fn dry_run(mut self, input: bool) -> Self {
|
152 165 | self.dry_run = ::std::option::Option::Some(input);
|
153 166 | self
|
154 167 | }
|
155 168 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
156 169 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
157 170 | self.dry_run = input;
|
158 171 | self
|
159 172 | }
|
160 173 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
161 174 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|