AWS SDK for C++

AWS SDK for C++ Version 1.11.747

Loading...
Searching...
No Matches
WeightedTarget.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.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
32 public:
33 AWS_APPMESH_API WeightedTarget() = default;
34 AWS_APPMESH_API WeightedTarget(Aws::Utils::Json::JsonView jsonValue);
36 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline int GetPort() const { return m_port; }
43 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
44 inline void SetPort(int value) {
45 m_portHasBeenSet = true;
46 m_port = value;
47 }
48 inline WeightedTarget& WithPort(int value) {
49 SetPort(value);
50 return *this;
51 }
53
55
58 inline const Aws::String& GetVirtualNode() const { return m_virtualNode; }
59 inline bool VirtualNodeHasBeenSet() const { return m_virtualNodeHasBeenSet; }
60 template <typename VirtualNodeT = Aws::String>
61 void SetVirtualNode(VirtualNodeT&& value) {
62 m_virtualNodeHasBeenSet = true;
63 m_virtualNode = std::forward<VirtualNodeT>(value);
64 }
65 template <typename VirtualNodeT = Aws::String>
66 WeightedTarget& WithVirtualNode(VirtualNodeT&& value) {
67 SetVirtualNode(std::forward<VirtualNodeT>(value));
68 return *this;
69 }
71
73
76 inline int GetWeight() const { return m_weight; }
77 inline bool WeightHasBeenSet() const { return m_weightHasBeenSet; }
78 inline void SetWeight(int value) {
79 m_weightHasBeenSet = true;
80 m_weight = value;
81 }
82 inline WeightedTarget& WithWeight(int value) {
83 SetWeight(value);
84 return *this;
85 }
87 private:
88 int m_port{0};
89
90 Aws::String m_virtualNode;
91
92 int m_weight{0};
93 bool m_portHasBeenSet = false;
94 bool m_virtualNodeHasBeenSet = false;
95 bool m_weightHasBeenSet = false;
96};
97
98} // namespace Model
99} // namespace AppMesh
100} // namespace Aws
const Aws::String & GetVirtualNode() const
AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const
void SetVirtualNode(VirtualNodeT &&value)
AWS_APPMESH_API WeightedTarget()=default
WeightedTarget & WithWeight(int value)
WeightedTarget & WithVirtualNode(VirtualNodeT &&value)
AWS_APPMESH_API WeightedTarget & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_APPMESH_API WeightedTarget(Aws::Utils::Json::JsonView jsonValue)
WeightedTarget & WithPort(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue