AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
PortMapping.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/appmesh/model/PortProtocol.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace AppMesh {
20namespace Model {
21
28 public:
29 AWS_APPMESH_API PortMapping() = default;
30 AWS_APPMESH_API PortMapping(Aws::Utils::Json::JsonView jsonValue);
32 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
33
35
38 inline int GetPort() const { return m_port; }
39 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
40 inline void SetPort(int value) {
41 m_portHasBeenSet = true;
42 m_port = value;
43 }
44 inline PortMapping& WithPort(int value) {
45 SetPort(value);
46 return *this;
47 }
49
51
54 inline PortProtocol GetProtocol() const { return m_protocol; }
55 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
56 inline void SetProtocol(PortProtocol value) {
57 m_protocolHasBeenSet = true;
58 m_protocol = value;
59 }
61 SetProtocol(value);
62 return *this;
63 }
65 private:
66 int m_port{0};
67
69 bool m_portHasBeenSet = false;
70 bool m_protocolHasBeenSet = false;
71};
72
73} // namespace Model
74} // namespace AppMesh
75} // namespace Aws
AWS_APPMESH_API PortMapping(Aws::Utils::Json::JsonView jsonValue)
AWS_APPMESH_API PortMapping()=default
void SetProtocol(PortProtocol value)
Definition PortMapping.h:56
AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const
PortMapping & WithProtocol(PortProtocol value)
Definition PortMapping.h:60
AWS_APPMESH_API PortMapping & operator=(Aws::Utils::Json::JsonView jsonValue)
PortMapping & WithPort(int value)
Definition PortMapping.h:44
PortProtocol GetProtocol() const
Definition PortMapping.h:54
Aws::Utils::Json::JsonValue JsonValue