aws_sdk_connect/operation/associate_bot/
_associate_bot_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 AssociateBotInput {
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>Configuration information of an Amazon Lex bot.</p>
9    pub lex_bot: ::std::option::Option<crate::types::LexBot>,
10    /// <p>The Amazon Lex V2 bot to associate with the instance.</p>
11    pub lex_v2_bot: ::std::option::Option<crate::types::LexV2Bot>,
12    /// <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>
13    pub client_token: ::std::option::Option<::std::string::String>,
14}
15impl AssociateBotInput {
16    /// <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>
17    pub fn instance_id(&self) -> ::std::option::Option<&str> {
18        self.instance_id.as_deref()
19    }
20    /// <p>Configuration information of an Amazon Lex bot.</p>
21    pub fn lex_bot(&self) -> ::std::option::Option<&crate::types::LexBot> {
22        self.lex_bot.as_ref()
23    }
24    /// <p>The Amazon Lex V2 bot to associate with the instance.</p>
25    pub fn lex_v2_bot(&self) -> ::std::option::Option<&crate::types::LexV2Bot> {
26        self.lex_v2_bot.as_ref()
27    }
28    /// <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>
29    pub fn client_token(&self) -> ::std::option::Option<&str> {
30        self.client_token.as_deref()
31    }
32}
33impl AssociateBotInput {
34    /// Creates a new builder-style object to manufacture [`AssociateBotInput`](crate::operation::associate_bot::AssociateBotInput).
35    pub fn builder() -> crate::operation::associate_bot::builders::AssociateBotInputBuilder {
36        crate::operation::associate_bot::builders::AssociateBotInputBuilder::default()
37    }
38}
39
40/// A builder for [`AssociateBotInput`](crate::operation::associate_bot::AssociateBotInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct AssociateBotInputBuilder {
44    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
45    pub(crate) lex_bot: ::std::option::Option<crate::types::LexBot>,
46    pub(crate) lex_v2_bot: ::std::option::Option<crate::types::LexV2Bot>,
47    pub(crate) client_token: ::std::option::Option<::std::string::String>,
48}
49impl AssociateBotInputBuilder {
50    /// <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>
51    /// This field is required.
52    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.instance_id = ::std::option::Option::Some(input.into());
54        self
55    }
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    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.instance_id = input;
59        self
60    }
61    /// <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>
62    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.instance_id
64    }
65    /// <p>Configuration information of an Amazon Lex bot.</p>
66    pub fn lex_bot(mut self, input: crate::types::LexBot) -> Self {
67        self.lex_bot = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>Configuration information of an Amazon Lex bot.</p>
71    pub fn set_lex_bot(mut self, input: ::std::option::Option<crate::types::LexBot>) -> Self {
72        self.lex_bot = input;
73        self
74    }
75    /// <p>Configuration information of an Amazon Lex bot.</p>
76    pub fn get_lex_bot(&self) -> &::std::option::Option<crate::types::LexBot> {
77        &self.lex_bot
78    }
79    /// <p>The Amazon Lex V2 bot to associate with the instance.</p>
80    pub fn lex_v2_bot(mut self, input: crate::types::LexV2Bot) -> Self {
81        self.lex_v2_bot = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The Amazon Lex V2 bot to associate with the instance.</p>
85    pub fn set_lex_v2_bot(mut self, input: ::std::option::Option<crate::types::LexV2Bot>) -> Self {
86        self.lex_v2_bot = input;
87        self
88    }
89    /// <p>The Amazon Lex V2 bot to associate with the instance.</p>
90    pub fn get_lex_v2_bot(&self) -> &::std::option::Option<crate::types::LexV2Bot> {
91        &self.lex_v2_bot
92    }
93    /// <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>
94    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.client_token = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <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>
99    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.client_token = input;
101        self
102    }
103    /// <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>
104    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
105        &self.client_token
106    }
107    /// Consumes the builder and constructs a [`AssociateBotInput`](crate::operation::associate_bot::AssociateBotInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::associate_bot::AssociateBotInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::associate_bot::AssociateBotInput {
112            instance_id: self.instance_id,
113            lex_bot: self.lex_bot,
114            lex_v2_bot: self.lex_v2_bot,
115            client_token: self.client_token,
116        })
117    }
118}