AWS SDK for C++

AWS SDK for C++ Version 1.11.854

Loading...
Searching...
No Matches
MultiLocationConfig.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/synthetics/Synthetics_EXPORTS.h>
10#include <aws/synthetics/model/LocationType.h>
11#include <aws/synthetics/model/Replica.h>
12#include <aws/synthetics/model/ReplicationState.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace Synthetics {
24namespace Model {
25
34 public:
35 AWS_SYNTHETICS_API MultiLocationConfig() = default;
36 AWS_SYNTHETICS_API MultiLocationConfig(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SYNTHETICS_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
45 inline LocationType GetLocationType() const { return m_locationType; }
46 inline bool LocationTypeHasBeenSet() const { return m_locationTypeHasBeenSet; }
47 inline void SetLocationType(LocationType value) {
48 m_locationTypeHasBeenSet = true;
49 m_locationType = value;
50 }
52 SetLocationType(value);
53 return *this;
54 }
56
58
61 inline const Aws::String& GetPrimaryLocation() const { return m_primaryLocation; }
62 inline bool PrimaryLocationHasBeenSet() const { return m_primaryLocationHasBeenSet; }
63 template <typename PrimaryLocationT = Aws::String>
64 void SetPrimaryLocation(PrimaryLocationT&& value) {
65 m_primaryLocationHasBeenSet = true;
66 m_primaryLocation = std::forward<PrimaryLocationT>(value);
67 }
68 template <typename PrimaryLocationT = Aws::String>
69 MultiLocationConfig& WithPrimaryLocation(PrimaryLocationT&& value) {
70 SetPrimaryLocation(std::forward<PrimaryLocationT>(value));
71 return *this;
72 }
74
76
80 inline const Aws::Vector<Replica>& GetReplicas() const { return m_replicas; }
81 inline bool ReplicasHasBeenSet() const { return m_replicasHasBeenSet; }
82 template <typename ReplicasT = Aws::Vector<Replica>>
83 void SetReplicas(ReplicasT&& value) {
84 m_replicasHasBeenSet = true;
85 m_replicas = std::forward<ReplicasT>(value);
86 }
87 template <typename ReplicasT = Aws::Vector<Replica>>
88 MultiLocationConfig& WithReplicas(ReplicasT&& value) {
89 SetReplicas(std::forward<ReplicasT>(value));
90 return *this;
91 }
92 template <typename ReplicasT = Replica>
93 MultiLocationConfig& AddReplicas(ReplicasT&& value) {
94 m_replicasHasBeenSet = true;
95 m_replicas.emplace_back(std::forward<ReplicasT>(value));
96 return *this;
97 }
99
101
106 inline ReplicationState GetReplicationState() const { return m_replicationState; }
107 inline bool ReplicationStateHasBeenSet() const { return m_replicationStateHasBeenSet; }
109 m_replicationStateHasBeenSet = true;
110 m_replicationState = value;
111 }
113 SetReplicationState(value);
114 return *this;
115 }
117 private:
118 LocationType m_locationType{LocationType::NOT_SET};
119
120 Aws::String m_primaryLocation;
121
122 Aws::Vector<Replica> m_replicas;
123
125 bool m_locationTypeHasBeenSet = false;
126 bool m_primaryLocationHasBeenSet = false;
127 bool m_replicasHasBeenSet = false;
128 bool m_replicationStateHasBeenSet = false;
129};
130
131} // namespace Model
132} // namespace Synthetics
133} // namespace Aws
const Aws::Vector< Replica > & GetReplicas() const
AWS_SYNTHETICS_API MultiLocationConfig()=default
MultiLocationConfig & WithLocationType(LocationType value)
void SetPrimaryLocation(PrimaryLocationT &&value)
MultiLocationConfig & WithReplicas(ReplicasT &&value)
AWS_SYNTHETICS_API MultiLocationConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
MultiLocationConfig & WithPrimaryLocation(PrimaryLocationT &&value)
AWS_SYNTHETICS_API MultiLocationConfig(Aws::Utils::Json::JsonView jsonValue)
AWS_SYNTHETICS_API Aws::Utils::Json::JsonValue Jsonize() const
MultiLocationConfig & WithReplicationState(ReplicationState value)
MultiLocationConfig & AddReplicas(ReplicasT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue