32 32 | "com.amazonaws.iam.synthetic",
|
33 33 | "ListInstanceProfilesOutput",
|
34 34 | );
|
35 35 | static LISTINSTANCEPROFILESOUTPUT_MEMBER_INSTANCE_PROFILES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
36 36 | ::aws_smithy_schema::ShapeId::from_static(
|
37 37 | "com.amazonaws.iam.synthetic#ListInstanceProfilesOutput$InstanceProfiles",
|
38 38 | "com.amazonaws.iam.synthetic",
|
39 39 | "ListInstanceProfilesOutput",
|
40 40 | ),
|
41 41 | ::aws_smithy_schema::ShapeType::List,
|
42 - | "instance_profiles",
|
42 + | "InstanceProfiles",
|
43 43 | 0,
|
44 44 | );
|
45 45 | static LISTINSTANCEPROFILESOUTPUT_MEMBER_IS_TRUNCATED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
46 46 | ::aws_smithy_schema::ShapeId::from_static(
|
47 47 | "com.amazonaws.iam.synthetic#ListInstanceProfilesOutput$IsTruncated",
|
48 48 | "com.amazonaws.iam.synthetic",
|
49 49 | "ListInstanceProfilesOutput",
|
50 50 | ),
|
51 51 | ::aws_smithy_schema::ShapeType::Boolean,
|
52 - | "is_truncated",
|
52 + | "IsTruncated",
|
53 53 | 1,
|
54 54 | );
|
55 55 | static LISTINSTANCEPROFILESOUTPUT_MEMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
56 56 | ::aws_smithy_schema::ShapeId::from_static(
|
57 57 | "com.amazonaws.iam.synthetic#ListInstanceProfilesOutput$Marker",
|
58 58 | "com.amazonaws.iam.synthetic",
|
59 59 | "ListInstanceProfilesOutput",
|
60 60 | ),
|
61 61 | ::aws_smithy_schema::ShapeType::String,
|
62 - | "marker",
|
62 + | "Marker",
|
63 63 | 2,
|
64 64 | );
|
65 + | static LISTINSTANCEPROFILESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
66 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
67 + | ::aws_smithy_schema::ShapeType::String,
|
68 + | "request_id",
|
69 + | 3,
|
70 + | )
|
71 + | .with_http_header("x-amzn-requestid");
|
65 72 | static LISTINSTANCEPROFILESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
66 73 | LISTINSTANCEPROFILESOUTPUT_SCHEMA_ID,
|
67 74 | ::aws_smithy_schema::ShapeType::Structure,
|
68 75 | &[
|
69 76 | &LISTINSTANCEPROFILESOUTPUT_MEMBER_INSTANCE_PROFILES,
|
70 77 | &LISTINSTANCEPROFILESOUTPUT_MEMBER_IS_TRUNCATED,
|
71 78 | &LISTINSTANCEPROFILESOUTPUT_MEMBER_MARKER,
|
79 + | &LISTINSTANCEPROFILESOUTPUT_MEMBER__REQUEST_ID,
|
72 80 | ],
|
73 81 | );
|
74 82 | impl ListInstanceProfilesOutput {
|
75 83 | /// The schema for this shape.
|
76 84 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTINSTANCEPROFILESOUTPUT_SCHEMA;
|
77 85 | }
|
78 86 | impl ::aws_smithy_schema::serde::SerializableStruct for ListInstanceProfilesOutput {
|
79 87 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
80 88 | fn serialize_members(
|
81 89 | &self,
|
82 90 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
83 91 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
84 92 | {
|
85 93 | let val = &self.instance_profiles;
|
86 94 |
|
87 95 | ser.write_list(
|
88 96 | &LISTINSTANCEPROFILESOUTPUT_MEMBER_INSTANCE_PROFILES,
|
89 97 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
90 98 | for item in val {
|
91 99 | ser.write_struct(crate::types::InstanceProfile::SCHEMA, item)?;
|
92 100 | }
|
93 101 | Ok(())
|
94 102 | },
|
95 103 | )?;
|
96 104 | }
|
97 105 | {
|
98 106 | let val = &self.is_truncated;
|
99 107 | ser.write_boolean(&LISTINSTANCEPROFILESOUTPUT_MEMBER_IS_TRUNCATED, *val)?;
|
100 108 | }
|
101 109 | if let Some(ref val) = self.marker {
|
102 110 | ser.write_string(&LISTINSTANCEPROFILESOUTPUT_MEMBER_MARKER, val)?;
|
103 111 | }
|
104 112 | Ok(())
|
105 113 | }
|
106 114 | }
|
107 115 | impl ListInstanceProfilesOutput {
|
108 116 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
109 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
110 - | deserializer: &mut D,
|
117 + | pub fn deserialize(
|
118 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
111 119 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
112 120 | #[allow(unused_variables, unused_mut)]
|
113 121 | let mut builder = Self::builder();
|
114 122 | #[allow(
|
115 123 | unused_variables,
|
116 124 | unreachable_code,
|
117 125 | clippy::single_match,
|
118 126 | clippy::match_single_binding,
|
119 127 | clippy::diverging_sub_expression
|
120 128 | )]
|
121 - | deserializer.read_struct(&LISTINSTANCEPROFILESOUTPUT_SCHEMA, (), |_, member, deser| {
|
129 + | deserializer.read_struct(&LISTINSTANCEPROFILESOUTPUT_SCHEMA, &mut |member, deser| {
|
122 130 | match member.member_index() {
|
123 131 | Some(0) => {
|
124 132 | builder.instance_profiles = Some({
|
125 - | let container = if let Some(cap) = deser.container_size() {
|
126 - | Vec::with_capacity(cap)
|
127 - | } else {
|
128 - | Vec::new()
|
129 - | };
|
130 - | deser.read_list(member, container, |mut list, deser| {
|
131 - | list.push(crate::types::InstanceProfile::deserialize(deser)?);
|
132 - | Ok(list)
|
133 - | })?
|
133 + | let mut container = Vec::new();
|
134 + | deser.read_list(member, &mut |deser| {
|
135 + | container.push(crate::types::InstanceProfile::deserialize(deser)?);
|
136 + | Ok(())
|
137 + | })?;
|
138 + | container
|
139 + | });
|
140 + | }
|
141 + | Some(1) => {
|
142 + | builder.is_truncated = Some(deser.read_boolean(member)?);
|
143 + | }
|
144 + | Some(2) => {
|
145 + | builder.marker = Some(deser.read_string(member)?);
|
146 + | }
|
147 + | Some(3) => {
|
148 + | builder._request_id = Some(deser.read_string(member)?);
|
149 + | }
|
150 + | _ => {}
|
151 + | }
|
152 + | Ok(())
|
153 + | })?;
|
154 + | builder.instance_profiles = builder.instance_profiles.or(Some(Vec::new()));
|
155 + | builder
|
156 + | .build()
|
157 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
158 + | }
|
159 + | }
|
160 + | impl ListInstanceProfilesOutput {
|
161 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
162 + | /// Header-bound members are read directly from headers, avoiding runtime
|
163 + | /// member iteration overhead. Body members are read via the deserializer.
|
164 + | pub fn deserialize_with_response(
|
165 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
166 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
167 + | _status: u16,
|
168 + | _body: &[u8],
|
169 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
170 + | #[allow(unused_variables, unused_mut)]
|
171 + | let mut builder = Self::builder();
|
172 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
173 + | builder._request_id = Some(val.to_string());
|
174 + | }
|
175 + | #[allow(
|
176 + | unused_variables,
|
177 + | unreachable_code,
|
178 + | clippy::single_match,
|
179 + | clippy::match_single_binding,
|
180 + | clippy::diverging_sub_expression
|
181 + | )]
|
182 + | deserializer.read_struct(&LISTINSTANCEPROFILESOUTPUT_SCHEMA, &mut |member, deser| {
|
183 + | match member.member_index() {
|
184 + | Some(0) => {
|
185 + | builder.instance_profiles = Some({
|
186 + | let mut container = Vec::new();
|
187 + | deser.read_list(member, &mut |deser| {
|
188 + | container.push(crate::types::InstanceProfile::deserialize(deser)?);
|
189 + | Ok(())
|
190 + | })?;
|
191 + | container
|
134 192 | });
|
135 193 | }
|
136 194 | Some(1) => {
|
137 195 | builder.is_truncated = Some(deser.read_boolean(member)?);
|
138 196 | }
|
139 197 | Some(2) => {
|
140 198 | builder.marker = Some(deser.read_string(member)?);
|
141 199 | }
|
142 200 | _ => {}
|
143 201 | }
|