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/elasticmapreduce/EMR_EXPORTS.h>
8 
9 namespace Aws
10 {
11 namespace Utils
12 {
13 namespace Json
14 {
15   class JsonValue;
16   class JsonView;
17 } // namespace Json
18 } // namespace Utils
19 namespace EMR
20 {
21 namespace Model
22 {
23 
24   /**
25    * <p>A list of port ranges that are permitted to allow inbound traffic from all
26    * public IP addresses. To specify a single port, use the same value for
27    * <code>MinRange</code> and <code>MaxRange</code>.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PortRange">AWS
29    * API Reference</a></p>
30    */
31   class AWS_EMR_API PortRange
32   {
33   public:
34     PortRange();
35     PortRange(Aws::Utils::Json::JsonView jsonValue);
36     PortRange& operator=(Aws::Utils::Json::JsonView jsonValue);
37     Aws::Utils::Json::JsonValue Jsonize() const;
38 
39 
40     /**
41      * <p>The smallest port number in a specified range of port numbers.</p>
42      */
GetMinRange()43     inline int GetMinRange() const{ return m_minRange; }
44 
45     /**
46      * <p>The smallest port number in a specified range of port numbers.</p>
47      */
MinRangeHasBeenSet()48     inline bool MinRangeHasBeenSet() const { return m_minRangeHasBeenSet; }
49 
50     /**
51      * <p>The smallest port number in a specified range of port numbers.</p>
52      */
SetMinRange(int value)53     inline void SetMinRange(int value) { m_minRangeHasBeenSet = true; m_minRange = value; }
54 
55     /**
56      * <p>The smallest port number in a specified range of port numbers.</p>
57      */
WithMinRange(int value)58     inline PortRange& WithMinRange(int value) { SetMinRange(value); return *this;}
59 
60 
61     /**
62      * <p>The smallest port number in a specified range of port numbers.</p>
63      */
GetMaxRange()64     inline int GetMaxRange() const{ return m_maxRange; }
65 
66     /**
67      * <p>The smallest port number in a specified range of port numbers.</p>
68      */
MaxRangeHasBeenSet()69     inline bool MaxRangeHasBeenSet() const { return m_maxRangeHasBeenSet; }
70 
71     /**
72      * <p>The smallest port number in a specified range of port numbers.</p>
73      */
SetMaxRange(int value)74     inline void SetMaxRange(int value) { m_maxRangeHasBeenSet = true; m_maxRange = value; }
75 
76     /**
77      * <p>The smallest port number in a specified range of port numbers.</p>
78      */
WithMaxRange(int value)79     inline PortRange& WithMaxRange(int value) { SetMaxRange(value); return *this;}
80 
81   private:
82 
83     int m_minRange;
84     bool m_minRangeHasBeenSet;
85 
86     int m_maxRange;
87     bool m_maxRangeHasBeenSet;
88   };
89 
90 } // namespace Model
91 } // namespace EMR
92 } // namespace Aws
93