1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/securityhub/SecurityHub_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace SecurityHub
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Provided if <code>ActionType</code> is <code>DNS_REQUEST</code>. It provides
28    * details about the DNS request that was detected.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26/DnsRequestAction">AWS
30    * API Reference</a></p>
31    */
32   class AWS_SECURITYHUB_API DnsRequestAction
33   {
34   public:
35     DnsRequestAction();
36     DnsRequestAction(Aws::Utils::Json::JsonView jsonValue);
37     DnsRequestAction& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * <p>The DNS domain that is associated with the DNS request.</p>
43      */
GetDomain()44     inline const Aws::String& GetDomain() const{ return m_domain; }
45 
46     /**
47      * <p>The DNS domain that is associated with the DNS request.</p>
48      */
DomainHasBeenSet()49     inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; }
50 
51     /**
52      * <p>The DNS domain that is associated with the DNS request.</p>
53      */
SetDomain(const Aws::String & value)54     inline void SetDomain(const Aws::String& value) { m_domainHasBeenSet = true; m_domain = value; }
55 
56     /**
57      * <p>The DNS domain that is associated with the DNS request.</p>
58      */
SetDomain(Aws::String && value)59     inline void SetDomain(Aws::String&& value) { m_domainHasBeenSet = true; m_domain = std::move(value); }
60 
61     /**
62      * <p>The DNS domain that is associated with the DNS request.</p>
63      */
SetDomain(const char * value)64     inline void SetDomain(const char* value) { m_domainHasBeenSet = true; m_domain.assign(value); }
65 
66     /**
67      * <p>The DNS domain that is associated with the DNS request.</p>
68      */
WithDomain(const Aws::String & value)69     inline DnsRequestAction& WithDomain(const Aws::String& value) { SetDomain(value); return *this;}
70 
71     /**
72      * <p>The DNS domain that is associated with the DNS request.</p>
73      */
WithDomain(Aws::String && value)74     inline DnsRequestAction& WithDomain(Aws::String&& value) { SetDomain(std::move(value)); return *this;}
75 
76     /**
77      * <p>The DNS domain that is associated with the DNS request.</p>
78      */
WithDomain(const char * value)79     inline DnsRequestAction& WithDomain(const char* value) { SetDomain(value); return *this;}
80 
81 
82     /**
83      * <p>The protocol that was used for the DNS request.</p>
84      */
GetProtocol()85     inline const Aws::String& GetProtocol() const{ return m_protocol; }
86 
87     /**
88      * <p>The protocol that was used for the DNS request.</p>
89      */
ProtocolHasBeenSet()90     inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
91 
92     /**
93      * <p>The protocol that was used for the DNS request.</p>
94      */
SetProtocol(const Aws::String & value)95     inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; }
96 
97     /**
98      * <p>The protocol that was used for the DNS request.</p>
99      */
SetProtocol(Aws::String && value)100     inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
101 
102     /**
103      * <p>The protocol that was used for the DNS request.</p>
104      */
SetProtocol(const char * value)105     inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); }
106 
107     /**
108      * <p>The protocol that was used for the DNS request.</p>
109      */
WithProtocol(const Aws::String & value)110     inline DnsRequestAction& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;}
111 
112     /**
113      * <p>The protocol that was used for the DNS request.</p>
114      */
WithProtocol(Aws::String && value)115     inline DnsRequestAction& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;}
116 
117     /**
118      * <p>The protocol that was used for the DNS request.</p>
119      */
WithProtocol(const char * value)120     inline DnsRequestAction& WithProtocol(const char* value) { SetProtocol(value); return *this;}
121 
122 
123     /**
124      * <p>Indicates whether the DNS request was blocked.</p>
125      */
GetBlocked()126     inline bool GetBlocked() const{ return m_blocked; }
127 
128     /**
129      * <p>Indicates whether the DNS request was blocked.</p>
130      */
BlockedHasBeenSet()131     inline bool BlockedHasBeenSet() const { return m_blockedHasBeenSet; }
132 
133     /**
134      * <p>Indicates whether the DNS request was blocked.</p>
135      */
SetBlocked(bool value)136     inline void SetBlocked(bool value) { m_blockedHasBeenSet = true; m_blocked = value; }
137 
138     /**
139      * <p>Indicates whether the DNS request was blocked.</p>
140      */
WithBlocked(bool value)141     inline DnsRequestAction& WithBlocked(bool value) { SetBlocked(value); return *this;}
142 
143   private:
144 
145     Aws::String m_domain;
146     bool m_domainHasBeenSet;
147 
148     Aws::String m_protocol;
149     bool m_protocolHasBeenSet;
150 
151     bool m_blocked;
152     bool m_blockedHasBeenSet;
153   };
154 
155 } // namespace Model
156 } // namespace SecurityHub
157 } // namespace Aws
158