59 59 | }
|
60 60 | static ITEM_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
61 61 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.transcribestreaming#Item", "com.amazonaws.transcribestreaming", "Item");
|
62 62 | static ITEM_MEMBER_START_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
63 63 | ::aws_smithy_schema::ShapeId::from_static(
|
64 64 | "com.amazonaws.transcribestreaming#Item$StartTime",
|
65 65 | "com.amazonaws.transcribestreaming",
|
66 66 | "Item",
|
67 67 | ),
|
68 68 | ::aws_smithy_schema::ShapeType::Double,
|
69 - | "start_time",
|
69 + | "StartTime",
|
70 70 | 0,
|
71 71 | );
|
72 72 | static ITEM_MEMBER_END_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
73 73 | ::aws_smithy_schema::ShapeId::from_static(
|
74 74 | "com.amazonaws.transcribestreaming#Item$EndTime",
|
75 75 | "com.amazonaws.transcribestreaming",
|
76 76 | "Item",
|
77 77 | ),
|
78 78 | ::aws_smithy_schema::ShapeType::Double,
|
79 - | "end_time",
|
79 + | "EndTime",
|
80 80 | 1,
|
81 81 | );
|
82 82 | static ITEM_MEMBER_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
83 83 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.transcribestreaming#Item$Type", "com.amazonaws.transcribestreaming", "Item"),
|
84 84 | ::aws_smithy_schema::ShapeType::String,
|
85 - | "r##type",
|
85 + | "Type",
|
86 86 | 2,
|
87 87 | );
|
88 88 | static ITEM_MEMBER_CONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
89 89 | ::aws_smithy_schema::ShapeId::from_static(
|
90 90 | "com.amazonaws.transcribestreaming#Item$Content",
|
91 91 | "com.amazonaws.transcribestreaming",
|
92 92 | "Item",
|
93 93 | ),
|
94 94 | ::aws_smithy_schema::ShapeType::String,
|
95 - | "content",
|
95 + | "Content",
|
96 96 | 3,
|
97 97 | );
|
98 98 | static ITEM_MEMBER_VOCABULARY_FILTER_MATCH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
99 99 | ::aws_smithy_schema::ShapeId::from_static(
|
100 100 | "com.amazonaws.transcribestreaming#Item$VocabularyFilterMatch",
|
101 101 | "com.amazonaws.transcribestreaming",
|
102 102 | "Item",
|
103 103 | ),
|
104 104 | ::aws_smithy_schema::ShapeType::Boolean,
|
105 - | "vocabulary_filter_match",
|
105 + | "VocabularyFilterMatch",
|
106 106 | 4,
|
107 107 | );
|
108 108 | static ITEM_MEMBER_SPEAKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
109 109 | ::aws_smithy_schema::ShapeId::from_static(
|
110 110 | "com.amazonaws.transcribestreaming#Item$Speaker",
|
111 111 | "com.amazonaws.transcribestreaming",
|
112 112 | "Item",
|
113 113 | ),
|
114 114 | ::aws_smithy_schema::ShapeType::String,
|
115 - | "speaker",
|
115 + | "Speaker",
|
116 116 | 5,
|
117 117 | );
|
118 118 | static ITEM_MEMBER_CONFIDENCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
119 119 | ::aws_smithy_schema::ShapeId::from_static(
|
120 120 | "com.amazonaws.transcribestreaming#Item$Confidence",
|
121 121 | "com.amazonaws.transcribestreaming",
|
122 122 | "Item",
|
123 123 | ),
|
124 124 | ::aws_smithy_schema::ShapeType::Double,
|
125 - | "confidence",
|
125 + | "Confidence",
|
126 126 | 6,
|
127 127 | );
|
128 128 | static ITEM_MEMBER_STABLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
129 129 | ::aws_smithy_schema::ShapeId::from_static(
|
130 130 | "com.amazonaws.transcribestreaming#Item$Stable",
|
131 131 | "com.amazonaws.transcribestreaming",
|
132 132 | "Item",
|
133 133 | ),
|
134 134 | ::aws_smithy_schema::ShapeType::Boolean,
|
135 - | "stable",
|
135 + | "Stable",
|
136 136 | 7,
|
137 137 | );
|
138 138 | static ITEM_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
139 139 | ITEM_SCHEMA_ID,
|
140 140 | ::aws_smithy_schema::ShapeType::Structure,
|
141 141 | &[
|
142 142 | &ITEM_MEMBER_START_TIME,
|
143 143 | &ITEM_MEMBER_END_TIME,
|
144 144 | &ITEM_MEMBER_TYPE,
|
145 145 | &ITEM_MEMBER_CONTENT,
|
146 146 | &ITEM_MEMBER_VOCABULARY_FILTER_MATCH,
|
147 147 | &ITEM_MEMBER_SPEAKER,
|
148 148 | &ITEM_MEMBER_CONFIDENCE,
|
149 149 | &ITEM_MEMBER_STABLE,
|
150 150 | ],
|
151 151 | );
|
152 152 | impl Item {
|
153 153 | /// The schema for this shape.
|
154 154 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ITEM_SCHEMA;
|
155 155 | }
|
156 156 | impl ::aws_smithy_schema::serde::SerializableStruct for Item {
|
157 157 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
158 158 | fn serialize_members(
|
159 159 | &self,
|
160 160 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
161 161 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
162 162 | {
|
163 163 | let val = &self.start_time;
|
164 164 | ser.write_double(&ITEM_MEMBER_START_TIME, *val)?;
|
165 165 | }
|
166 166 | {
|
167 167 | let val = &self.end_time;
|
168 168 | ser.write_double(&ITEM_MEMBER_END_TIME, *val)?;
|
169 169 | }
|
170 170 | if let Some(ref val) = self.r#type {
|
171 171 | ser.write_string(&ITEM_MEMBER_TYPE, val.as_str())?;
|
172 172 | }
|
173 173 | if let Some(ref val) = self.content {
|
174 174 | ser.write_string(&ITEM_MEMBER_CONTENT, val)?;
|
175 175 | }
|
176 176 | {
|
177 177 | let val = &self.vocabulary_filter_match;
|
178 178 | ser.write_boolean(&ITEM_MEMBER_VOCABULARY_FILTER_MATCH, *val)?;
|
179 179 | }
|
180 180 | if let Some(ref val) = self.speaker {
|
181 181 | ser.write_string(&ITEM_MEMBER_SPEAKER, val)?;
|
182 182 | }
|
183 183 | if let Some(ref val) = self.confidence {
|
184 184 | ser.write_double(&ITEM_MEMBER_CONFIDENCE, *val)?;
|
185 185 | }
|
186 186 | if let Some(ref val) = self.stable {
|
187 187 | ser.write_boolean(&ITEM_MEMBER_STABLE, *val)?;
|
188 188 | }
|
189 189 | Ok(())
|
190 190 | }
|
191 191 | }
|
192 192 | impl Item {
|
193 193 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
194 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
195 - | deserializer: &mut D,
|
194 + | pub fn deserialize(
|
195 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
196 196 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
197 197 | #[allow(unused_variables, unused_mut)]
|
198 198 | let mut builder = Self::builder();
|
199 199 | #[allow(
|
200 200 | unused_variables,
|
201 201 | unreachable_code,
|
202 202 | clippy::single_match,
|
203 203 | clippy::match_single_binding,
|
204 204 | clippy::diverging_sub_expression
|
205 205 | )]
|
206 - | deserializer.read_struct(&ITEM_SCHEMA, (), |_, member, deser| {
|
206 + | deserializer.read_struct(&ITEM_SCHEMA, &mut |member, deser| {
|
207 207 | match member.member_index() {
|
208 208 | Some(0) => {
|
209 209 | builder.start_time = Some(deser.read_double(member)?);
|
210 210 | }
|
211 211 | Some(1) => {
|
212 212 | builder.end_time = Some(deser.read_double(member)?);
|
213 213 | }
|
214 214 | Some(2) => {
|
215 215 | builder.r#type = Some(crate::types::ItemType::from(deser.read_string(member)?.as_str()));
|
216 216 | }
|
217 217 | Some(3) => {
|
218 218 | builder.content = Some(deser.read_string(member)?);
|
219 219 | }
|
220 220 | Some(4) => {
|
221 221 | builder.vocabulary_filter_match = Some(deser.read_boolean(member)?);
|
222 222 | }
|
223 223 | Some(5) => {
|
224 224 | builder.speaker = Some(deser.read_string(member)?);
|
225 225 | }
|
226 226 | Some(6) => {
|
227 227 | builder.confidence = Some(deser.read_double(member)?);
|
228 228 | }
|
229 229 | Some(7) => {
|
230 230 | builder.stable = Some(deser.read_boolean(member)?);
|
231 231 | }
|
232 232 | _ => {}
|
233 233 | }
|
234 234 | Ok(())
|
235 235 | })?;
|
236 236 | Ok(builder.build())
|
237 237 | }
|
238 238 | }
|
239 + | impl Item {
|
240 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
241 + | pub fn deserialize_with_response(
|
242 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
243 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
244 + | _status: u16,
|
245 + | _body: &[u8],
|
246 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
247 + | Self::deserialize(deserializer)
|
248 + | }
|
249 + | }
|
239 250 | impl Item {
|
240 251 | /// Creates a new builder-style object to manufacture [`Item`](crate::types::Item).
|
241 252 | pub fn builder() -> crate::types::builders::ItemBuilder {
|
242 253 | crate::types::builders::ItemBuilder::default()
|
243 254 | }
|
244 255 | }
|
245 256 |
|
246 257 | /// A builder for [`Item`](crate::types::Item).
|
247 258 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
248 259 | #[non_exhaustive]
|