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. Only contacts in the CHAT channel are supported.</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>.</p>
14 /// <p><code>DisplayName</code> is <b>Required</b>.</p>
15 /// </important>
16 pub participant_details: ::std::option::Option<crate::types::ParticipantDetailsToAdd>,
17}
18impl CreateParticipantInput {
19 /// <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>
20 pub fn instance_id(&self) -> ::std::option::Option<&str> {
21 self.instance_id.as_deref()
22 }
23 /// <p>The identifier of the contact in this instance of Amazon Connect. Only contacts in the CHAT channel are supported.</p>
24 pub fn contact_id(&self) -> ::std::option::Option<&str> {
25 self.contact_id.as_deref()
26 }
27 /// <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>
28 pub fn client_token(&self) -> ::std::option::Option<&str> {
29 self.client_token.as_deref()
30 }
31 /// <p>Information identifying the participant.</p><important>
32 /// <p>The only Valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code>.</p>
33 /// <p><code>DisplayName</code> is <b>Required</b>.</p>
34 /// </important>
35 pub fn participant_details(&self) -> ::std::option::Option<&crate::types::ParticipantDetailsToAdd> {
36 self.participant_details.as_ref()
37 }
38}
39impl CreateParticipantInput {
40 /// Creates a new builder-style object to manufacture [`CreateParticipantInput`](crate::operation::create_participant::CreateParticipantInput).
41 pub fn builder() -> crate::operation::create_participant::builders::CreateParticipantInputBuilder {
42 crate::operation::create_participant::builders::CreateParticipantInputBuilder::default()
43 }
44}
45
46/// A builder for [`CreateParticipantInput`](crate::operation::create_participant::CreateParticipantInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateParticipantInputBuilder {
50 pub(crate) instance_id: ::std::option::Option<::std::string::String>,
51 pub(crate) contact_id: ::std::option::Option<::std::string::String>,
52 pub(crate) client_token: ::std::option::Option<::std::string::String>,
53 pub(crate) participant_details: ::std::option::Option<crate::types::ParticipantDetailsToAdd>,
54}
55impl CreateParticipantInputBuilder {
56 /// <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>
57 /// This field is required.
58 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.instance_id = ::std::option::Option::Some(input.into());
60 self
61 }
62 /// <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>
63 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64 self.instance_id = input;
65 self
66 }
67 /// <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>
68 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
69 &self.instance_id
70 }
71 /// <p>The identifier of the contact in this instance of Amazon Connect. Only contacts in the CHAT channel are supported.</p>
72 /// This field is required.
73 pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.contact_id = ::std::option::Option::Some(input.into());
75 self
76 }
77 /// <p>The identifier of the contact in this instance of Amazon Connect. Only contacts in the CHAT channel are supported.</p>
78 pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.contact_id = input;
80 self
81 }
82 /// <p>The identifier of the contact in this instance of Amazon Connect. Only contacts in the CHAT channel are supported.</p>
83 pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
84 &self.contact_id
85 }
86 /// <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>
87 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.client_token = ::std::option::Option::Some(input.into());
89 self
90 }
91 /// <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>
92 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.client_token = input;
94 self
95 }
96 /// <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>
97 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
98 &self.client_token
99 }
100 /// <p>Information identifying the participant.</p><important>
101 /// <p>The only Valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code>.</p>
102 /// <p><code>DisplayName</code> is <b>Required</b>.</p>
103 /// </important>
104 /// This field is required.
105 pub fn participant_details(mut self, input: crate::types::ParticipantDetailsToAdd) -> Self {
106 self.participant_details = ::std::option::Option::Some(input);
107 self
108 }
109 /// <p>Information identifying the participant.</p><important>
110 /// <p>The only Valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code>.</p>
111 /// <p><code>DisplayName</code> is <b>Required</b>.</p>
112 /// </important>
113 pub fn set_participant_details(mut self, input: ::std::option::Option<crate::types::ParticipantDetailsToAdd>) -> Self {
114 self.participant_details = input;
115 self
116 }
117 /// <p>Information identifying the participant.</p><important>
118 /// <p>The only Valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code>.</p>
119 /// <p><code>DisplayName</code> is <b>Required</b>.</p>
120 /// </important>
121 pub fn get_participant_details(&self) -> &::std::option::Option<crate::types::ParticipantDetailsToAdd> {
122 &self.participant_details
123 }
124 /// Consumes the builder and constructs a [`CreateParticipantInput`](crate::operation::create_participant::CreateParticipantInput).
125 pub fn build(
126 self,
127 ) -> ::std::result::Result<crate::operation::create_participant::CreateParticipantInput, ::aws_smithy_types::error::operation::BuildError> {
128 ::std::result::Result::Ok(crate::operation::create_participant::CreateParticipantInput {
129 instance_id: self.instance_id,
130 contact_id: self.contact_id,
131 client_token: self.client_token,
132 participant_details: self.participant_details,
133 })
134 }
135}