aws_sdk_connect/operation/create_participant/_create_participant_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateParticipantInput {
6 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
7 pub instance_id: ::std::option::Option<::std::string::String>,
8 /// <p>The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel</p>
9 pub contact_id: ::std::option::Option<::std::string::String>,
10 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
11 pub client_token: ::std::option::Option<::std::string::String>,
12 /// <p>Information identifying the participant.</p><important>
13 /// <p>The only valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code> for chat contact and <code>CUSTOMER</code> for voice contact.</p>
14 /// </important>
15 pub participant_details: ::std::option::Option<crate::types::ParticipantDetailsToAdd>,
16}
17impl CreateParticipantInput {
18 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
19 pub fn instance_id(&self) -> ::std::option::Option<&str> {
20 self.instance_id.as_deref()
21 }
22 /// <p>The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel</p>
23 pub fn contact_id(&self) -> ::std::option::Option<&str> {
24 self.contact_id.as_deref()
25 }
26 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
27 pub fn client_token(&self) -> ::std::option::Option<&str> {
28 self.client_token.as_deref()
29 }
30 /// <p>Information identifying the participant.</p><important>
31 /// <p>The only valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code> for chat contact and <code>CUSTOMER</code> for voice contact.</p>
32 /// </important>
33 pub fn participant_details(&self) -> ::std::option::Option<&crate::types::ParticipantDetailsToAdd> {
34 self.participant_details.as_ref()
35 }
36}
37impl CreateParticipantInput {
38 /// Creates a new builder-style object to manufacture [`CreateParticipantInput`](crate::operation::create_participant::CreateParticipantInput).
39 pub fn builder() -> crate::operation::create_participant::builders::CreateParticipantInputBuilder {
40 crate::operation::create_participant::builders::CreateParticipantInputBuilder::default()
41 }
42}
43
44/// A builder for [`CreateParticipantInput`](crate::operation::create_participant::CreateParticipantInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct CreateParticipantInputBuilder {
48 pub(crate) instance_id: ::std::option::Option<::std::string::String>,
49 pub(crate) contact_id: ::std::option::Option<::std::string::String>,
50 pub(crate) client_token: ::std::option::Option<::std::string::String>,
51 pub(crate) participant_details: ::std::option::Option<crate::types::ParticipantDetailsToAdd>,
52}
53impl CreateParticipantInputBuilder {
54 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
55 /// This field is required.
56 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.instance_id = ::std::option::Option::Some(input.into());
58 self
59 }
60 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
61 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.instance_id = input;
63 self
64 }
65 /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
66 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
67 &self.instance_id
68 }
69 /// <p>The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel</p>
70 /// This field is required.
71 pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.contact_id = ::std::option::Option::Some(input.into());
73 self
74 }
75 /// <p>The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel</p>
76 pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.contact_id = input;
78 self
79 }
80 /// <p>The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel</p>
81 pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
82 &self.contact_id
83 }
84 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
85 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.client_token = ::std::option::Option::Some(input.into());
87 self
88 }
89 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
90 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.client_token = input;
92 self
93 }
94 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
95 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
96 &self.client_token
97 }
98 /// <p>Information identifying the participant.</p><important>
99 /// <p>The only valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code> for chat contact and <code>CUSTOMER</code> for voice contact.</p>
100 /// </important>
101 /// This field is required.
102 pub fn participant_details(mut self, input: crate::types::ParticipantDetailsToAdd) -> Self {
103 self.participant_details = ::std::option::Option::Some(input);
104 self
105 }
106 /// <p>Information identifying the participant.</p><important>
107 /// <p>The only valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code> for chat contact and <code>CUSTOMER</code> for voice contact.</p>
108 /// </important>
109 pub fn set_participant_details(mut self, input: ::std::option::Option<crate::types::ParticipantDetailsToAdd>) -> Self {
110 self.participant_details = input;
111 self
112 }
113 /// <p>Information identifying the participant.</p><important>
114 /// <p>The only valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code> for chat contact and <code>CUSTOMER</code> for voice contact.</p>
115 /// </important>
116 pub fn get_participant_details(&self) -> &::std::option::Option<crate::types::ParticipantDetailsToAdd> {
117 &self.participant_details
118 }
119 /// Consumes the builder and constructs a [`CreateParticipantInput`](crate::operation::create_participant::CreateParticipantInput).
120 pub fn build(
121 self,
122 ) -> ::std::result::Result<crate::operation::create_participant::CreateParticipantInput, ::aws_smithy_types::error::operation::BuildError> {
123 ::std::result::Result::Ok(crate::operation::create_participant::CreateParticipantInput {
124 instance_id: self.instance_id,
125 contact_id: self.contact_id,
126 client_token: self.client_token,
127 participant_details: self.participant_details,
128 })
129 }
130}