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 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
pub struct PostContentInput {
    /// <p>Name of the Amazon Lex bot.</p>
    pub bot_name: ::std::option::Option<::std::string::String>,
    /// <p>Alias of the Amazon Lex bot.</p>
    pub bot_alias: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the <code>userID</code> field.</p>
    /// <p>To decide the user ID to use for your application, consider the following factors.</p>
    /// <ul>
    /// <li>
    /// <p>The <code>userID</code> field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information.</p></li>
    /// <li>
    /// <p>If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier.</p></li>
    /// <li>
    /// <p>If you want the same user to be able to have two independent conversations on two different devices, choose a device-specific identifier.</p></li>
    /// <li>
    /// <p>A user can't have two independent conversations with two different versions of the same bot. For example, a user can't have a conversation with the PROD and BETA versions of the same bot. If you anticipate that a user will need to have conversation with two different versions, for example, while testing, include the bot alias in the user ID to separate the two conversations.</p></li>
    /// </ul>
    pub user_id: ::std::option::Option<::std::string::String>,
    /// <p>You pass this value as the <code>x-amz-lex-session-attributes</code> HTTP header.</p>
    /// <p>Application-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>sessionAttributes</code> and <code>requestAttributes</code> headers is limited to 12 KB.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs">Setting Session Attributes</a>.</p>
    pub session_attributes: ::std::option::Option<::std::string::String>,
    /// <p>You pass this value as the <code>x-amz-lex-request-attributes</code> HTTP header.</p>
    /// <p>Request-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>requestAttributes</code> and <code>sessionAttributes</code> headers is limited to 12 KB.</p>
    /// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes with the prefix <code>x-amz-lex:</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs">Setting Request Attributes</a>.</p>
    pub request_attributes: ::std::option::Option<::std::string::String>,
    /// <p>You pass this value as the <code>Content-Type</code> HTTP header.</p>
    /// <p>Indicates the audio format or text. The header value 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 content_type: ::std::option::Option<::std::string::String>,
    /// <p>You pass this value as the <code>Accept</code> HTTP header.</p>
    /// <p>The message Amazon Lex returns in the response can be either text or speech based on the <code>Accept</code> HTTP header value in the request.</p>
    /// <ul>
    /// <li>
    /// <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex returns text in the response.</p></li>
    /// <li>
    /// <p>If the value begins with <code>audio/</code>, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech (using the configuration you specified in the <code>Accept</code> header). For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex 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> 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</p></li>
    /// <li>
    /// <p>text/plain; charset=utf-8</p></li>
    /// <li>
    /// <p>audio/* (defaults to mpeg)</p></li>
    /// </ul></li>
    /// </ul>
    pub accept: ::std::option::Option<::std::string::String>,
    /// <p>User input in PCM or Opus audio format or text format as described in the <code>Content-Type</code> HTTP header.</p>
    /// <p>You can stream audio data to Amazon Lex or you can create a local buffer that captures all of the audio data before sending. In general, you get better performance if you stream audio data rather than buffering the data locally.</p>
    pub input_stream: ::aws_smithy_types::byte_stream::ByteStream,
    /// <p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,</p>
    /// <p>If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.</p>
    pub active_contexts: ::std::option::Option<::std::string::String>,
}
impl PostContentInput {
    /// <p>Name of the Amazon Lex bot.</p>
    pub fn bot_name(&self) -> ::std::option::Option<&str> {
        self.bot_name.as_deref()
    }
    /// <p>Alias of the Amazon Lex bot.</p>
    pub fn bot_alias(&self) -> ::std::option::Option<&str> {
        self.bot_alias.as_deref()
    }
    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the <code>userID</code> field.</p>
    /// <p>To decide the user ID to use for your application, consider the following factors.</p>
    /// <ul>
    /// <li>
    /// <p>The <code>userID</code> field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information.</p></li>
    /// <li>
    /// <p>If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier.</p></li>
    /// <li>
    /// <p>If you want the same user to be able to have two independent conversations on two different devices, choose a device-specific identifier.</p></li>
    /// <li>
    /// <p>A user can't have two independent conversations with two different versions of the same bot. For example, a user can't have a conversation with the PROD and BETA versions of the same bot. If you anticipate that a user will need to have conversation with two different versions, for example, while testing, include the bot alias in the user ID to separate the two conversations.</p></li>
    /// </ul>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>You pass this value as the <code>x-amz-lex-session-attributes</code> HTTP header.</p>
    /// <p>Application-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>sessionAttributes</code> and <code>requestAttributes</code> headers is limited to 12 KB.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs">Setting Session Attributes</a>.</p>
    pub fn session_attributes(&self) -> ::std::option::Option<&str> {
        self.session_attributes.as_deref()
    }
    /// <p>You pass this value as the <code>x-amz-lex-request-attributes</code> HTTP header.</p>
    /// <p>Request-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>requestAttributes</code> and <code>sessionAttributes</code> headers is limited to 12 KB.</p>
    /// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes with the prefix <code>x-amz-lex:</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs">Setting Request Attributes</a>.</p>
    pub fn request_attributes(&self) -> ::std::option::Option<&str> {
        self.request_attributes.as_deref()
    }
    /// <p>You pass this value as the <code>Content-Type</code> HTTP header.</p>
    /// <p>Indicates the audio format or text. The header value 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 content_type(&self) -> ::std::option::Option<&str> {
        self.content_type.as_deref()
    }
    /// <p>You pass this value as the <code>Accept</code> HTTP header.</p>
    /// <p>The message Amazon Lex returns in the response can be either text or speech based on the <code>Accept</code> HTTP header value in the request.</p>
    /// <ul>
    /// <li>
    /// <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex returns text in the response.</p></li>
    /// <li>
    /// <p>If the value begins with <code>audio/</code>, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech (using the configuration you specified in the <code>Accept</code> header). For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex 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> 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</p></li>
    /// <li>
    /// <p>text/plain; charset=utf-8</p></li>
    /// <li>
    /// <p>audio/* (defaults to mpeg)</p></li>
    /// </ul></li>
    /// </ul>
    pub fn accept(&self) -> ::std::option::Option<&str> {
        self.accept.as_deref()
    }
    /// <p>User input in PCM or Opus audio format or text format as described in the <code>Content-Type</code> HTTP header.</p>
    /// <p>You can stream audio data to Amazon Lex or you can create a local buffer that captures all of the audio data before sending. In general, you get better performance if you stream audio data rather than buffering the data locally.</p>
    pub fn input_stream(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
        &self.input_stream
    }
    /// <p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,</p>
    /// <p>If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.</p>
    pub fn active_contexts(&self) -> ::std::option::Option<&str> {
        self.active_contexts.as_deref()
    }
}
impl ::std::fmt::Debug for PostContentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PostContentInput");
        formatter.field("bot_name", &self.bot_name);
        formatter.field("bot_alias", &self.bot_alias);
        formatter.field("user_id", &self.user_id);
        formatter.field("session_attributes", &"*** Sensitive Data Redacted ***");
        formatter.field("request_attributes", &"*** Sensitive Data Redacted ***");
        formatter.field("content_type", &self.content_type);
        formatter.field("accept", &self.accept);
        formatter.field("input_stream", &self.input_stream);
        formatter.field("active_contexts", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl PostContentInput {
    /// Creates a new builder-style object to manufacture [`PostContentInput`](crate::operation::post_content::PostContentInput).
    pub fn builder() -> crate::operation::post_content::builders::PostContentInputBuilder {
        crate::operation::post_content::builders::PostContentInputBuilder::default()
    }
}
/// A builder for [`PostContentInput`](crate::operation::post_content::PostContentInput).
#[non_exhaustive]
#[derive(::std::default::Default)]
pub struct PostContentInputBuilder {
    pub(crate) bot_name: ::std::option::Option<::std::string::String>,
    pub(crate) bot_alias: ::std::option::Option<::std::string::String>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
    pub(crate) session_attributes: ::std::option::Option<::std::string::String>,
    pub(crate) request_attributes: ::std::option::Option<::std::string::String>,
    pub(crate) content_type: ::std::option::Option<::std::string::String>,
    pub(crate) accept: ::std::option::Option<::std::string::String>,
    pub(crate) input_stream: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
    pub(crate) active_contexts: ::std::option::Option<::std::string::String>,
}
impl PostContentInputBuilder {
    /// <p>Name of the Amazon Lex bot.</p>
    /// This field is required.
    pub fn bot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bot_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Name of the Amazon Lex bot.</p>
    pub fn set_bot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bot_name = input;
        self
    }
    /// <p>Name of the Amazon Lex bot.</p>
    pub fn get_bot_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.bot_name
    }
    /// <p>Alias of the Amazon Lex bot.</p>
    /// This field is required.
    pub fn bot_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bot_alias = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Alias of the Amazon Lex bot.</p>
    pub fn set_bot_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bot_alias = input;
        self
    }
    /// <p>Alias of the Amazon Lex bot.</p>
    pub fn get_bot_alias(&self) -> &::std::option::Option<::std::string::String> {
        &self.bot_alias
    }
    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the <code>userID</code> field.</p>
    /// <p>To decide the user ID to use for your application, consider the following factors.</p>
    /// <ul>
    /// <li>
    /// <p>The <code>userID</code> field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information.</p></li>
    /// <li>
    /// <p>If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier.</p></li>
    /// <li>
    /// <p>If you want the same user to be able to have two independent conversations on two different devices, choose a device-specific identifier.</p></li>
    /// <li>
    /// <p>A user can't have two independent conversations with two different versions of the same bot. For example, a user can't have a conversation with the PROD and BETA versions of the same bot. If you anticipate that a user will need to have conversation with two different versions, for example, while testing, include the bot alias in the user ID to separate the two conversations.</p></li>
    /// </ul>
    /// This field is required.
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the <code>userID</code> field.</p>
    /// <p>To decide the user ID to use for your application, consider the following factors.</p>
    /// <ul>
    /// <li>
    /// <p>The <code>userID</code> field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information.</p></li>
    /// <li>
    /// <p>If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier.</p></li>
    /// <li>
    /// <p>If you want the same user to be able to have two independent conversations on two different devices, choose a device-specific identifier.</p></li>
    /// <li>
    /// <p>A user can't have two independent conversations with two different versions of the same bot. For example, a user can't have a conversation with the PROD and BETA versions of the same bot. If you anticipate that a user will need to have conversation with two different versions, for example, while testing, include the bot alias in the user ID to separate the two conversations.</p></li>
    /// </ul>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the <code>userID</code> field.</p>
    /// <p>To decide the user ID to use for your application, consider the following factors.</p>
    /// <ul>
    /// <li>
    /// <p>The <code>userID</code> field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information.</p></li>
    /// <li>
    /// <p>If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier.</p></li>
    /// <li>
    /// <p>If you want the same user to be able to have two independent conversations on two different devices, choose a device-specific identifier.</p></li>
    /// <li>
    /// <p>A user can't have two independent conversations with two different versions of the same bot. For example, a user can't have a conversation with the PROD and BETA versions of the same bot. If you anticipate that a user will need to have conversation with two different versions, for example, while testing, include the bot alias in the user ID to separate the two conversations.</p></li>
    /// </ul>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// <p>You pass this value as the <code>x-amz-lex-session-attributes</code> HTTP header.</p>
    /// <p>Application-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>sessionAttributes</code> and <code>requestAttributes</code> headers is limited to 12 KB.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs">Setting Session Attributes</a>.</p>
    pub fn session_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_attributes = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>You pass this value as the <code>x-amz-lex-session-attributes</code> HTTP header.</p>
    /// <p>Application-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>sessionAttributes</code> and <code>requestAttributes</code> headers is limited to 12 KB.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs">Setting Session Attributes</a>.</p>
    pub fn set_session_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_attributes = input;
        self
    }
    /// <p>You pass this value as the <code>x-amz-lex-session-attributes</code> HTTP header.</p>
    /// <p>Application-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>sessionAttributes</code> and <code>requestAttributes</code> headers is limited to 12 KB.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs">Setting Session Attributes</a>.</p>
    pub fn get_session_attributes(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_attributes
    }
    /// <p>You pass this value as the <code>x-amz-lex-request-attributes</code> HTTP header.</p>
    /// <p>Request-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>requestAttributes</code> and <code>sessionAttributes</code> headers is limited to 12 KB.</p>
    /// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes with the prefix <code>x-amz-lex:</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs">Setting Request Attributes</a>.</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>You pass this value as the <code>x-amz-lex-request-attributes</code> HTTP header.</p>
    /// <p>Request-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>requestAttributes</code> and <code>sessionAttributes</code> headers is limited to 12 KB.</p>
    /// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes with the prefix <code>x-amz-lex:</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs">Setting Request Attributes</a>.</p>
    pub fn set_request_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_attributes = input;
        self
    }
    /// <p>You pass this value as the <code>x-amz-lex-request-attributes</code> HTTP header.</p>
    /// <p>Request-specific information passed between Amazon Lex and a client application. The value must be a JSON serialized and base64 encoded map with string keys and values. The total size of the <code>requestAttributes</code> and <code>sessionAttributes</code> headers is limited to 12 KB.</p>
    /// <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes with the prefix <code>x-amz-lex:</code>.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs">Setting Request Attributes</a>.</p>
    pub fn get_request_attributes(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_attributes
    }
    /// <p>You pass this value as the <code>Content-Type</code> HTTP header.</p>
    /// <p>Indicates the audio format or text. The header value 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 content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>You pass this value as the <code>Content-Type</code> HTTP header.</p>
    /// <p>Indicates the audio format or text. The header value 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_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content_type = input;
        self
    }
    /// <p>You pass this value as the <code>Content-Type</code> HTTP header.</p>
    /// <p>Indicates the audio format or text. The header value 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_content_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.content_type
    }
    /// <p>You pass this value as the <code>Accept</code> HTTP header.</p>
    /// <p>The message Amazon Lex returns in the response can be either text or speech based on the <code>Accept</code> HTTP header value in the request.</p>
    /// <ul>
    /// <li>
    /// <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex returns text in the response.</p></li>
    /// <li>
    /// <p>If the value begins with <code>audio/</code>, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech (using the configuration you specified in the <code>Accept</code> header). For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex 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> 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</p></li>
    /// <li>
    /// <p>text/plain; charset=utf-8</p></li>
    /// <li>
    /// <p>audio/* (defaults to mpeg)</p></li>
    /// </ul></li>
    /// </ul>
    pub fn accept(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.accept = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>You pass this value as the <code>Accept</code> HTTP header.</p>
    /// <p>The message Amazon Lex returns in the response can be either text or speech based on the <code>Accept</code> HTTP header value in the request.</p>
    /// <ul>
    /// <li>
    /// <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex returns text in the response.</p></li>
    /// <li>
    /// <p>If the value begins with <code>audio/</code>, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech (using the configuration you specified in the <code>Accept</code> header). For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex 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> 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</p></li>
    /// <li>
    /// <p>text/plain; charset=utf-8</p></li>
    /// <li>
    /// <p>audio/* (defaults to mpeg)</p></li>
    /// </ul></li>
    /// </ul>
    pub fn set_accept(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.accept = input;
        self
    }
    /// <p>You pass this value as the <code>Accept</code> HTTP header.</p>
    /// <p>The message Amazon Lex returns in the response can be either text or speech based on the <code>Accept</code> HTTP header value in the request.</p>
    /// <ul>
    /// <li>
    /// <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex returns text in the response.</p></li>
    /// <li>
    /// <p>If the value begins with <code>audio/</code>, Amazon Lex returns speech in the response. Amazon Lex uses Amazon Polly to generate the speech (using the configuration you specified in the <code>Accept</code> header). For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex 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> 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</p></li>
    /// <li>
    /// <p>text/plain; charset=utf-8</p></li>
    /// <li>
    /// <p>audio/* (defaults to mpeg)</p></li>
    /// </ul></li>
    /// </ul>
    pub fn get_accept(&self) -> &::std::option::Option<::std::string::String> {
        &self.accept
    }
    /// <p>User input in PCM or Opus audio format or text format as described in the <code>Content-Type</code> HTTP header.</p>
    /// <p>You can stream audio data to Amazon Lex or you can create a local buffer that captures all of the audio data before sending. In general, you get better performance if you stream audio data rather than buffering the data locally.</p>
    /// This field is required.
    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>Content-Type</code> HTTP header.</p>
    /// <p>You can stream audio data to Amazon Lex or you can create a local buffer that captures all of the audio data before sending. In general, you get better performance if you stream audio data rather than buffering the data locally.</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>Content-Type</code> HTTP header.</p>
    /// <p>You can stream audio data to Amazon Lex or you can create a local buffer that captures all of the audio data before sending. In general, you get better performance if you stream audio data rather than buffering the data locally.</p>
    pub fn get_input_stream(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
        &self.input_stream
    }
    /// <p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,</p>
    /// <p>If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.</p>
    pub fn active_contexts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.active_contexts = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,</p>
    /// <p>If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.</p>
    pub fn set_active_contexts(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.active_contexts = input;
        self
    }
    /// <p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request,</p>
    /// <p>If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.</p>
    pub fn get_active_contexts(&self) -> &::std::option::Option<::std::string::String> {
        &self.active_contexts
    }
    /// Consumes the builder and constructs a [`PostContentInput`](crate::operation::post_content::PostContentInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::post_content::PostContentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::post_content::PostContentInput {
            bot_name: self.bot_name,
            bot_alias: self.bot_alias,
            user_id: self.user_id,
            session_attributes: self.session_attributes,
            request_attributes: self.request_attributes,
            content_type: self.content_type,
            accept: self.accept,
            input_stream: self.input_stream.unwrap_or_default(),
            active_contexts: self.active_contexts,
        })
    }
}
impl ::std::fmt::Debug for PostContentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PostContentInputBuilder");
        formatter.field("bot_name", &self.bot_name);
        formatter.field("bot_alias", &self.bot_alias);
        formatter.field("user_id", &self.user_id);
        formatter.field("session_attributes", &"*** Sensitive Data Redacted ***");
        formatter.field("request_attributes", &"*** Sensitive Data Redacted ***");
        formatter.field("content_type", &self.content_type);
        formatter.field("accept", &self.accept);
        formatter.field("input_stream", &self.input_stream);
        formatter.field("active_contexts", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}