1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
pub struct RecognizeUtteranceInput {
/// <p>The identifier of the bot that should receive the request.</p>
pub bot_id: ::std::option::Option<::std::string::String>,
/// <p>The alias identifier in use for the bot that should receive the request.</p>
pub bot_alias_id: ::std::option::Option<::std::string::String>,
/// <p>The locale where the session is in use.</p>
pub locale_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the session in use.</p>
pub session_id: ::std::option::Option<::std::string::String>,
/// <p>Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.</p>
/// <p>The <code>sessionState</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub session_state: ::std::option::Option<::std::string::String>,
/// <p>Request-specific information passed between the client application and Amazon Lex V2 </p>
/// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes for prefix <code>x-amz-lex:</code>.</p>
/// <p>The <code>requestAttributes</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub request_attributes: ::std::option::Option<::std::string::String>,
/// <p>Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:</p>
/// <ul>
/// <li> <p>PCM format, audio data must be in little-endian byte order.</p>
/// <ul>
/// <li> <p>audio/l16; rate=16000; channels=1</p> </li>
/// <li> <p>audio/x-l16; sample-rate=16000; channel-count=1</p> </li>
/// <li> <p>audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false</p> </li>
/// </ul> </li>
/// <li> <p>Opus format</p>
/// <ul>
/// <li> <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p> </li>
/// </ul> </li>
/// <li> <p>Text format</p>
/// <ul>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub request_content_type: ::std::option::Option<::std::string::String>,
/// <p>The message that Amazon Lex V2 returns in the response can be either text or speech based on the <code>responseContentType</code> value.</p>
/// <ul>
/// <li> <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li>
/// <li> <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in the <code>responseContentType</code> parameter. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns speech in the MPEG format.</p> </li>
/// <li> <p>If the value is <code>audio/pcm</code>, the speech returned is <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian format.</p> </li>
/// <li> <p>The following are the accepted values:</p>
/// <ul>
/// <li> <p>audio/mpeg</p> </li>
/// <li> <p>audio/ogg</p> </li>
/// <li> <p>audio/pcm (16 KHz)</p> </li>
/// <li> <p>audio/* (defaults to mpeg)</p> </li>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub response_content_type: ::std::option::Option<::std::string::String>,
/// <p>User input in PCM or Opus audio format or text format as described in the <code>requestContentType</code> parameter.</p>
pub input_stream: ::aws_smithy_types::byte_stream::ByteStream,
}
impl RecognizeUtteranceInput {
/// <p>The identifier of the bot that should receive the request.</p>
pub fn bot_id(&self) -> ::std::option::Option<&str> {
self.bot_id.as_deref()
}
/// <p>The alias identifier in use for the bot that should receive the request.</p>
pub fn bot_alias_id(&self) -> ::std::option::Option<&str> {
self.bot_alias_id.as_deref()
}
/// <p>The locale where the session is in use.</p>
pub fn locale_id(&self) -> ::std::option::Option<&str> {
self.locale_id.as_deref()
}
/// <p>The identifier of the session in use.</p>
pub fn session_id(&self) -> ::std::option::Option<&str> {
self.session_id.as_deref()
}
/// <p>Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.</p>
/// <p>The <code>sessionState</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn session_state(&self) -> ::std::option::Option<&str> {
self.session_state.as_deref()
}
/// <p>Request-specific information passed between the client application and Amazon Lex V2 </p>
/// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes for prefix <code>x-amz-lex:</code>.</p>
/// <p>The <code>requestAttributes</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn request_attributes(&self) -> ::std::option::Option<&str> {
self.request_attributes.as_deref()
}
/// <p>Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:</p>
/// <ul>
/// <li> <p>PCM format, audio data must be in little-endian byte order.</p>
/// <ul>
/// <li> <p>audio/l16; rate=16000; channels=1</p> </li>
/// <li> <p>audio/x-l16; sample-rate=16000; channel-count=1</p> </li>
/// <li> <p>audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false</p> </li>
/// </ul> </li>
/// <li> <p>Opus format</p>
/// <ul>
/// <li> <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p> </li>
/// </ul> </li>
/// <li> <p>Text format</p>
/// <ul>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn request_content_type(&self) -> ::std::option::Option<&str> {
self.request_content_type.as_deref()
}
/// <p>The message that Amazon Lex V2 returns in the response can be either text or speech based on the <code>responseContentType</code> value.</p>
/// <ul>
/// <li> <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li>
/// <li> <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in the <code>responseContentType</code> parameter. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns speech in the MPEG format.</p> </li>
/// <li> <p>If the value is <code>audio/pcm</code>, the speech returned is <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian format.</p> </li>
/// <li> <p>The following are the accepted values:</p>
/// <ul>
/// <li> <p>audio/mpeg</p> </li>
/// <li> <p>audio/ogg</p> </li>
/// <li> <p>audio/pcm (16 KHz)</p> </li>
/// <li> <p>audio/* (defaults to mpeg)</p> </li>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn response_content_type(&self) -> ::std::option::Option<&str> {
self.response_content_type.as_deref()
}
/// <p>User input in PCM or Opus audio format or text format as described in the <code>requestContentType</code> parameter.</p>
pub fn input_stream(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
&self.input_stream
}
}
impl ::std::fmt::Debug for RecognizeUtteranceInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("RecognizeUtteranceInput");
formatter.field("bot_id", &self.bot_id);
formatter.field("bot_alias_id", &self.bot_alias_id);
formatter.field("locale_id", &self.locale_id);
formatter.field("session_id", &self.session_id);
formatter.field("session_state", &"*** Sensitive Data Redacted ***");
formatter.field("request_attributes", &"*** Sensitive Data Redacted ***");
formatter.field("request_content_type", &self.request_content_type);
formatter.field("response_content_type", &self.response_content_type);
formatter.field("input_stream", &self.input_stream);
formatter.finish()
}
}
impl RecognizeUtteranceInput {
/// Creates a new builder-style object to manufacture [`RecognizeUtteranceInput`](crate::operation::recognize_utterance::RecognizeUtteranceInput).
pub fn builder() -> crate::operation::recognize_utterance::builders::RecognizeUtteranceInputBuilder {
crate::operation::recognize_utterance::builders::RecognizeUtteranceInputBuilder::default()
}
}
/// A builder for [`RecognizeUtteranceInput`](crate::operation::recognize_utterance::RecognizeUtteranceInput).
#[non_exhaustive]
#[derive(::std::default::Default)]
pub struct RecognizeUtteranceInputBuilder {
pub(crate) bot_id: ::std::option::Option<::std::string::String>,
pub(crate) bot_alias_id: ::std::option::Option<::std::string::String>,
pub(crate) locale_id: ::std::option::Option<::std::string::String>,
pub(crate) session_id: ::std::option::Option<::std::string::String>,
pub(crate) session_state: ::std::option::Option<::std::string::String>,
pub(crate) request_attributes: ::std::option::Option<::std::string::String>,
pub(crate) request_content_type: ::std::option::Option<::std::string::String>,
pub(crate) response_content_type: ::std::option::Option<::std::string::String>,
pub(crate) input_stream: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
}
impl RecognizeUtteranceInputBuilder {
/// <p>The identifier of the bot that should receive the request.</p>
/// This field is required.
pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bot_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the bot that should receive the request.</p>
pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bot_id = input;
self
}
/// <p>The identifier of the bot that should receive the request.</p>
pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.bot_id
}
/// <p>The alias identifier in use for the bot that should receive the request.</p>
/// This field is required.
pub fn bot_alias_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bot_alias_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The alias identifier in use for the bot that should receive the request.</p>
pub fn set_bot_alias_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bot_alias_id = input;
self
}
/// <p>The alias identifier in use for the bot that should receive the request.</p>
pub fn get_bot_alias_id(&self) -> &::std::option::Option<::std::string::String> {
&self.bot_alias_id
}
/// <p>The locale where the session is in use.</p>
/// This field is required.
pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.locale_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The locale where the session is in use.</p>
pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.locale_id = input;
self
}
/// <p>The locale where the session is in use.</p>
pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
&self.locale_id
}
/// <p>The identifier of the session in use.</p>
/// This field is required.
pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the session in use.</p>
pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.session_id = input;
self
}
/// <p>The identifier of the session in use.</p>
pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
&self.session_id
}
/// <p>Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.</p>
/// <p>The <code>sessionState</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn session_state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.session_state = ::std::option::Option::Some(input.into());
self
}
/// <p>Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.</p>
/// <p>The <code>sessionState</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn set_session_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.session_state = input;
self
}
/// <p>Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.</p>
/// <p>The <code>sessionState</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn get_session_state(&self) -> &::std::option::Option<::std::string::String> {
&self.session_state
}
/// <p>Request-specific information passed between the client application and Amazon Lex V2 </p>
/// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes for prefix <code>x-amz-lex:</code>.</p>
/// <p>The <code>requestAttributes</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn request_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_attributes = ::std::option::Option::Some(input.into());
self
}
/// <p>Request-specific information passed between the client application and Amazon Lex V2 </p>
/// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes for prefix <code>x-amz-lex:</code>.</p>
/// <p>The <code>requestAttributes</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn set_request_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_attributes = input;
self
}
/// <p>Request-specific information passed between the client application and Amazon Lex V2 </p>
/// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes for prefix <code>x-amz-lex:</code>.</p>
/// <p>The <code>requestAttributes</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>
pub fn get_request_attributes(&self) -> &::std::option::Option<::std::string::String> {
&self.request_attributes
}
/// <p>Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:</p>
/// <ul>
/// <li> <p>PCM format, audio data must be in little-endian byte order.</p>
/// <ul>
/// <li> <p>audio/l16; rate=16000; channels=1</p> </li>
/// <li> <p>audio/x-l16; sample-rate=16000; channel-count=1</p> </li>
/// <li> <p>audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false</p> </li>
/// </ul> </li>
/// <li> <p>Opus format</p>
/// <ul>
/// <li> <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p> </li>
/// </ul> </li>
/// <li> <p>Text format</p>
/// <ul>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
/// This field is required.
pub fn request_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_content_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:</p>
/// <ul>
/// <li> <p>PCM format, audio data must be in little-endian byte order.</p>
/// <ul>
/// <li> <p>audio/l16; rate=16000; channels=1</p> </li>
/// <li> <p>audio/x-l16; sample-rate=16000; channel-count=1</p> </li>
/// <li> <p>audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false</p> </li>
/// </ul> </li>
/// <li> <p>Opus format</p>
/// <ul>
/// <li> <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p> </li>
/// </ul> </li>
/// <li> <p>Text format</p>
/// <ul>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn set_request_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_content_type = input;
self
}
/// <p>Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:</p>
/// <ul>
/// <li> <p>PCM format, audio data must be in little-endian byte order.</p>
/// <ul>
/// <li> <p>audio/l16; rate=16000; channels=1</p> </li>
/// <li> <p>audio/x-l16; sample-rate=16000; channel-count=1</p> </li>
/// <li> <p>audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false</p> </li>
/// </ul> </li>
/// <li> <p>Opus format</p>
/// <ul>
/// <li> <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p> </li>
/// </ul> </li>
/// <li> <p>Text format</p>
/// <ul>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn get_request_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.request_content_type
}
/// <p>The message that Amazon Lex V2 returns in the response can be either text or speech based on the <code>responseContentType</code> value.</p>
/// <ul>
/// <li> <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li>
/// <li> <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in the <code>responseContentType</code> parameter. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns speech in the MPEG format.</p> </li>
/// <li> <p>If the value is <code>audio/pcm</code>, the speech returned is <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian format.</p> </li>
/// <li> <p>The following are the accepted values:</p>
/// <ul>
/// <li> <p>audio/mpeg</p> </li>
/// <li> <p>audio/ogg</p> </li>
/// <li> <p>audio/pcm (16 KHz)</p> </li>
/// <li> <p>audio/* (defaults to mpeg)</p> </li>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.response_content_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The message that Amazon Lex V2 returns in the response can be either text or speech based on the <code>responseContentType</code> value.</p>
/// <ul>
/// <li> <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li>
/// <li> <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in the <code>responseContentType</code> parameter. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns speech in the MPEG format.</p> </li>
/// <li> <p>If the value is <code>audio/pcm</code>, the speech returned is <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian format.</p> </li>
/// <li> <p>The following are the accepted values:</p>
/// <ul>
/// <li> <p>audio/mpeg</p> </li>
/// <li> <p>audio/ogg</p> </li>
/// <li> <p>audio/pcm (16 KHz)</p> </li>
/// <li> <p>audio/* (defaults to mpeg)</p> </li>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.response_content_type = input;
self
}
/// <p>The message that Amazon Lex V2 returns in the response can be either text or speech based on the <code>responseContentType</code> value.</p>
/// <ul>
/// <li> <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li>
/// <li> <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in the <code>responseContentType</code> parameter. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns speech in the MPEG format.</p> </li>
/// <li> <p>If the value is <code>audio/pcm</code>, the speech returned is <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian format.</p> </li>
/// <li> <p>The following are the accepted values:</p>
/// <ul>
/// <li> <p>audio/mpeg</p> </li>
/// <li> <p>audio/ogg</p> </li>
/// <li> <p>audio/pcm (16 KHz)</p> </li>
/// <li> <p>audio/* (defaults to mpeg)</p> </li>
/// <li> <p>text/plain; charset=utf-8</p> </li>
/// </ul> </li>
/// </ul>
pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.response_content_type
}
/// <p>User input in PCM or Opus audio format or text format as described in the <code>requestContentType</code> parameter.</p>
pub fn input_stream(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
self.input_stream = ::std::option::Option::Some(input);
self
}
/// <p>User input in PCM or Opus audio format or text format as described in the <code>requestContentType</code> parameter.</p>
pub fn set_input_stream(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
self.input_stream = input;
self
}
/// <p>User input in PCM or Opus audio format or text format as described in the <code>requestContentType</code> parameter.</p>
pub fn get_input_stream(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
&self.input_stream
}
/// Consumes the builder and constructs a [`RecognizeUtteranceInput`](crate::operation::recognize_utterance::RecognizeUtteranceInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::recognize_utterance::RecognizeUtteranceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::recognize_utterance::RecognizeUtteranceInput {
bot_id: self.bot_id,
bot_alias_id: self.bot_alias_id,
locale_id: self.locale_id,
session_id: self.session_id,
session_state: self.session_state,
request_attributes: self.request_attributes,
request_content_type: self.request_content_type,
response_content_type: self.response_content_type,
input_stream: self.input_stream.unwrap_or_default(),
})
}
}
impl ::std::fmt::Debug for RecognizeUtteranceInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("RecognizeUtteranceInputBuilder");
formatter.field("bot_id", &self.bot_id);
formatter.field("bot_alias_id", &self.bot_alias_id);
formatter.field("locale_id", &self.locale_id);
formatter.field("session_id", &self.session_id);
formatter.field("session_state", &"*** Sensitive Data Redacted ***");
formatter.field("request_attributes", &"*** Sensitive Data Redacted ***");
formatter.field("request_content_type", &self.request_content_type);
formatter.field("response_content_type", &self.response_content_type);
formatter.field("input_stream", &self.input_stream);
formatter.finish()
}
}