AWS SDK for C++  0.14.3
AWS SDK for C++
IpPermission.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace GameLift
30 {
31 namespace Model
32 {
33 
42  {
43  public:
44  IpPermission();
45  IpPermission(const Aws::Utils::Json::JsonValue& jsonValue);
46  IpPermission& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
52  inline int GetFromPort() const{ return m_fromPort; }
53 
57  inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; }
58 
62  inline IpPermission& WithFromPort(int value) { SetFromPort(value); return *this;}
63 
68  inline int GetToPort() const{ return m_toPort; }
69 
74  inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; }
75 
80  inline IpPermission& WithToPort(int value) { SetToPort(value); return *this;}
81 
88  inline const Aws::String& GetIpRange() const{ return m_ipRange; }
89 
96  inline void SetIpRange(const Aws::String& value) { m_ipRangeHasBeenSet = true; m_ipRange = value; }
97 
104  inline void SetIpRange(Aws::String&& value) { m_ipRangeHasBeenSet = true; m_ipRange = value; }
105 
112  inline void SetIpRange(const char* value) { m_ipRangeHasBeenSet = true; m_ipRange.assign(value); }
113 
120  inline IpPermission& WithIpRange(const Aws::String& value) { SetIpRange(value); return *this;}
121 
128  inline IpPermission& WithIpRange(Aws::String&& value) { SetIpRange(value); return *this;}
129 
136  inline IpPermission& WithIpRange(const char* value) { SetIpRange(value); return *this;}
137 
141  inline const IpProtocol& GetProtocol() const{ return m_protocol; }
142 
146  inline void SetProtocol(const IpProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; }
147 
151  inline void SetProtocol(IpProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = value; }
152 
156  inline IpPermission& WithProtocol(const IpProtocol& value) { SetProtocol(value); return *this;}
157 
161  inline IpPermission& WithProtocol(IpProtocol&& value) { SetProtocol(value); return *this;}
162 
163  private:
164  int m_fromPort;
165  bool m_fromPortHasBeenSet;
166  int m_toPort;
167  bool m_toPortHasBeenSet;
168  Aws::String m_ipRange;
169  bool m_ipRangeHasBeenSet;
170  IpProtocol m_protocol;
171  bool m_protocolHasBeenSet;
172  };
173 
174 } // namespace Model
175 } // namespace GameLift
176 } // namespace Aws
IpPermission & WithProtocol(IpProtocol &&value)
Definition: IpPermission.h:161
#define AWS_GAMELIFT_API
IpPermission & WithIpRange(Aws::String &&value)
Definition: IpPermission.h:128
IpPermission & WithToPort(int value)
Definition: IpPermission.h:80
IpPermission & WithIpRange(const char *value)
Definition: IpPermission.h:136
void SetProtocol(const IpProtocol &value)
Definition: IpPermission.h:146
IpPermission & WithProtocol(const IpProtocol &value)
Definition: IpPermission.h:156
IpPermission & WithIpRange(const Aws::String &value)
Definition: IpPermission.h:120
const IpProtocol & GetProtocol() const
Definition: IpPermission.h:141
const Aws::String & GetIpRange() const
Definition: IpPermission.h:88
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
IpPermission & WithFromPort(int value)
Definition: IpPermission.h:62
void SetIpRange(Aws::String &&value)
Definition: IpPermission.h:104
void SetIpRange(const Aws::String &value)
Definition: IpPermission.h:96
void SetProtocol(IpProtocol &&value)
Definition: IpPermission.h:151
JSON (JavaScript Object Notation).
void SetIpRange(const char *value)
Definition: IpPermission.h:112