aws_sdk_chatbot/operation/update_chime_webhook_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_chime_webhook_configuration::_update_chime_webhook_configuration_output::UpdateChimeWebhookConfigurationOutputBuilder;
3
4pub use crate::operation::update_chime_webhook_configuration::_update_chime_webhook_configuration_input::UpdateChimeWebhookConfigurationInputBuilder;
5
6impl crate::operation::update_chime_webhook_configuration::builders::UpdateChimeWebhookConfigurationInputBuilder {
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_chime_webhook_configuration::UpdateChimeWebhookConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_chime_webhook_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateChimeWebhookConfiguration`.
24///
25/// <p>Updates a Amazon Chime webhook configuration.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateChimeWebhookConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_chime_webhook_configuration::builders::UpdateChimeWebhookConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationOutput,
35        crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationError,
36    > for UpdateChimeWebhookConfigurationFluentBuilder
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_chime_webhook_configuration::UpdateChimeWebhookConfigurationOutput,
44            crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateChimeWebhookConfigurationFluentBuilder {
51    /// Creates a new `UpdateChimeWebhookConfigurationFluentBuilder`.
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 UpdateChimeWebhookConfiguration as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_chime_webhook_configuration::builders::UpdateChimeWebhookConfigurationInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfiguration::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfiguration::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationOutput,
97        crate::operation::update_chime_webhook_configuration::UpdateChimeWebhookConfigurationError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update.</p>
112    pub fn chat_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.chat_configuration_arn(input.into());
114        self
115    }
116    /// <p>The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update.</p>
117    pub fn set_chat_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_chat_configuration_arn(input);
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update.</p>
122    pub fn get_chat_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_chat_configuration_arn()
124    }
125    /// <p>A description of the webhook. We recommend using the convention <code>RoomName/WebhookName</code>.</p>
126    /// <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html">Tutorial: Get started with Amazon Chime</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
127    pub fn webhook_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.webhook_description(input.into());
129        self
130    }
131    /// <p>A description of the webhook. We recommend using the convention <code>RoomName/WebhookName</code>.</p>
132    /// <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html">Tutorial: Get started with Amazon Chime</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
133    pub fn set_webhook_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_webhook_description(input);
135        self
136    }
137    /// <p>A description of the webhook. We recommend using the convention <code>RoomName/WebhookName</code>.</p>
138    /// <p>For more information, see <a href="https://docs.aws.amazon.com/chatbot/latest/adminguide/chime-setup.html">Tutorial: Get started with Amazon Chime</a> in the <i> AWS Chatbot Administrator Guide</i>.</p>
139    pub fn get_webhook_description(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_webhook_description()
141    }
142    /// <p>The URL for the Amazon Chime webhook.</p>
143    pub fn webhook_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.inner = self.inner.webhook_url(input.into());
145        self
146    }
147    /// <p>The URL for the Amazon Chime webhook.</p>
148    pub fn set_webhook_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.inner = self.inner.set_webhook_url(input);
150        self
151    }
152    /// <p>The URL for the Amazon Chime webhook.</p>
153    pub fn get_webhook_url(&self) -> &::std::option::Option<::std::string::String> {
154        self.inner.get_webhook_url()
155    }
156    ///
157    /// Appends an item to `SnsTopicArns`.
158    ///
159    /// To override the contents of this collection use [`set_sns_topic_arns`](Self::set_sns_topic_arns).
160    ///
161    /// <p>The ARNs of the SNS topics that deliver notifications to AWS Chatbot.</p>
162    pub fn sns_topic_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.inner = self.inner.sns_topic_arns(input.into());
164        self
165    }
166    /// <p>The ARNs of the SNS topics that deliver notifications to AWS Chatbot.</p>
167    pub fn set_sns_topic_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
168        self.inner = self.inner.set_sns_topic_arns(input);
169        self
170    }
171    /// <p>The ARNs of the SNS topics that deliver notifications to AWS Chatbot.</p>
172    pub fn get_sns_topic_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
173        self.inner.get_sns_topic_arns()
174    }
175    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
176    /// <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>
177    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.inner = self.inner.iam_role_arn(input.into());
179        self
180    }
181    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
182    /// <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>
183    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.inner = self.inner.set_iam_role_arn(input);
185        self
186    }
187    /// <p>A user-defined role that AWS Chatbot assumes. This is not the service-linked role.</p>
188    /// <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>
189    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
190        self.inner.get_iam_role_arn()
191    }
192    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
193    pub fn logging_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.inner = self.inner.logging_level(input.into());
195        self
196    }
197    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
198    pub fn set_logging_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.inner = self.inner.set_logging_level(input);
200        self
201    }
202    /// <p>Logging levels include <code>ERROR</code>, <code>INFO</code>, or <code>NONE</code>.</p>
203    pub fn get_logging_level(&self) -> &::std::option::Option<::std::string::String> {
204        self.inner.get_logging_level()
205    }
206}