aws_sdk_connect/types/
_chat_streaming_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The streaming configuration, such as the Amazon SNS streaming endpoint.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ChatStreamingConfiguration {
7    /// <p>The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used to publish real-time message streaming for chat conversations.</p>
8    pub streaming_endpoint_arn: ::std::string::String,
9}
10impl ChatStreamingConfiguration {
11    /// <p>The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used to publish real-time message streaming for chat conversations.</p>
12    pub fn streaming_endpoint_arn(&self) -> &str {
13        use std::ops::Deref;
14        self.streaming_endpoint_arn.deref()
15    }
16}
17impl ChatStreamingConfiguration {
18    /// Creates a new builder-style object to manufacture [`ChatStreamingConfiguration`](crate::types::ChatStreamingConfiguration).
19    pub fn builder() -> crate::types::builders::ChatStreamingConfigurationBuilder {
20        crate::types::builders::ChatStreamingConfigurationBuilder::default()
21    }
22}
23
24/// A builder for [`ChatStreamingConfiguration`](crate::types::ChatStreamingConfiguration).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct ChatStreamingConfigurationBuilder {
28    pub(crate) streaming_endpoint_arn: ::std::option::Option<::std::string::String>,
29}
30impl ChatStreamingConfigurationBuilder {
31    /// <p>The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used to publish real-time message streaming for chat conversations.</p>
32    /// This field is required.
33    pub fn streaming_endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
34        self.streaming_endpoint_arn = ::std::option::Option::Some(input.into());
35        self
36    }
37    /// <p>The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used to publish real-time message streaming for chat conversations.</p>
38    pub fn set_streaming_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
39        self.streaming_endpoint_arn = input;
40        self
41    }
42    /// <p>The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used to publish real-time message streaming for chat conversations.</p>
43    pub fn get_streaming_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
44        &self.streaming_endpoint_arn
45    }
46    /// Consumes the builder and constructs a [`ChatStreamingConfiguration`](crate::types::ChatStreamingConfiguration).
47    /// This method will fail if any of the following fields are not set:
48    /// - [`streaming_endpoint_arn`](crate::types::builders::ChatStreamingConfigurationBuilder::streaming_endpoint_arn)
49    pub fn build(self) -> ::std::result::Result<crate::types::ChatStreamingConfiguration, ::aws_smithy_types::error::operation::BuildError> {
50        ::std::result::Result::Ok(crate::types::ChatStreamingConfiguration {
51            streaming_endpoint_arn: self.streaming_endpoint_arn.ok_or_else(|| {
52                ::aws_smithy_types::error::operation::BuildError::missing_field(
53                    "streaming_endpoint_arn",
54                    "streaming_endpoint_arn was not specified but it is required when building ChatStreamingConfiguration",
55                )
56            })?,
57        })
58    }
59}