AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
ResourceSyncAttempt.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/proton/Proton_EXPORTS.h>
11#include <aws/proton/model/ResourceSyncEvent.h>
12#include <aws/proton/model/ResourceSyncStatus.h>
13#include <aws/proton/model/Revision.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Proton {
25namespace Model {
26
34 public:
35 AWS_PROTON_API ResourceSyncAttempt() = default;
38 AWS_PROTON_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::Vector<ResourceSyncEvent>& GetEvents() const { return m_events; }
45 inline bool EventsHasBeenSet() const { return m_eventsHasBeenSet; }
46 template <typename EventsT = Aws::Vector<ResourceSyncEvent>>
47 void SetEvents(EventsT&& value) {
48 m_eventsHasBeenSet = true;
49 m_events = std::forward<EventsT>(value);
50 }
51 template <typename EventsT = Aws::Vector<ResourceSyncEvent>>
52 ResourceSyncAttempt& WithEvents(EventsT&& value) {
53 SetEvents(std::forward<EventsT>(value));
54 return *this;
55 }
56 template <typename EventsT = ResourceSyncEvent>
57 ResourceSyncAttempt& AddEvents(EventsT&& value) {
58 m_eventsHasBeenSet = true;
59 m_events.emplace_back(std::forward<EventsT>(value));
60 return *this;
61 }
63
65
68 inline const Revision& GetInitialRevision() const { return m_initialRevision; }
69 inline bool InitialRevisionHasBeenSet() const { return m_initialRevisionHasBeenSet; }
70 template <typename InitialRevisionT = Revision>
71 void SetInitialRevision(InitialRevisionT&& value) {
72 m_initialRevisionHasBeenSet = true;
73 m_initialRevision = std::forward<InitialRevisionT>(value);
74 }
75 template <typename InitialRevisionT = Revision>
76 ResourceSyncAttempt& WithInitialRevision(InitialRevisionT&& value) {
77 SetInitialRevision(std::forward<InitialRevisionT>(value));
78 return *this;
79 }
81
83
86 inline const Aws::Utils::DateTime& GetStartedAt() const { return m_startedAt; }
87 inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; }
88 template <typename StartedAtT = Aws::Utils::DateTime>
89 void SetStartedAt(StartedAtT&& value) {
90 m_startedAtHasBeenSet = true;
91 m_startedAt = std::forward<StartedAtT>(value);
92 }
93 template <typename StartedAtT = Aws::Utils::DateTime>
94 ResourceSyncAttempt& WithStartedAt(StartedAtT&& value) {
95 SetStartedAt(std::forward<StartedAtT>(value));
96 return *this;
97 }
99
101
104 inline ResourceSyncStatus GetStatus() const { return m_status; }
105 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
106 inline void SetStatus(ResourceSyncStatus value) {
107 m_statusHasBeenSet = true;
108 m_status = value;
109 }
111 SetStatus(value);
112 return *this;
113 }
115
117
120 inline const Aws::String& GetTarget() const { return m_target; }
121 inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; }
122 template <typename TargetT = Aws::String>
123 void SetTarget(TargetT&& value) {
124 m_targetHasBeenSet = true;
125 m_target = std::forward<TargetT>(value);
126 }
127 template <typename TargetT = Aws::String>
128 ResourceSyncAttempt& WithTarget(TargetT&& value) {
129 SetTarget(std::forward<TargetT>(value));
130 return *this;
131 }
133
135
138 inline const Revision& GetTargetRevision() const { return m_targetRevision; }
139 inline bool TargetRevisionHasBeenSet() const { return m_targetRevisionHasBeenSet; }
140 template <typename TargetRevisionT = Revision>
141 void SetTargetRevision(TargetRevisionT&& value) {
142 m_targetRevisionHasBeenSet = true;
143 m_targetRevision = std::forward<TargetRevisionT>(value);
144 }
145 template <typename TargetRevisionT = Revision>
146 ResourceSyncAttempt& WithTargetRevision(TargetRevisionT&& value) {
147 SetTargetRevision(std::forward<TargetRevisionT>(value));
148 return *this;
149 }
151 private:
153
154 Revision m_initialRevision;
155
156 Aws::Utils::DateTime m_startedAt{};
157
159
160 Aws::String m_target;
161
162 Revision m_targetRevision;
163 bool m_eventsHasBeenSet = false;
164 bool m_initialRevisionHasBeenSet = false;
165 bool m_startedAtHasBeenSet = false;
166 bool m_statusHasBeenSet = false;
167 bool m_targetHasBeenSet = false;
168 bool m_targetRevisionHasBeenSet = false;
169};
170
171} // namespace Model
172} // namespace Proton
173} // namespace Aws
AWS_PROTON_API ResourceSyncAttempt()=default
void SetTargetRevision(TargetRevisionT &&value)
ResourceSyncAttempt & AddEvents(EventsT &&value)
ResourceSyncAttempt & WithTargetRevision(TargetRevisionT &&value)
AWS_PROTON_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStatus(ResourceSyncStatus value)
const Aws::Vector< ResourceSyncEvent > & GetEvents() const
void SetInitialRevision(InitialRevisionT &&value)
ResourceSyncAttempt & WithTarget(TargetT &&value)
AWS_PROTON_API ResourceSyncAttempt & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_PROTON_API ResourceSyncAttempt(Aws::Utils::Json::JsonView jsonValue)
ResourceSyncAttempt & WithEvents(EventsT &&value)
ResourceSyncAttempt & WithInitialRevision(InitialRevisionT &&value)
const Aws::Utils::DateTime & GetStartedAt() const
ResourceSyncAttempt & WithStartedAt(StartedAtT &&value)
ResourceSyncAttempt & WithStatus(ResourceSyncStatus 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