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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateParticipantConnectionInput {
/// <p>Type of connection information required. If you need <code>CONNECTION_CREDENTIALS</code> along with marking participant as connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.</p>
pub r#type: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionType>>,
/// <p>This is a header parameter.</p>
/// <p>The ParticipantToken as obtained from <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html">StartChatContact</a> API response.</p>
pub participant_token: ::std::option::Option<::std::string::String>,
/// <p>Amazon Connect Participant is used to mark the participant as connected for customer participant in message streaming, as well as for agent or manager participant in non-streaming chats.</p>
pub connect_participant: ::std::option::Option<bool>,
}
impl CreateParticipantConnectionInput {
/// <p>Type of connection information required. If you need <code>CONNECTION_CREDENTIALS</code> along with marking participant as connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.r#type.is_none()`.
pub fn r#type(&self) -> &[crate::types::ConnectionType] {
self.r#type.as_deref().unwrap_or_default()
}
/// <p>This is a header parameter.</p>
/// <p>The ParticipantToken as obtained from <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html">StartChatContact</a> API response.</p>
pub fn participant_token(&self) -> ::std::option::Option<&str> {
self.participant_token.as_deref()
}
/// <p>Amazon Connect Participant is used to mark the participant as connected for customer participant in message streaming, as well as for agent or manager participant in non-streaming chats.</p>
pub fn connect_participant(&self) -> ::std::option::Option<bool> {
self.connect_participant
}
}
impl CreateParticipantConnectionInput {
/// Creates a new builder-style object to manufacture [`CreateParticipantConnectionInput`](crate::operation::create_participant_connection::CreateParticipantConnectionInput).
pub fn builder() -> crate::operation::create_participant_connection::builders::CreateParticipantConnectionInputBuilder {
crate::operation::create_participant_connection::builders::CreateParticipantConnectionInputBuilder::default()
}
}
/// A builder for [`CreateParticipantConnectionInput`](crate::operation::create_participant_connection::CreateParticipantConnectionInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateParticipantConnectionInputBuilder {
pub(crate) r#type: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionType>>,
pub(crate) participant_token: ::std::option::Option<::std::string::String>,
pub(crate) connect_participant: ::std::option::Option<bool>,
}
impl CreateParticipantConnectionInputBuilder {
/// Appends an item to `r#type`.
///
/// To override the contents of this collection use [`set_type`](Self::set_type).
///
/// <p>Type of connection information required. If you need <code>CONNECTION_CREDENTIALS</code> along with marking participant as connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.</p>
pub fn r#type(mut self, input: crate::types::ConnectionType) -> Self {
let mut v = self.r#type.unwrap_or_default();
v.push(input);
self.r#type = ::std::option::Option::Some(v);
self
}
/// <p>Type of connection information required. If you need <code>CONNECTION_CREDENTIALS</code> along with marking participant as connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.</p>
pub fn set_type(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionType>>) -> Self {
self.r#type = input;
self
}
/// <p>Type of connection information required. If you need <code>CONNECTION_CREDENTIALS</code> along with marking participant as connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.</p>
pub fn get_type(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConnectionType>> {
&self.r#type
}
/// <p>This is a header parameter.</p>
/// <p>The ParticipantToken as obtained from <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html">StartChatContact</a> API response.</p>
/// This field is required.
pub fn participant_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.participant_token = ::std::option::Option::Some(input.into());
self
}
/// <p>This is a header parameter.</p>
/// <p>The ParticipantToken as obtained from <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html">StartChatContact</a> API response.</p>
pub fn set_participant_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.participant_token = input;
self
}
/// <p>This is a header parameter.</p>
/// <p>The ParticipantToken as obtained from <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html">StartChatContact</a> API response.</p>
pub fn get_participant_token(&self) -> &::std::option::Option<::std::string::String> {
&self.participant_token
}
/// <p>Amazon Connect Participant is used to mark the participant as connected for customer participant in message streaming, as well as for agent or manager participant in non-streaming chats.</p>
pub fn connect_participant(mut self, input: bool) -> Self {
self.connect_participant = ::std::option::Option::Some(input);
self
}
/// <p>Amazon Connect Participant is used to mark the participant as connected for customer participant in message streaming, as well as for agent or manager participant in non-streaming chats.</p>
pub fn set_connect_participant(mut self, input: ::std::option::Option<bool>) -> Self {
self.connect_participant = input;
self
}
/// <p>Amazon Connect Participant is used to mark the participant as connected for customer participant in message streaming, as well as for agent or manager participant in non-streaming chats.</p>
pub fn get_connect_participant(&self) -> &::std::option::Option<bool> {
&self.connect_participant
}
/// Consumes the builder and constructs a [`CreateParticipantConnectionInput`](crate::operation::create_participant_connection::CreateParticipantConnectionInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_participant_connection::CreateParticipantConnectionInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_participant_connection::CreateParticipantConnectionInput {
r#type: self.r#type,
participant_token: self.participant_token,
connect_participant: self.connect_participant,
})
}
}