aws_sdk_supportapp/operation/update_slack_channel_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_slack_channel_configuration::_update_slack_channel_configuration_output::UpdateSlackChannelConfigurationOutputBuilder;
3
4pub use crate::operation::update_slack_channel_configuration::_update_slack_channel_configuration_input::UpdateSlackChannelConfigurationInputBuilder;
5
6impl crate::operation::update_slack_channel_configuration::builders::UpdateSlackChannelConfigurationInputBuilder {
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_slack_channel_configuration::UpdateSlackChannelConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_slack_channel_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateSlackChannelConfiguration`.
24///
25/// <p>Updates the configuration for a Slack channel, such as case update notifications.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateSlackChannelConfigurationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_slack_channel_configuration::builders::UpdateSlackChannelConfigurationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfigurationOutput,
35        crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfigurationError,
36    > for UpdateSlackChannelConfigurationFluentBuilder
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_slack_channel_configuration::UpdateSlackChannelConfigurationOutput,
44            crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfigurationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateSlackChannelConfigurationFluentBuilder {
51    /// Creates a new `UpdateSlackChannelConfigurationFluentBuilder`.
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 UpdateSlackChannelConfiguration as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_slack_channel_configuration::builders::UpdateSlackChannelConfigurationInputBuilder {
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_slack_channel_configuration::UpdateSlackChannelConfigurationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfigurationError,
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_slack_channel_configuration::UpdateSlackChannelConfiguration::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfiguration::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_slack_channel_configuration::UpdateSlackChannelConfigurationOutput,
97        crate::operation::update_slack_channel_configuration::UpdateSlackChannelConfigurationError,
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 team ID in Slack. This ID uniquely identifies a Slack workspace, such as <code>T012ABCDEFG</code>.</p>
112    pub fn team_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.team_id(input.into());
114        self
115    }
116    /// <p>The team ID in Slack. This ID uniquely identifies a Slack workspace, such as <code>T012ABCDEFG</code>.</p>
117    pub fn set_team_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_team_id(input);
119        self
120    }
121    /// <p>The team ID in Slack. This ID uniquely identifies a Slack workspace, such as <code>T012ABCDEFG</code>.</p>
122    pub fn get_team_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_team_id()
124    }
125    /// <p>The channel ID in Slack. This ID identifies a channel within a Slack workspace.</p>
126    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.channel_id(input.into());
128        self
129    }
130    /// <p>The channel ID in Slack. This ID identifies a channel within a Slack workspace.</p>
131    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_channel_id(input);
133        self
134    }
135    /// <p>The channel ID in Slack. This ID identifies a channel within a Slack workspace.</p>
136    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_channel_id()
138    }
139    /// <p>The Slack channel name that you want to update.</p>
140    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.channel_name(input.into());
142        self
143    }
144    /// <p>The Slack channel name that you want to update.</p>
145    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_channel_name(input);
147        self
148    }
149    /// <p>The Slack channel name that you want to update.</p>
150    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_channel_name()
152    }
153    /// <p>Whether you want to get notified when a support case is created or reopened.</p>
154    pub fn notify_on_create_or_reopen_case(mut self, input: bool) -> Self {
155        self.inner = self.inner.notify_on_create_or_reopen_case(input);
156        self
157    }
158    /// <p>Whether you want to get notified when a support case is created or reopened.</p>
159    pub fn set_notify_on_create_or_reopen_case(mut self, input: ::std::option::Option<bool>) -> Self {
160        self.inner = self.inner.set_notify_on_create_or_reopen_case(input);
161        self
162    }
163    /// <p>Whether you want to get notified when a support case is created or reopened.</p>
164    pub fn get_notify_on_create_or_reopen_case(&self) -> &::std::option::Option<bool> {
165        self.inner.get_notify_on_create_or_reopen_case()
166    }
167    /// <p>Whether you want to get notified when a support case has a new correspondence.</p>
168    pub fn notify_on_add_correspondence_to_case(mut self, input: bool) -> Self {
169        self.inner = self.inner.notify_on_add_correspondence_to_case(input);
170        self
171    }
172    /// <p>Whether you want to get notified when a support case has a new correspondence.</p>
173    pub fn set_notify_on_add_correspondence_to_case(mut self, input: ::std::option::Option<bool>) -> Self {
174        self.inner = self.inner.set_notify_on_add_correspondence_to_case(input);
175        self
176    }
177    /// <p>Whether you want to get notified when a support case has a new correspondence.</p>
178    pub fn get_notify_on_add_correspondence_to_case(&self) -> &::std::option::Option<bool> {
179        self.inner.get_notify_on_add_correspondence_to_case()
180    }
181    /// <p>Whether you want to get notified when a support case is resolved.</p>
182    pub fn notify_on_resolve_case(mut self, input: bool) -> Self {
183        self.inner = self.inner.notify_on_resolve_case(input);
184        self
185    }
186    /// <p>Whether you want to get notified when a support case is resolved.</p>
187    pub fn set_notify_on_resolve_case(mut self, input: ::std::option::Option<bool>) -> Self {
188        self.inner = self.inner.set_notify_on_resolve_case(input);
189        self
190    }
191    /// <p>Whether you want to get notified when a support case is resolved.</p>
192    pub fn get_notify_on_resolve_case(&self) -> &::std::option::Option<bool> {
193        self.inner.get_notify_on_resolve_case()
194    }
195    /// <p>The case severity for a support case that you want to receive notifications.</p>
196    /// <p>If you specify <code>high</code> or <code>all</code>, at least one of the following parameters must be <code>true</code>:</p>
197    /// <ul>
198    /// <li>
199    /// <p><code>notifyOnAddCorrespondenceToCase</code></p></li>
200    /// <li>
201    /// <p><code>notifyOnCreateOrReopenCase</code></p></li>
202    /// <li>
203    /// <p><code>notifyOnResolveCase</code></p></li>
204    /// </ul>
205    /// <p>If you specify <code>none</code>, any of the following parameters that you specify in your request must be <code>false</code>:</p>
206    /// <ul>
207    /// <li>
208    /// <p><code>notifyOnAddCorrespondenceToCase</code></p></li>
209    /// <li>
210    /// <p><code>notifyOnCreateOrReopenCase</code></p></li>
211    /// <li>
212    /// <p><code>notifyOnResolveCase</code></p></li>
213    /// </ul><note>
214    /// <p>If you don't specify these parameters in your request, the Amazon Web Services Support App uses the current values by default.</p>
215    /// </note>
216    pub fn notify_on_case_severity(mut self, input: crate::types::NotificationSeverityLevel) -> Self {
217        self.inner = self.inner.notify_on_case_severity(input);
218        self
219    }
220    /// <p>The case severity for a support case that you want to receive notifications.</p>
221    /// <p>If you specify <code>high</code> or <code>all</code>, at least one of the following parameters must be <code>true</code>:</p>
222    /// <ul>
223    /// <li>
224    /// <p><code>notifyOnAddCorrespondenceToCase</code></p></li>
225    /// <li>
226    /// <p><code>notifyOnCreateOrReopenCase</code></p></li>
227    /// <li>
228    /// <p><code>notifyOnResolveCase</code></p></li>
229    /// </ul>
230    /// <p>If you specify <code>none</code>, any of the following parameters that you specify in your request must be <code>false</code>:</p>
231    /// <ul>
232    /// <li>
233    /// <p><code>notifyOnAddCorrespondenceToCase</code></p></li>
234    /// <li>
235    /// <p><code>notifyOnCreateOrReopenCase</code></p></li>
236    /// <li>
237    /// <p><code>notifyOnResolveCase</code></p></li>
238    /// </ul><note>
239    /// <p>If you don't specify these parameters in your request, the Amazon Web Services Support App uses the current values by default.</p>
240    /// </note>
241    pub fn set_notify_on_case_severity(mut self, input: ::std::option::Option<crate::types::NotificationSeverityLevel>) -> Self {
242        self.inner = self.inner.set_notify_on_case_severity(input);
243        self
244    }
245    /// <p>The case severity for a support case that you want to receive notifications.</p>
246    /// <p>If you specify <code>high</code> or <code>all</code>, at least one of the following parameters must be <code>true</code>:</p>
247    /// <ul>
248    /// <li>
249    /// <p><code>notifyOnAddCorrespondenceToCase</code></p></li>
250    /// <li>
251    /// <p><code>notifyOnCreateOrReopenCase</code></p></li>
252    /// <li>
253    /// <p><code>notifyOnResolveCase</code></p></li>
254    /// </ul>
255    /// <p>If you specify <code>none</code>, any of the following parameters that you specify in your request must be <code>false</code>:</p>
256    /// <ul>
257    /// <li>
258    /// <p><code>notifyOnAddCorrespondenceToCase</code></p></li>
259    /// <li>
260    /// <p><code>notifyOnCreateOrReopenCase</code></p></li>
261    /// <li>
262    /// <p><code>notifyOnResolveCase</code></p></li>
263    /// </ul><note>
264    /// <p>If you don't specify these parameters in your request, the Amazon Web Services Support App uses the current values by default.</p>
265    /// </note>
266    pub fn get_notify_on_case_severity(&self) -> &::std::option::Option<crate::types::NotificationSeverityLevel> {
267        self.inner.get_notify_on_case_severity()
268    }
269    /// <p>The Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations on Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/support-app-permissions.html">Managing access to the Amazon Web Services Support App</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
270    pub fn channel_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271        self.inner = self.inner.channel_role_arn(input.into());
272        self
273    }
274    /// <p>The Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations on Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/support-app-permissions.html">Managing access to the Amazon Web Services Support App</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
275    pub fn set_channel_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
276        self.inner = self.inner.set_channel_role_arn(input);
277        self
278    }
279    /// <p>The Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations on Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/support-app-permissions.html">Managing access to the Amazon Web Services Support App</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
280    pub fn get_channel_role_arn(&self) -> &::std::option::Option<::std::string::String> {
281        self.inner.get_channel_role_arn()
282    }
283}