aws_sdk_chatbot/operation/update_microsoft_teams_channel_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_microsoft_teams_channel_configuration::_update_microsoft_teams_channel_configuration_output::UpdateMicrosoftTeamsChannelConfigurationOutputBuilder;
3
4pub use crate::operation::update_microsoft_teams_channel_configuration::_update_microsoft_teams_channel_configuration_input::UpdateMicrosoftTeamsChannelConfigurationInputBuilder;
5
6impl crate::operation::update_microsoft_teams_channel_configuration::builders::UpdateMicrosoftTeamsChannelConfigurationInputBuilder {
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::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_microsoft_teams_channel_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateMicrosoftTeamsChannelConfiguration`.
24///
25/// <p>Updates an Microsoft Teams channel configuration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateMicrosoftTeamsChannelConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_microsoft_teams_channel_configuration::builders::UpdateMicrosoftTeamsChannelConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationOutput,
35        crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationError,
36    > for UpdateMicrosoftTeamsChannelConfigurationFluentBuilder
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::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationOutput,
44            crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateMicrosoftTeamsChannelConfigurationFluentBuilder {
51    /// Creates a new `UpdateMicrosoftTeamsChannelConfigurationFluentBuilder`.
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 UpdateMicrosoftTeamsChannelConfiguration as a reference.
60    pub fn as_input(
61        &self,
62    ) -> &crate::operation::update_microsoft_teams_channel_configuration::builders::UpdateMicrosoftTeamsChannelConfigurationInputBuilder {
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::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationError,
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::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfiguration::operation_runtime_plugins(
88                self.handle.runtime_plugins.clone(),
89                &self.handle.conf,
90                self.config_override,
91            );
92        crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfiguration::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::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationOutput,
101        crate::operation::update_microsoft_teams_channel_configuration::UpdateMicrosoftTeamsChannelConfigurationError,
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 Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.</p>
116    pub fn chat_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.chat_configuration_arn(input.into());
118        self
119    }
120    /// <p>The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.</p>
121    pub fn set_chat_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_chat_configuration_arn(input);
123        self
124    }
125    /// <p>The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.</p>
126    pub fn get_chat_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_chat_configuration_arn()
128    }
129    /// <p>The ID of the Microsoft Teams channel.</p>
130    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.channel_id(input.into());
132        self
133    }
134    /// <p>The ID of the Microsoft Teams channel.</p>
135    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_channel_id(input);
137        self
138    }
139    /// <p>The ID of the Microsoft Teams channel.</p>
140    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
141        self.inner.get_channel_id()
142    }
143    /// <p>The name of the Microsoft Teams channel.</p>
144    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.channel_name(input.into());
146        self
147    }
148    /// <p>The name of the Microsoft Teams channel.</p>
149    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_channel_name(input);
151        self
152    }
153    /// <p>The name of the Microsoft Teams channel.</p>
154    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
155        self.inner.get_channel_name()
156    }
157    ///
158    /// Appends an item to `SnsTopicArns`.
159    ///
160    /// To override the contents of this collection use [`set_sns_topic_arns`](Self::set_sns_topic_arns).
161    ///
162    /// <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
163    pub fn sns_topic_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.inner = self.inner.sns_topic_arns(input.into());
165        self
166    }
167    /// <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
168    pub fn set_sns_topic_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
169        self.inner = self.inner.set_sns_topic_arns(input);
170        self
171    }
172    /// <p>The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.</p>
173    pub fn get_sns_topic_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
174        self.inner.get_sns_topic_arns()
175    }
176    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
177    /// <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>
178    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.inner = self.inner.iam_role_arn(input.into());
180        self
181    }
182    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
183    /// <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>
184    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.inner = self.inner.set_iam_role_arn(input);
186        self
187    }
188    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
189    /// <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>
190    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
191        self.inner.get_iam_role_arn()
192    }
193    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
194    pub fn logging_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.logging_level(input.into());
196        self
197    }
198    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
199    pub fn set_logging_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.inner = self.inner.set_logging_level(input);
201        self
202    }
203    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
204    pub fn get_logging_level(&self) -> &::std::option::Option<::std::string::String> {
205        self.inner.get_logging_level()
206    }
207    ///
208    /// Appends an item to `GuardrailPolicyArns`.
209    ///
210    /// To override the contents of this collection use [`set_guardrail_policy_arns`](Self::set_guardrail_policy_arns).
211    ///
212    /// <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>
213    pub fn guardrail_policy_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.inner = self.inner.guardrail_policy_arns(input.into());
215        self
216    }
217    /// <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>
218    pub fn set_guardrail_policy_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
219        self.inner = self.inner.set_guardrail_policy_arns(input);
220        self
221    }
222    /// <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>
223    pub fn get_guardrail_policy_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
224        self.inner.get_guardrail_policy_arns()
225    }
226    /// <p>Enables use of a user role requirement in your chat configuration.</p>
227    pub fn user_authorization_required(mut self, input: bool) -> Self {
228        self.inner = self.inner.user_authorization_required(input);
229        self
230    }
231    /// <p>Enables use of a user role requirement in your chat configuration.</p>
232    pub fn set_user_authorization_required(mut self, input: ::std::option::Option<bool>) -> Self {
233        self.inner = self.inner.set_user_authorization_required(input);
234        self
235    }
236    /// <p>Enables use of a user role requirement in your chat configuration.</p>
237    pub fn get_user_authorization_required(&self) -> &::std::option::Option<bool> {
238        self.inner.get_user_authorization_required()
239    }
240}