aws_sdk_route53resolver/operation/update_firewall_domains/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_firewall_domains::_update_firewall_domains_output::UpdateFirewallDomainsOutputBuilder;
3
4pub use crate::operation::update_firewall_domains::_update_firewall_domains_input::UpdateFirewallDomainsInputBuilder;
5
6impl crate::operation::update_firewall_domains::builders::UpdateFirewallDomainsInputBuilder {
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_firewall_domains::UpdateFirewallDomainsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_firewall_domains::UpdateFirewallDomainsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_firewall_domains();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateFirewallDomains`.
24///
25/// <p>Updates the firewall domain list from an array of domain specifications.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateFirewallDomainsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_firewall_domains::builders::UpdateFirewallDomainsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_firewall_domains::UpdateFirewallDomainsOutput,
35        crate::operation::update_firewall_domains::UpdateFirewallDomainsError,
36    > for UpdateFirewallDomainsFluentBuilder
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_firewall_domains::UpdateFirewallDomainsOutput,
44            crate::operation::update_firewall_domains::UpdateFirewallDomainsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateFirewallDomainsFluentBuilder {
51    /// Creates a new `UpdateFirewallDomainsFluentBuilder`.
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 UpdateFirewallDomains as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_firewall_domains::builders::UpdateFirewallDomainsInputBuilder {
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_firewall_domains::UpdateFirewallDomainsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_firewall_domains::UpdateFirewallDomainsError,
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_firewall_domains::UpdateFirewallDomains::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_firewall_domains::UpdateFirewallDomains::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_firewall_domains::UpdateFirewallDomainsOutput,
97        crate::operation::update_firewall_domains::UpdateFirewallDomainsError,
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 ID of the domain list whose domains you want to update.</p>
112    pub fn firewall_domain_list_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.firewall_domain_list_id(input.into());
114        self
115    }
116    /// <p>The ID of the domain list whose domains you want to update.</p>
117    pub fn set_firewall_domain_list_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_firewall_domain_list_id(input);
119        self
120    }
121    /// <p>The ID of the domain list whose domains you want to update.</p>
122    pub fn get_firewall_domain_list_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_firewall_domain_list_id()
124    }
125    /// <p>What you want DNS Firewall to do with the domains that you are providing:</p>
126    /// <ul>
127    /// <li>
128    /// <p><code>ADD</code> - Add the domains to the ones that are already in the domain list.</p></li>
129    /// <li>
130    /// <p><code>REMOVE</code> - Search the domain list for the domains and remove them from the list.</p></li>
131    /// <li>
132    /// <p><code>REPLACE</code> - Update the domain list to exactly match the list that you are providing.</p></li>
133    /// </ul>
134    pub fn operation(mut self, input: crate::types::FirewallDomainUpdateOperation) -> Self {
135        self.inner = self.inner.operation(input);
136        self
137    }
138    /// <p>What you want DNS Firewall to do with the domains that you are providing:</p>
139    /// <ul>
140    /// <li>
141    /// <p><code>ADD</code> - Add the domains to the ones that are already in the domain list.</p></li>
142    /// <li>
143    /// <p><code>REMOVE</code> - Search the domain list for the domains and remove them from the list.</p></li>
144    /// <li>
145    /// <p><code>REPLACE</code> - Update the domain list to exactly match the list that you are providing.</p></li>
146    /// </ul>
147    pub fn set_operation(mut self, input: ::std::option::Option<crate::types::FirewallDomainUpdateOperation>) -> Self {
148        self.inner = self.inner.set_operation(input);
149        self
150    }
151    /// <p>What you want DNS Firewall to do with the domains that you are providing:</p>
152    /// <ul>
153    /// <li>
154    /// <p><code>ADD</code> - Add the domains to the ones that are already in the domain list.</p></li>
155    /// <li>
156    /// <p><code>REMOVE</code> - Search the domain list for the domains and remove them from the list.</p></li>
157    /// <li>
158    /// <p><code>REPLACE</code> - Update the domain list to exactly match the list that you are providing.</p></li>
159    /// </ul>
160    pub fn get_operation(&self) -> &::std::option::Option<crate::types::FirewallDomainUpdateOperation> {
161        self.inner.get_operation()
162    }
163    ///
164    /// Appends an item to `Domains`.
165    ///
166    /// To override the contents of this collection use [`set_domains`](Self::set_domains).
167    ///
168    /// <p>A list of domains to use in the update operation.</p><important>
169    /// <p>There is a limit of 1000 domains per request.</p>
170    /// </important>
171    /// <p>Each domain specification in your domain list must satisfy the following requirements:</p>
172    /// <ul>
173    /// <li>
174    /// <p>It can optionally start with <code>*</code> (asterisk).</p></li>
175    /// <li>
176    /// <p>With the exception of the optional starting asterisk, it must only contain the following characters: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>-</code> (hyphen).</p></li>
177    /// <li>
178    /// <p>It must be from 1-255 characters in length.</p></li>
179    /// </ul>
180    pub fn domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.inner = self.inner.domains(input.into());
182        self
183    }
184    /// <p>A list of domains to use in the update operation.</p><important>
185    /// <p>There is a limit of 1000 domains per request.</p>
186    /// </important>
187    /// <p>Each domain specification in your domain list must satisfy the following requirements:</p>
188    /// <ul>
189    /// <li>
190    /// <p>It can optionally start with <code>*</code> (asterisk).</p></li>
191    /// <li>
192    /// <p>With the exception of the optional starting asterisk, it must only contain the following characters: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>-</code> (hyphen).</p></li>
193    /// <li>
194    /// <p>It must be from 1-255 characters in length.</p></li>
195    /// </ul>
196    pub fn set_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
197        self.inner = self.inner.set_domains(input);
198        self
199    }
200    /// <p>A list of domains to use in the update operation.</p><important>
201    /// <p>There is a limit of 1000 domains per request.</p>
202    /// </important>
203    /// <p>Each domain specification in your domain list must satisfy the following requirements:</p>
204    /// <ul>
205    /// <li>
206    /// <p>It can optionally start with <code>*</code> (asterisk).</p></li>
207    /// <li>
208    /// <p>With the exception of the optional starting asterisk, it must only contain the following characters: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>-</code> (hyphen).</p></li>
209    /// <li>
210    /// <p>It must be from 1-255 characters in length.</p></li>
211    /// </ul>
212    pub fn get_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
213        self.inner.get_domains()
214    }
215}