AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
GlobalClusterMember.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/rds/RDS_EXPORTS.h>
11#include <aws/rds/model/GlobalClusterMemberSynchronizationStatus.h>
12#include <aws/rds/model/WriteForwardingStatus.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace RDS {
23namespace Model {
24
33 public:
34 AWS_RDS_API GlobalClusterMember() = default;
35 AWS_RDS_API GlobalClusterMember(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_RDS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_RDS_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
46 inline const Aws::String& GetDBClusterArn() const { return m_dBClusterArn; }
47 inline bool DBClusterArnHasBeenSet() const { return m_dBClusterArnHasBeenSet; }
48 template <typename DBClusterArnT = Aws::String>
49 void SetDBClusterArn(DBClusterArnT&& value) {
50 m_dBClusterArnHasBeenSet = true;
51 m_dBClusterArn = std::forward<DBClusterArnT>(value);
52 }
53 template <typename DBClusterArnT = Aws::String>
54 GlobalClusterMember& WithDBClusterArn(DBClusterArnT&& value) {
55 SetDBClusterArn(std::forward<DBClusterArnT>(value));
56 return *this;
57 }
59
61
65 inline const Aws::Vector<Aws::String>& GetReaders() const { return m_readers; }
66 inline bool ReadersHasBeenSet() const { return m_readersHasBeenSet; }
67 template <typename ReadersT = Aws::Vector<Aws::String>>
68 void SetReaders(ReadersT&& value) {
69 m_readersHasBeenSet = true;
70 m_readers = std::forward<ReadersT>(value);
71 }
72 template <typename ReadersT = Aws::Vector<Aws::String>>
73 GlobalClusterMember& WithReaders(ReadersT&& value) {
74 SetReaders(std::forward<ReadersT>(value));
75 return *this;
76 }
77 template <typename ReadersT = Aws::String>
78 GlobalClusterMember& AddReaders(ReadersT&& value) {
79 m_readersHasBeenSet = true;
80 m_readers.emplace_back(std::forward<ReadersT>(value));
81 return *this;
82 }
84
86
90 inline bool GetIsWriter() const { return m_isWriter; }
91 inline bool IsWriterHasBeenSet() const { return m_isWriterHasBeenSet; }
92 inline void SetIsWriter(bool value) {
93 m_isWriterHasBeenSet = true;
94 m_isWriter = value;
95 }
96 inline GlobalClusterMember& WithIsWriter(bool value) {
97 SetIsWriter(value);
98 return *this;
99 }
101
103
107 inline WriteForwardingStatus GetGlobalWriteForwardingStatus() const { return m_globalWriteForwardingStatus; }
108 inline bool GlobalWriteForwardingStatusHasBeenSet() const { return m_globalWriteForwardingStatusHasBeenSet; }
110 m_globalWriteForwardingStatusHasBeenSet = true;
111 m_globalWriteForwardingStatus = value;
112 }
115 return *this;
116 }
118
120
124 inline GlobalClusterMemberSynchronizationStatus GetSynchronizationStatus() const { return m_synchronizationStatus; }
125 inline bool SynchronizationStatusHasBeenSet() const { return m_synchronizationStatusHasBeenSet; }
127 m_synchronizationStatusHasBeenSet = true;
128 m_synchronizationStatus = value;
129 }
132 return *this;
133 }
135 private:
136 Aws::String m_dBClusterArn;
137
138 Aws::Vector<Aws::String> m_readers;
139
140 bool m_isWriter{false};
141
142 WriteForwardingStatus m_globalWriteForwardingStatus{WriteForwardingStatus::NOT_SET};
143
145 bool m_dBClusterArnHasBeenSet = false;
146 bool m_readersHasBeenSet = false;
147 bool m_isWriterHasBeenSet = false;
148 bool m_globalWriteForwardingStatusHasBeenSet = false;
149 bool m_synchronizationStatusHasBeenSet = false;
150};
151
152} // namespace Model
153} // namespace RDS
154} // namespace Aws
AWS_RDS_API GlobalClusterMember(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetSynchronizationStatus(GlobalClusterMemberSynchronizationStatus value)
AWS_RDS_API GlobalClusterMember & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
GlobalClusterMember & WithReaders(ReadersT &&value)
GlobalClusterMember & WithIsWriter(bool value)
void SetGlobalWriteForwardingStatus(WriteForwardingStatus value)
GlobalClusterMember & WithGlobalWriteForwardingStatus(WriteForwardingStatus value)
const Aws::Vector< Aws::String > & GetReaders() const
AWS_RDS_API GlobalClusterMember()=default
const Aws::String & GetDBClusterArn() const
GlobalClusterMember & AddReaders(ReadersT &&value)
AWS_RDS_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
GlobalClusterMember & WithDBClusterArn(DBClusterArnT &&value)
void SetDBClusterArn(DBClusterArnT &&value)
GlobalClusterMember & WithSynchronizationStatus(GlobalClusterMemberSynchronizationStatus value)
WriteForwardingStatus GetGlobalWriteForwardingStatus() const
AWS_RDS_API void OutputToStream(Aws::OStream &oStream, const char *location) const
GlobalClusterMemberSynchronizationStatus GetSynchronizationStatus() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream