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/route53resolver/Route53Resolver_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 Route53Resolver
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>In a <a
28    * href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html">CreateResolverRule</a>
29    * request, an array of the IPs that you want to forward DNS queries
30    * to.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/TargetAddress">AWS
32    * API Reference</a></p>
33    */
34   class AWS_ROUTE53RESOLVER_API TargetAddress
35   {
36   public:
37     TargetAddress();
38     TargetAddress(Aws::Utils::Json::JsonView jsonValue);
39     TargetAddress& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>One IP address that you want to forward DNS queries to. You can specify only
45      * IPv4 addresses.</p>
46      */
GetIp()47     inline const Aws::String& GetIp() const{ return m_ip; }
48 
49     /**
50      * <p>One IP address that you want to forward DNS queries to. You can specify only
51      * IPv4 addresses.</p>
52      */
IpHasBeenSet()53     inline bool IpHasBeenSet() const { return m_ipHasBeenSet; }
54 
55     /**
56      * <p>One IP address that you want to forward DNS queries to. You can specify only
57      * IPv4 addresses.</p>
58      */
SetIp(const Aws::String & value)59     inline void SetIp(const Aws::String& value) { m_ipHasBeenSet = true; m_ip = value; }
60 
61     /**
62      * <p>One IP address that you want to forward DNS queries to. You can specify only
63      * IPv4 addresses.</p>
64      */
SetIp(Aws::String && value)65     inline void SetIp(Aws::String&& value) { m_ipHasBeenSet = true; m_ip = std::move(value); }
66 
67     /**
68      * <p>One IP address that you want to forward DNS queries to. You can specify only
69      * IPv4 addresses.</p>
70      */
SetIp(const char * value)71     inline void SetIp(const char* value) { m_ipHasBeenSet = true; m_ip.assign(value); }
72 
73     /**
74      * <p>One IP address that you want to forward DNS queries to. You can specify only
75      * IPv4 addresses.</p>
76      */
WithIp(const Aws::String & value)77     inline TargetAddress& WithIp(const Aws::String& value) { SetIp(value); return *this;}
78 
79     /**
80      * <p>One IP address that you want to forward DNS queries to. You can specify only
81      * IPv4 addresses.</p>
82      */
WithIp(Aws::String && value)83     inline TargetAddress& WithIp(Aws::String&& value) { SetIp(std::move(value)); return *this;}
84 
85     /**
86      * <p>One IP address that you want to forward DNS queries to. You can specify only
87      * IPv4 addresses.</p>
88      */
WithIp(const char * value)89     inline TargetAddress& WithIp(const char* value) { SetIp(value); return *this;}
90 
91 
92     /**
93      * <p>The port at <code>Ip</code> that you want to forward DNS queries to.</p>
94      */
GetPort()95     inline int GetPort() const{ return m_port; }
96 
97     /**
98      * <p>The port at <code>Ip</code> that you want to forward DNS queries to.</p>
99      */
PortHasBeenSet()100     inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
101 
102     /**
103      * <p>The port at <code>Ip</code> that you want to forward DNS queries to.</p>
104      */
SetPort(int value)105     inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }
106 
107     /**
108      * <p>The port at <code>Ip</code> that you want to forward DNS queries to.</p>
109      */
WithPort(int value)110     inline TargetAddress& WithPort(int value) { SetPort(value); return *this;}
111 
112   private:
113 
114     Aws::String m_ip;
115     bool m_ipHasBeenSet;
116 
117     int m_port;
118     bool m_portHasBeenSet;
119   };
120 
121 } // namespace Model
122 } // namespace Route53Resolver
123 } // namespace Aws
124