AWS SDK for C++

AWS SDK for C++ Version 1.11.741

Loading...
Searching...
No Matches
Commit.h
1
6#pragma once
7#include <aws/codecommit/CodeCommit_EXPORTS.h>
8#include <aws/codecommit/model/UserInfo.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CodeCommit {
22namespace Model {
23
29class Commit {
30 public:
31 AWS_CODECOMMIT_API Commit() = default;
32 AWS_CODECOMMIT_API Commit(Aws::Utils::Json::JsonView jsonValue);
33 AWS_CODECOMMIT_API Commit& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CODECOMMIT_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetCommitId() const { return m_commitId; }
41 inline bool CommitIdHasBeenSet() const { return m_commitIdHasBeenSet; }
42 template <typename CommitIdT = Aws::String>
43 void SetCommitId(CommitIdT&& value) {
44 m_commitIdHasBeenSet = true;
45 m_commitId = std::forward<CommitIdT>(value);
46 }
47 template <typename CommitIdT = Aws::String>
48 Commit& WithCommitId(CommitIdT&& value) {
49 SetCommitId(std::forward<CommitIdT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetTreeId() const { return m_treeId; }
59 inline bool TreeIdHasBeenSet() const { return m_treeIdHasBeenSet; }
60 template <typename TreeIdT = Aws::String>
61 void SetTreeId(TreeIdT&& value) {
62 m_treeIdHasBeenSet = true;
63 m_treeId = std::forward<TreeIdT>(value);
64 }
65 template <typename TreeIdT = Aws::String>
66 Commit& WithTreeId(TreeIdT&& value) {
67 SetTreeId(std::forward<TreeIdT>(value));
68 return *this;
69 }
71
73
77 inline const Aws::Vector<Aws::String>& GetParents() const { return m_parents; }
78 inline bool ParentsHasBeenSet() const { return m_parentsHasBeenSet; }
79 template <typename ParentsT = Aws::Vector<Aws::String>>
80 void SetParents(ParentsT&& value) {
81 m_parentsHasBeenSet = true;
82 m_parents = std::forward<ParentsT>(value);
83 }
84 template <typename ParentsT = Aws::Vector<Aws::String>>
85 Commit& WithParents(ParentsT&& value) {
86 SetParents(std::forward<ParentsT>(value));
87 return *this;
88 }
89 template <typename ParentsT = Aws::String>
90 Commit& AddParents(ParentsT&& value) {
91 m_parentsHasBeenSet = true;
92 m_parents.emplace_back(std::forward<ParentsT>(value));
93 return *this;
94 }
96
98
101 inline const Aws::String& GetMessage() const { return m_message; }
102 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
103 template <typename MessageT = Aws::String>
104 void SetMessage(MessageT&& value) {
105 m_messageHasBeenSet = true;
106 m_message = std::forward<MessageT>(value);
107 }
108 template <typename MessageT = Aws::String>
109 Commit& WithMessage(MessageT&& value) {
110 SetMessage(std::forward<MessageT>(value));
111 return *this;
112 }
114
116
121 inline const UserInfo& GetAuthor() const { return m_author; }
122 inline bool AuthorHasBeenSet() const { return m_authorHasBeenSet; }
123 template <typename AuthorT = UserInfo>
124 void SetAuthor(AuthorT&& value) {
125 m_authorHasBeenSet = true;
126 m_author = std::forward<AuthorT>(value);
127 }
128 template <typename AuthorT = UserInfo>
129 Commit& WithAuthor(AuthorT&& value) {
130 SetAuthor(std::forward<AuthorT>(value));
131 return *this;
132 }
134
136
145 inline const UserInfo& GetCommitter() const { return m_committer; }
146 inline bool CommitterHasBeenSet() const { return m_committerHasBeenSet; }
147 template <typename CommitterT = UserInfo>
148 void SetCommitter(CommitterT&& value) {
149 m_committerHasBeenSet = true;
150 m_committer = std::forward<CommitterT>(value);
151 }
152 template <typename CommitterT = UserInfo>
153 Commit& WithCommitter(CommitterT&& value) {
154 SetCommitter(std::forward<CommitterT>(value));
155 return *this;
156 }
158
160
163 inline const Aws::String& GetAdditionalData() const { return m_additionalData; }
164 inline bool AdditionalDataHasBeenSet() const { return m_additionalDataHasBeenSet; }
165 template <typename AdditionalDataT = Aws::String>
166 void SetAdditionalData(AdditionalDataT&& value) {
167 m_additionalDataHasBeenSet = true;
168 m_additionalData = std::forward<AdditionalDataT>(value);
169 }
170 template <typename AdditionalDataT = Aws::String>
171 Commit& WithAdditionalData(AdditionalDataT&& value) {
172 SetAdditionalData(std::forward<AdditionalDataT>(value));
173 return *this;
174 }
176 private:
177 Aws::String m_commitId;
178
179 Aws::String m_treeId;
180
181 Aws::Vector<Aws::String> m_parents;
182
183 Aws::String m_message;
184
185 UserInfo m_author;
186
187 UserInfo m_committer;
188
189 Aws::String m_additionalData;
190 bool m_commitIdHasBeenSet = false;
191 bool m_treeIdHasBeenSet = false;
192 bool m_parentsHasBeenSet = false;
193 bool m_messageHasBeenSet = false;
194 bool m_authorHasBeenSet = false;
195 bool m_committerHasBeenSet = false;
196 bool m_additionalDataHasBeenSet = false;
197};
198
199} // namespace Model
200} // namespace CodeCommit
201} // namespace Aws
Commit & WithAdditionalData(AdditionalDataT &&value)
Definition Commit.h:171
bool CommitIdHasBeenSet() const
Definition Commit.h:41
const Aws::String & GetAdditionalData() const
Definition Commit.h:163
Commit & WithMessage(MessageT &&value)
Definition Commit.h:109
const Aws::String & GetMessage() const
Definition Commit.h:101
const UserInfo & GetAuthor() const
Definition Commit.h:121
const Aws::Vector< Aws::String > & GetParents() const
Definition Commit.h:77
const UserInfo & GetCommitter() const
Definition Commit.h:145
AWS_CODECOMMIT_API Commit()=default
void SetCommitId(CommitIdT &&value)
Definition Commit.h:43
AWS_CODECOMMIT_API Commit(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetCommitId() const
Definition Commit.h:40
Commit & WithTreeId(TreeIdT &&value)
Definition Commit.h:66
bool ParentsHasBeenSet() const
Definition Commit.h:78
void SetTreeId(TreeIdT &&value)
Definition Commit.h:61
AWS_CODECOMMIT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetTreeId() const
Definition Commit.h:58
Commit & WithCommitter(CommitterT &&value)
Definition Commit.h:153
void SetParents(ParentsT &&value)
Definition Commit.h:80
bool AdditionalDataHasBeenSet() const
Definition Commit.h:164
void SetAdditionalData(AdditionalDataT &&value)
Definition Commit.h:166
Commit & WithAuthor(AuthorT &&value)
Definition Commit.h:129
bool AuthorHasBeenSet() const
Definition Commit.h:122
bool TreeIdHasBeenSet() const
Definition Commit.h:59
bool MessageHasBeenSet() const
Definition Commit.h:102
void SetMessage(MessageT &&value)
Definition Commit.h:104
Commit & WithParents(ParentsT &&value)
Definition Commit.h:85
Commit & AddParents(ParentsT &&value)
Definition Commit.h:90
void SetAuthor(AuthorT &&value)
Definition Commit.h:124
bool CommitterHasBeenSet() const
Definition Commit.h:146
void SetCommitter(CommitterT &&value)
Definition Commit.h:148
Commit & WithCommitId(CommitIdT &&value)
Definition Commit.h:48
AWS_CODECOMMIT_API Commit & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue