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