aws_sdk_chatbot/operation/create_microsoft_teams_channel_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_microsoft_teams_channel_configuration::_create_microsoft_teams_channel_configuration_output::CreateMicrosoftTeamsChannelConfigurationOutputBuilder;
3
4pub use crate::operation::create_microsoft_teams_channel_configuration::_create_microsoft_teams_channel_configuration_input::CreateMicrosoftTeamsChannelConfigurationInputBuilder;
5
6impl crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_microsoft_teams_channel_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateMicrosoftTeamsChannelConfiguration`.
24///
25/// <p>Creates an AWS Chatbot configuration for Microsoft Teams.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateMicrosoftTeamsChannelConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput,
35        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationError,
36    > for CreateMicrosoftTeamsChannelConfigurationFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput,
44            crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateMicrosoftTeamsChannelConfigurationFluentBuilder {
51    /// Creates a new `CreateMicrosoftTeamsChannelConfigurationFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateMicrosoftTeamsChannelConfiguration as a reference.
60    pub fn as_input(
61        &self,
62    ) -> &crate::operation::create_microsoft_teams_channel_configuration::builders::CreateMicrosoftTeamsChannelConfigurationInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins =
87            crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfiguration::operation_runtime_plugins(
88                self.handle.runtime_plugins.clone(),
89                &self.handle.conf,
90                self.config_override,
91            );
92        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfiguration::orchestrate(&runtime_plugins, input)
93            .await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationOutput,
101        crate::operation::create_microsoft_teams_channel_configuration::CreateMicrosoftTeamsChannelConfigurationError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <p>The ID of the Microsoft Teams channel.</p>
116    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.channel_id(input.into());
118        self
119    }
120    /// <p>The ID of the Microsoft Teams channel.</p>
121    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_channel_id(input);
123        self
124    }
125    /// <p>The ID of the Microsoft Teams channel.</p>
126    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_channel_id()
128    }
129    /// <p>The name of the Microsoft Teams channel.</p>
130    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.channel_name(input.into());
132        self
133    }
134    /// <p>The name of the Microsoft Teams channel.</p>
135    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_channel_name(input);
137        self
138    }
139    /// <p>The name of the Microsoft Teams channel.</p>
140    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
141        self.inner.get_channel_name()
142    }
143    /// <p>The ID of the Microsoft Teams authorized with AWS Chatbot.</p>
144    /// <p>To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup">Step 1: Configure a Microsoft Teams client</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
145    pub fn team_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.team_id(input.into());
147        self
148    }
149    /// <p>The ID of the Microsoft Teams authorized with AWS Chatbot.</p>
150    /// <p>To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup">Step 1: Configure a Microsoft Teams client</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
151    pub fn set_team_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.inner = self.inner.set_team_id(input);
153        self
154    }
155    /// <p>The ID of the Microsoft Teams authorized with AWS Chatbot.</p>
156    /// <p>To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup">Step 1: Configure a Microsoft Teams client</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
157    pub fn get_team_id(&self) -> &::std::option::Option<::std::string::String> {
158        self.inner.get_team_id()
159    }
160    /// <p>The name of the Microsoft Teams Team.</p>
161    pub fn team_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.inner = self.inner.team_name(input.into());
163        self
164    }
165    /// <p>The name of the Microsoft Teams Team.</p>
166    pub fn set_team_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.inner = self.inner.set_team_name(input);
168        self
169    }
170    /// <p>The name of the Microsoft Teams Team.</p>
171    pub fn get_team_name(&self) -> &::std::option::Option<::std::string::String> {
172        self.inner.get_team_name()
173    }
174    /// <p>The ID of the Microsoft Teams tenant.</p>
175    pub fn tenant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176        self.inner = self.inner.tenant_id(input.into());
177        self
178    }
179    /// <p>The ID of the Microsoft Teams tenant.</p>
180    pub fn set_tenant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181        self.inner = self.inner.set_tenant_id(input);
182        self
183    }
184    /// <p>The ID of the Microsoft Teams tenant.</p>
185    pub fn get_tenant_id(&self) -> &::std::option::Option<::std::string::String> {
186        self.inner.get_tenant_id()
187    }
188    ///
189    /// Appends an item to `SnsTopicArns`.
190    ///
191    /// To override the contents of this collection use [`set_sns_topic_arns`](Self::set_sns_topic_arns).
192    ///
193    /// <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
194    pub fn sns_topic_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.sns_topic_arns(input.into());
196        self
197    }
198    /// <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
199    pub fn set_sns_topic_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
200        self.inner = self.inner.set_sns_topic_arns(input);
201        self
202    }
203    /// <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
204    pub fn get_sns_topic_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
205        self.inner.get_sns_topic_arns()
206    }
207    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
208    /// <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html">IAM policies for AWS Chatbot</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
209    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.inner = self.inner.iam_role_arn(input.into());
211        self
212    }
213    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
214    /// <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html">IAM policies for AWS Chatbot</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
215    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216        self.inner = self.inner.set_iam_role_arn(input);
217        self
218    }
219    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
220    /// <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chatbot-iam-policies.html">IAM policies for AWS Chatbot</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
221    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
222        self.inner.get_iam_role_arn()
223    }
224    /// <p>The name of the configuration.</p>
225    pub fn configuration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226        self.inner = self.inner.configuration_name(input.into());
227        self
228    }
229    /// <p>The name of the configuration.</p>
230    pub fn set_configuration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231        self.inner = self.inner.set_configuration_name(input);
232        self
233    }
234    /// <p>The name of the configuration.</p>
235    pub fn get_configuration_name(&self) -> &::std::option::Option<::std::string::String> {
236        self.inner.get_configuration_name()
237    }
238    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
239    pub fn logging_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240        self.inner = self.inner.logging_level(input.into());
241        self
242    }
243    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
244    pub fn set_logging_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245        self.inner = self.inner.set_logging_level(input);
246        self
247    }
248    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
249    pub fn get_logging_level(&self) -> &::std::option::Option<::std::string::String> {
250        self.inner.get_logging_level()
251    }
252    ///
253    /// Appends an item to `GuardrailPolicyArns`.
254    ///
255    /// To override the contents of this collection use [`set_guardrail_policy_arns`](Self::set_guardrail_policy_arns).
256    ///
257    /// <p>The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed <code>AdministratorAccess</code> policy is applied by default if this is not set.</p>
258    pub fn guardrail_policy_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259        self.inner = self.inner.guardrail_policy_arns(input.into());
260        self
261    }
262    /// <p>The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed <code>AdministratorAccess</code> policy is applied by default if this is not set.</p>
263    pub fn set_guardrail_policy_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
264        self.inner = self.inner.set_guardrail_policy_arns(input);
265        self
266    }
267    /// <p>The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed <code>AdministratorAccess</code> policy is applied by default if this is not set.</p>
268    pub fn get_guardrail_policy_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
269        self.inner.get_guardrail_policy_arns()
270    }
271    /// <p>Enables use of a user role requirement in your chat configuration.</p>
272    pub fn user_authorization_required(mut self, input: bool) -> Self {
273        self.inner = self.inner.user_authorization_required(input);
274        self
275    }
276    /// <p>Enables use of a user role requirement in your chat configuration.</p>
277    pub fn set_user_authorization_required(mut self, input: ::std::option::Option<bool>) -> Self {
278        self.inner = self.inner.set_user_authorization_required(input);
279        self
280    }
281    /// <p>Enables use of a user role requirement in your chat configuration.</p>
282    pub fn get_user_authorization_required(&self) -> &::std::option::Option<bool> {
283        self.inner.get_user_authorization_required()
284    }
285    ///
286    /// Appends an item to `Tags`.
287    ///
288    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
289    ///
290    /// <p>A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.</p>
291    pub fn tags(mut self, input: crate::types::Tag) -> Self {
292        self.inner = self.inner.tags(input);
293        self
294    }
295    /// <p>A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.</p>
296    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
297        self.inner = self.inner.set_tags(input);
298        self
299    }
300    /// <p>A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.</p>
301    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
302        self.inner.get_tags()
303    }
304}