aws_sdk_route53resolver/operation/create_firewall_rule/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_firewall_rule::_create_firewall_rule_output::CreateFirewallRuleOutputBuilder;
3
4pub use crate::operation::create_firewall_rule::_create_firewall_rule_input::CreateFirewallRuleInputBuilder;
5
6impl crate::operation::create_firewall_rule::builders::CreateFirewallRuleInputBuilder {
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_firewall_rule::CreateFirewallRuleOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_firewall_rule::CreateFirewallRuleError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_firewall_rule();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateFirewallRule`.
24///
25/// <p>Creates a single DNS Firewall rule in the specified rule group, using the specified domain list.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateFirewallRuleFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_firewall_rule::builders::CreateFirewallRuleInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_firewall_rule::CreateFirewallRuleOutput,
35        crate::operation::create_firewall_rule::CreateFirewallRuleError,
36    > for CreateFirewallRuleFluentBuilder
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_firewall_rule::CreateFirewallRuleOutput,
44            crate::operation::create_firewall_rule::CreateFirewallRuleError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateFirewallRuleFluentBuilder {
51    /// Creates a new `CreateFirewallRuleFluentBuilder`.
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 CreateFirewallRule as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_firewall_rule::builders::CreateFirewallRuleInputBuilder {
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::create_firewall_rule::CreateFirewallRuleOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_firewall_rule::CreateFirewallRuleError,
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::create_firewall_rule::CreateFirewallRule::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_firewall_rule::CreateFirewallRule::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::create_firewall_rule::CreateFirewallRuleOutput,
97        crate::operation::create_firewall_rule::CreateFirewallRuleError,
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>A unique string that identifies the request and that allows you to retry failed requests without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
112    pub fn creator_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.creator_request_id(input.into());
114        self
115    }
116    /// <p>A unique string that identifies the request and that allows you to retry failed requests without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
117    pub fn set_creator_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_creator_request_id(input);
119        self
120    }
121    /// <p>A unique string that identifies the request and that allows you to retry failed requests without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string, for example, a date/time stamp.</p>
122    pub fn get_creator_request_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_creator_request_id()
124    }
125    /// <p>The unique identifier of the firewall rule group where you want to create the rule.</p>
126    pub fn firewall_rule_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.firewall_rule_group_id(input.into());
128        self
129    }
130    /// <p>The unique identifier of the firewall rule group where you want to create the rule.</p>
131    pub fn set_firewall_rule_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_firewall_rule_group_id(input);
133        self
134    }
135    /// <p>The unique identifier of the firewall rule group where you want to create the rule.</p>
136    pub fn get_firewall_rule_group_id(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_firewall_rule_group_id()
138    }
139    /// <p>The ID of the domain list that you want to use in the rule. Can't be used together with <code>DnsThreatProtecton</code>.</p>
140    pub fn firewall_domain_list_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.firewall_domain_list_id(input.into());
142        self
143    }
144    /// <p>The ID of the domain list that you want to use in the rule. Can't be used together with <code>DnsThreatProtecton</code>.</p>
145    pub fn set_firewall_domain_list_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_firewall_domain_list_id(input);
147        self
148    }
149    /// <p>The ID of the domain list that you want to use in the rule. Can't be used together with <code>DnsThreatProtecton</code>.</p>
150    pub fn get_firewall_domain_list_id(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_firewall_domain_list_id()
152    }
153    /// <p>The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.</p>
154    /// <p>You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the rules in a rule group at any time.</p>
155    pub fn priority(mut self, input: i32) -> Self {
156        self.inner = self.inner.priority(input);
157        self
158    }
159    /// <p>The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.</p>
160    /// <p>You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the rules in a rule group at any time.</p>
161    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
162        self.inner = self.inner.set_priority(input);
163        self
164    }
165    /// <p>The setting that determines the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest setting.</p>
166    /// <p>You must specify a unique priority for each rule in a rule group. To make it easier to insert rules later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for the rules in a rule group at any time.</p>
167    pub fn get_priority(&self) -> &::std::option::Option<i32> {
168        self.inner.get_priority()
169    }
170    /// <p>The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list, or a threat in a DNS Firewall Advanced rule:</p>
171    /// <ul>
172    /// <li>
173    /// <p><code>ALLOW</code> - Permit the request to go through. Not available for DNS Firewall Advanced rules.</p></li>
174    /// <li>
175    /// <p><code>ALERT</code> - Permit the request and send metrics and logs to Cloud Watch.</p></li>
176    /// <li>
177    /// <p><code>BLOCK</code> - Disallow the request. This option requires additional details in the rule's <code>BlockResponse</code>.</p></li>
178    /// </ul>
179    pub fn action(mut self, input: crate::types::Action) -> Self {
180        self.inner = self.inner.action(input);
181        self
182    }
183    /// <p>The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list, or a threat in a DNS Firewall Advanced rule:</p>
184    /// <ul>
185    /// <li>
186    /// <p><code>ALLOW</code> - Permit the request to go through. Not available for DNS Firewall Advanced rules.</p></li>
187    /// <li>
188    /// <p><code>ALERT</code> - Permit the request and send metrics and logs to Cloud Watch.</p></li>
189    /// <li>
190    /// <p><code>BLOCK</code> - Disallow the request. This option requires additional details in the rule's <code>BlockResponse</code>.</p></li>
191    /// </ul>
192    pub fn set_action(mut self, input: ::std::option::Option<crate::types::Action>) -> Self {
193        self.inner = self.inner.set_action(input);
194        self
195    }
196    /// <p>The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list, or a threat in a DNS Firewall Advanced rule:</p>
197    /// <ul>
198    /// <li>
199    /// <p><code>ALLOW</code> - Permit the request to go through. Not available for DNS Firewall Advanced rules.</p></li>
200    /// <li>
201    /// <p><code>ALERT</code> - Permit the request and send metrics and logs to Cloud Watch.</p></li>
202    /// <li>
203    /// <p><code>BLOCK</code> - Disallow the request. This option requires additional details in the rule's <code>BlockResponse</code>.</p></li>
204    /// </ul>
205    pub fn get_action(&self) -> &::std::option::Option<crate::types::Action> {
206        self.inner.get_action()
207    }
208    /// <p>The way that you want DNS Firewall to block the request, used with the rule action setting <code>BLOCK</code>.</p>
209    /// <ul>
210    /// <li>
211    /// <p><code>NODATA</code> - Respond indicating that the query was successful, but no response is available for it.</p></li>
212    /// <li>
213    /// <p><code>NXDOMAIN</code> - Respond indicating that the domain name that's in the query doesn't exist.</p></li>
214    /// <li>
215    /// <p><code>OVERRIDE</code> - Provide a custom override in the response. This option requires custom handling details in the rule's <code>BlockOverride*</code> settings.</p></li>
216    /// </ul>
217    /// <p>This setting is required if the rule action setting is <code>BLOCK</code>.</p>
218    pub fn block_response(mut self, input: crate::types::BlockResponse) -> Self {
219        self.inner = self.inner.block_response(input);
220        self
221    }
222    /// <p>The way that you want DNS Firewall to block the request, used with the rule action setting <code>BLOCK</code>.</p>
223    /// <ul>
224    /// <li>
225    /// <p><code>NODATA</code> - Respond indicating that the query was successful, but no response is available for it.</p></li>
226    /// <li>
227    /// <p><code>NXDOMAIN</code> - Respond indicating that the domain name that's in the query doesn't exist.</p></li>
228    /// <li>
229    /// <p><code>OVERRIDE</code> - Provide a custom override in the response. This option requires custom handling details in the rule's <code>BlockOverride*</code> settings.</p></li>
230    /// </ul>
231    /// <p>This setting is required if the rule action setting is <code>BLOCK</code>.</p>
232    pub fn set_block_response(mut self, input: ::std::option::Option<crate::types::BlockResponse>) -> Self {
233        self.inner = self.inner.set_block_response(input);
234        self
235    }
236    /// <p>The way that you want DNS Firewall to block the request, used with the rule action setting <code>BLOCK</code>.</p>
237    /// <ul>
238    /// <li>
239    /// <p><code>NODATA</code> - Respond indicating that the query was successful, but no response is available for it.</p></li>
240    /// <li>
241    /// <p><code>NXDOMAIN</code> - Respond indicating that the domain name that's in the query doesn't exist.</p></li>
242    /// <li>
243    /// <p><code>OVERRIDE</code> - Provide a custom override in the response. This option requires custom handling details in the rule's <code>BlockOverride*</code> settings.</p></li>
244    /// </ul>
245    /// <p>This setting is required if the rule action setting is <code>BLOCK</code>.</p>
246    pub fn get_block_response(&self) -> &::std::option::Option<crate::types::BlockResponse> {
247        self.inner.get_block_response()
248    }
249    /// <p>The custom DNS record to send back in response to the query. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
250    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
251    pub fn block_override_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252        self.inner = self.inner.block_override_domain(input.into());
253        self
254    }
255    /// <p>The custom DNS record to send back in response to the query. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
256    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
257    pub fn set_block_override_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.inner = self.inner.set_block_override_domain(input);
259        self
260    }
261    /// <p>The custom DNS record to send back in response to the query. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
262    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
263    pub fn get_block_override_domain(&self) -> &::std::option::Option<::std::string::String> {
264        self.inner.get_block_override_domain()
265    }
266    /// <p>The DNS record's type. This determines the format of the record value that you provided in <code>BlockOverrideDomain</code>. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
267    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
268    pub fn block_override_dns_type(mut self, input: crate::types::BlockOverrideDnsType) -> Self {
269        self.inner = self.inner.block_override_dns_type(input);
270        self
271    }
272    /// <p>The DNS record's type. This determines the format of the record value that you provided in <code>BlockOverrideDomain</code>. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
273    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
274    pub fn set_block_override_dns_type(mut self, input: ::std::option::Option<crate::types::BlockOverrideDnsType>) -> Self {
275        self.inner = self.inner.set_block_override_dns_type(input);
276        self
277    }
278    /// <p>The DNS record's type. This determines the format of the record value that you provided in <code>BlockOverrideDomain</code>. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
279    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
280    pub fn get_block_override_dns_type(&self) -> &::std::option::Option<crate::types::BlockOverrideDnsType> {
281        self.inner.get_block_override_dns_type()
282    }
283    /// <p>The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
284    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
285    pub fn block_override_ttl(mut self, input: i32) -> Self {
286        self.inner = self.inner.block_override_ttl(input);
287        self
288    }
289    /// <p>The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
290    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
291    pub fn set_block_override_ttl(mut self, input: ::std::option::Option<i32>) -> Self {
292        self.inner = self.inner.set_block_override_ttl(input);
293        self
294    }
295    /// <p>The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Used for the rule action <code>BLOCK</code> with a <code>BlockResponse</code> setting of <code>OVERRIDE</code>.</p>
296    /// <p>This setting is required if the <code>BlockResponse</code> setting is <code>OVERRIDE</code>.</p>
297    pub fn get_block_override_ttl(&self) -> &::std::option::Option<i32> {
298        self.inner.get_block_override_ttl()
299    }
300    /// <p>A name that lets you identify the rule in the rule group.</p>
301    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
302        self.inner = self.inner.name(input.into());
303        self
304    }
305    /// <p>A name that lets you identify the rule in the rule group.</p>
306    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
307        self.inner = self.inner.set_name(input);
308        self
309    }
310    /// <p>A name that lets you identify the rule in the rule group.</p>
311    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
312        self.inner.get_name()
313    }
314    /// <p>How you want the the rule to evaluate DNS redirection in the DNS redirection chain, such as CNAME or DNAME.</p>
315    /// <p><code>INSPECT_REDIRECTION_DOMAIN</code>: (Default) inspects all domains in the redirection chain. The individual domains in the redirection chain must be added to the domain list.</p>
316    /// <p><code>TRUST_REDIRECTION_DOMAIN</code>: Inspects only the first domain in the redirection chain. You don't need to add the subsequent domains in the domain in the redirection list to the domain list.</p>
317    pub fn firewall_domain_redirection_action(mut self, input: crate::types::FirewallDomainRedirectionAction) -> Self {
318        self.inner = self.inner.firewall_domain_redirection_action(input);
319        self
320    }
321    /// <p>How you want the the rule to evaluate DNS redirection in the DNS redirection chain, such as CNAME or DNAME.</p>
322    /// <p><code>INSPECT_REDIRECTION_DOMAIN</code>: (Default) inspects all domains in the redirection chain. The individual domains in the redirection chain must be added to the domain list.</p>
323    /// <p><code>TRUST_REDIRECTION_DOMAIN</code>: Inspects only the first domain in the redirection chain. You don't need to add the subsequent domains in the domain in the redirection list to the domain list.</p>
324    pub fn set_firewall_domain_redirection_action(mut self, input: ::std::option::Option<crate::types::FirewallDomainRedirectionAction>) -> Self {
325        self.inner = self.inner.set_firewall_domain_redirection_action(input);
326        self
327    }
328    /// <p>How you want the the rule to evaluate DNS redirection in the DNS redirection chain, such as CNAME or DNAME.</p>
329    /// <p><code>INSPECT_REDIRECTION_DOMAIN</code>: (Default) inspects all domains in the redirection chain. The individual domains in the redirection chain must be added to the domain list.</p>
330    /// <p><code>TRUST_REDIRECTION_DOMAIN</code>: Inspects only the first domain in the redirection chain. You don't need to add the subsequent domains in the domain in the redirection list to the domain list.</p>
331    pub fn get_firewall_domain_redirection_action(&self) -> &::std::option::Option<crate::types::FirewallDomainRedirectionAction> {
332        self.inner.get_firewall_domain_redirection_action()
333    }
334    /// <p>The DNS query type you want the rule to evaluate. Allowed values are;</p>
335    /// <ul>
336    /// <li>
337    /// <p>A: Returns an IPv4 address.</p></li>
338    /// <li>
339    /// <p>AAAA: Returns an Ipv6 address.</p></li>
340    /// <li>
341    /// <p>CAA: Restricts CAs that can create SSL/TLS certifications for the domain.</p></li>
342    /// <li>
343    /// <p>CNAME: Returns another domain name.</p></li>
344    /// <li>
345    /// <p>DS: Record that identifies the DNSSEC signing key of a delegated zone.</p></li>
346    /// <li>
347    /// <p>MX: Specifies mail servers.</p></li>
348    /// <li>
349    /// <p>NAPTR: Regular-expression-based rewriting of domain names.</p></li>
350    /// <li>
351    /// <p>NS: Authoritative name servers.</p></li>
352    /// <li>
353    /// <p>PTR: Maps an IP address to a domain name.</p></li>
354    /// <li>
355    /// <p>SOA: Start of authority record for the zone.</p></li>
356    /// <li>
357    /// <p>SPF: Lists the servers authorized to send emails from a domain.</p></li>
358    /// <li>
359    /// <p>SRV: Application specific values that identify servers.</p></li>
360    /// <li>
361    /// <p>TXT: Verifies email senders and application-specific values.</p></li>
362    /// <li>
363    /// <p>A query type you define by using the DNS type ID, for example 28 for AAAA. The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for example, TYPE28. For more information, see <a href="https://en.wikipedia.org/wiki/List_of_DNS_record_types">List of DNS record types</a>.</p></li>
364    /// </ul>
365    pub fn qtype(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
366        self.inner = self.inner.qtype(input.into());
367        self
368    }
369    /// <p>The DNS query type you want the rule to evaluate. Allowed values are;</p>
370    /// <ul>
371    /// <li>
372    /// <p>A: Returns an IPv4 address.</p></li>
373    /// <li>
374    /// <p>AAAA: Returns an Ipv6 address.</p></li>
375    /// <li>
376    /// <p>CAA: Restricts CAs that can create SSL/TLS certifications for the domain.</p></li>
377    /// <li>
378    /// <p>CNAME: Returns another domain name.</p></li>
379    /// <li>
380    /// <p>DS: Record that identifies the DNSSEC signing key of a delegated zone.</p></li>
381    /// <li>
382    /// <p>MX: Specifies mail servers.</p></li>
383    /// <li>
384    /// <p>NAPTR: Regular-expression-based rewriting of domain names.</p></li>
385    /// <li>
386    /// <p>NS: Authoritative name servers.</p></li>
387    /// <li>
388    /// <p>PTR: Maps an IP address to a domain name.</p></li>
389    /// <li>
390    /// <p>SOA: Start of authority record for the zone.</p></li>
391    /// <li>
392    /// <p>SPF: Lists the servers authorized to send emails from a domain.</p></li>
393    /// <li>
394    /// <p>SRV: Application specific values that identify servers.</p></li>
395    /// <li>
396    /// <p>TXT: Verifies email senders and application-specific values.</p></li>
397    /// <li>
398    /// <p>A query type you define by using the DNS type ID, for example 28 for AAAA. The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for example, TYPE28. For more information, see <a href="https://en.wikipedia.org/wiki/List_of_DNS_record_types">List of DNS record types</a>.</p></li>
399    /// </ul>
400    pub fn set_qtype(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
401        self.inner = self.inner.set_qtype(input);
402        self
403    }
404    /// <p>The DNS query type you want the rule to evaluate. Allowed values are;</p>
405    /// <ul>
406    /// <li>
407    /// <p>A: Returns an IPv4 address.</p></li>
408    /// <li>
409    /// <p>AAAA: Returns an Ipv6 address.</p></li>
410    /// <li>
411    /// <p>CAA: Restricts CAs that can create SSL/TLS certifications for the domain.</p></li>
412    /// <li>
413    /// <p>CNAME: Returns another domain name.</p></li>
414    /// <li>
415    /// <p>DS: Record that identifies the DNSSEC signing key of a delegated zone.</p></li>
416    /// <li>
417    /// <p>MX: Specifies mail servers.</p></li>
418    /// <li>
419    /// <p>NAPTR: Regular-expression-based rewriting of domain names.</p></li>
420    /// <li>
421    /// <p>NS: Authoritative name servers.</p></li>
422    /// <li>
423    /// <p>PTR: Maps an IP address to a domain name.</p></li>
424    /// <li>
425    /// <p>SOA: Start of authority record for the zone.</p></li>
426    /// <li>
427    /// <p>SPF: Lists the servers authorized to send emails from a domain.</p></li>
428    /// <li>
429    /// <p>SRV: Application specific values that identify servers.</p></li>
430    /// <li>
431    /// <p>TXT: Verifies email senders and application-specific values.</p></li>
432    /// <li>
433    /// <p>A query type you define by using the DNS type ID, for example 28 for AAAA. The values must be defined as TYPENUMBER, where the NUMBER can be 1-65334, for example, TYPE28. For more information, see <a href="https://en.wikipedia.org/wiki/List_of_DNS_record_types">List of DNS record types</a>.</p></li>
434    /// </ul>
435    pub fn get_qtype(&self) -> &::std::option::Option<::std::string::String> {
436        self.inner.get_qtype()
437    }
438    /// <p>Use to create a DNS Firewall Advanced rule.</p>
439    pub fn dns_threat_protection(mut self, input: crate::types::DnsThreatProtection) -> Self {
440        self.inner = self.inner.dns_threat_protection(input);
441        self
442    }
443    /// <p>Use to create a DNS Firewall Advanced rule.</p>
444    pub fn set_dns_threat_protection(mut self, input: ::std::option::Option<crate::types::DnsThreatProtection>) -> Self {
445        self.inner = self.inner.set_dns_threat_protection(input);
446        self
447    }
448    /// <p>Use to create a DNS Firewall Advanced rule.</p>
449    pub fn get_dns_threat_protection(&self) -> &::std::option::Option<crate::types::DnsThreatProtection> {
450        self.inner.get_dns_threat_protection()
451    }
452    /// <p>The confidence threshold for DNS Firewall Advanced. You must provide this value when you create a DNS Firewall Advanced rule. The confidence level values mean:</p>
453    /// <ul>
454    /// <li>
455    /// <p><code>LOW</code>: Provides the highest detection rate for threats, but also increases false positives.</p></li>
456    /// <li>
457    /// <p><code>MEDIUM</code>: Provides a balance between detecting threats and false positives.</p></li>
458    /// <li>
459    /// <p><code>HIGH</code>: Detects only the most well corroborated threats with a low rate of false positives.</p></li>
460    /// </ul>
461    pub fn confidence_threshold(mut self, input: crate::types::ConfidenceThreshold) -> Self {
462        self.inner = self.inner.confidence_threshold(input);
463        self
464    }
465    /// <p>The confidence threshold for DNS Firewall Advanced. You must provide this value when you create a DNS Firewall Advanced rule. The confidence level values mean:</p>
466    /// <ul>
467    /// <li>
468    /// <p><code>LOW</code>: Provides the highest detection rate for threats, but also increases false positives.</p></li>
469    /// <li>
470    /// <p><code>MEDIUM</code>: Provides a balance between detecting threats and false positives.</p></li>
471    /// <li>
472    /// <p><code>HIGH</code>: Detects only the most well corroborated threats with a low rate of false positives.</p></li>
473    /// </ul>
474    pub fn set_confidence_threshold(mut self, input: ::std::option::Option<crate::types::ConfidenceThreshold>) -> Self {
475        self.inner = self.inner.set_confidence_threshold(input);
476        self
477    }
478    /// <p>The confidence threshold for DNS Firewall Advanced. You must provide this value when you create a DNS Firewall Advanced rule. The confidence level values mean:</p>
479    /// <ul>
480    /// <li>
481    /// <p><code>LOW</code>: Provides the highest detection rate for threats, but also increases false positives.</p></li>
482    /// <li>
483    /// <p><code>MEDIUM</code>: Provides a balance between detecting threats and false positives.</p></li>
484    /// <li>
485    /// <p><code>HIGH</code>: Detects only the most well corroborated threats with a low rate of false positives.</p></li>
486    /// </ul>
487    pub fn get_confidence_threshold(&self) -> &::std::option::Option<crate::types::ConfidenceThreshold> {
488        self.inner.get_confidence_threshold()
489    }
490}