AWS SDK for C++

AWS SDK for C++ Version 1.11.612

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#include <utility>
10
11namespace Aws
12{
13namespace Utils
14{
15namespace Json
16{
17 class JsonValue;
18 class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace AppMesh
22{
23namespace Model
24{
25
36 {
37 public:
38 AWS_APPMESH_API WeightedTarget() = default;
39 AWS_APPMESH_API WeightedTarget(Aws::Utils::Json::JsonView jsonValue);
41 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline int GetPort() const { return m_port; }
49 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
50 inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }
51 inline WeightedTarget& WithPort(int value) { SetPort(value); return *this;}
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) { m_virtualNodeHasBeenSet = true; m_virtualNode = std::forward<VirtualNodeT>(value); }
62 template<typename VirtualNodeT = Aws::String>
63 WeightedTarget& WithVirtualNode(VirtualNodeT&& value) { SetVirtualNode(std::forward<VirtualNodeT>(value)); return *this;}
65
67
70 inline int GetWeight() const { return m_weight; }
71 inline bool WeightHasBeenSet() const { return m_weightHasBeenSet; }
72 inline void SetWeight(int value) { m_weightHasBeenSet = true; m_weight = value; }
73 inline WeightedTarget& WithWeight(int value) { SetWeight(value); return *this;}
75 private:
76
77 int m_port{0};
78 bool m_portHasBeenSet = false;
79
80 Aws::String m_virtualNode;
81 bool m_virtualNodeHasBeenSet = false;
82
83 int m_weight{0};
84 bool m_weightHasBeenSet = false;
85 };
86
87} // namespace Model
88} // namespace AppMesh
89} // 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