AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Commit.h
1
6#pragma once
7#include <aws/codecommit/CodeCommit_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/codecommit/model/UserInfo.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace CodeCommit
24{
25namespace Model
26{
27
33 class Commit
34 {
35 public:
36 AWS_CODECOMMIT_API Commit() = default;
37 AWS_CODECOMMIT_API Commit(Aws::Utils::Json::JsonView jsonValue);
38 AWS_CODECOMMIT_API Commit& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CODECOMMIT_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline const Aws::String& GetCommitId() const { return m_commitId; }
47 inline bool CommitIdHasBeenSet() const { return m_commitIdHasBeenSet; }
48 template<typename CommitIdT = Aws::String>
49 void SetCommitId(CommitIdT&& value) { m_commitIdHasBeenSet = true; m_commitId = std::forward<CommitIdT>(value); }
50 template<typename CommitIdT = Aws::String>
51 Commit& WithCommitId(CommitIdT&& value) { SetCommitId(std::forward<CommitIdT>(value)); return *this;}
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) { m_treeIdHasBeenSet = true; m_treeId = std::forward<TreeIdT>(value); }
62 template<typename TreeIdT = Aws::String>
63 Commit& WithTreeId(TreeIdT&& value) { SetTreeId(std::forward<TreeIdT>(value)); return *this;}
65
67
71 inline const Aws::Vector<Aws::String>& GetParents() const { return m_parents; }
72 inline bool ParentsHasBeenSet() const { return m_parentsHasBeenSet; }
73 template<typename ParentsT = Aws::Vector<Aws::String>>
74 void SetParents(ParentsT&& value) { m_parentsHasBeenSet = true; m_parents = std::forward<ParentsT>(value); }
75 template<typename ParentsT = Aws::Vector<Aws::String>>
76 Commit& WithParents(ParentsT&& value) { SetParents(std::forward<ParentsT>(value)); return *this;}
77 template<typename ParentsT = Aws::String>
78 Commit& AddParents(ParentsT&& value) { m_parentsHasBeenSet = true; m_parents.emplace_back(std::forward<ParentsT>(value)); return *this; }
80
82
85 inline const Aws::String& GetMessage() const { return m_message; }
86 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
87 template<typename MessageT = Aws::String>
88 void SetMessage(MessageT&& value) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
89 template<typename MessageT = Aws::String>
90 Commit& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
92
94
99 inline const UserInfo& GetAuthor() const { return m_author; }
100 inline bool AuthorHasBeenSet() const { return m_authorHasBeenSet; }
101 template<typename AuthorT = UserInfo>
102 void SetAuthor(AuthorT&& value) { m_authorHasBeenSet = true; m_author = std::forward<AuthorT>(value); }
103 template<typename AuthorT = UserInfo>
104 Commit& WithAuthor(AuthorT&& value) { SetAuthor(std::forward<AuthorT>(value)); return *this;}
106
108
117 inline const UserInfo& GetCommitter() const { return m_committer; }
118 inline bool CommitterHasBeenSet() const { return m_committerHasBeenSet; }
119 template<typename CommitterT = UserInfo>
120 void SetCommitter(CommitterT&& value) { m_committerHasBeenSet = true; m_committer = std::forward<CommitterT>(value); }
121 template<typename CommitterT = UserInfo>
122 Commit& WithCommitter(CommitterT&& value) { SetCommitter(std::forward<CommitterT>(value)); return *this;}
124
126
129 inline const Aws::String& GetAdditionalData() const { return m_additionalData; }
130 inline bool AdditionalDataHasBeenSet() const { return m_additionalDataHasBeenSet; }
131 template<typename AdditionalDataT = Aws::String>
132 void SetAdditionalData(AdditionalDataT&& value) { m_additionalDataHasBeenSet = true; m_additionalData = std::forward<AdditionalDataT>(value); }
133 template<typename AdditionalDataT = Aws::String>
134 Commit& WithAdditionalData(AdditionalDataT&& value) { SetAdditionalData(std::forward<AdditionalDataT>(value)); return *this;}
136 private:
137
138 Aws::String m_commitId;
139 bool m_commitIdHasBeenSet = false;
140
141 Aws::String m_treeId;
142 bool m_treeIdHasBeenSet = false;
143
144 Aws::Vector<Aws::String> m_parents;
145 bool m_parentsHasBeenSet = false;
146
147 Aws::String m_message;
148 bool m_messageHasBeenSet = false;
149
150 UserInfo m_author;
151 bool m_authorHasBeenSet = false;
152
153 UserInfo m_committer;
154 bool m_committerHasBeenSet = false;
155
156 Aws::String m_additionalData;
157 bool m_additionalDataHasBeenSet = false;
158 };
159
160} // namespace Model
161} // namespace CodeCommit
162} // namespace Aws
Commit & WithAdditionalData(AdditionalDataT &&value)
Definition Commit.h:134
bool CommitIdHasBeenSet() const
Definition Commit.h:47
const Aws::String & GetAdditionalData() const
Definition Commit.h:129
Commit & WithMessage(MessageT &&value)
Definition Commit.h:90
const Aws::String & GetMessage() const
Definition Commit.h:85
const UserInfo & GetAuthor() const
Definition Commit.h:99
const Aws::Vector< Aws::String > & GetParents() const
Definition Commit.h:71
const UserInfo & GetCommitter() const
Definition Commit.h:117
AWS_CODECOMMIT_API Commit()=default
void SetCommitId(CommitIdT &&value)
Definition Commit.h:49
AWS_CODECOMMIT_API Commit(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetCommitId() const
Definition Commit.h:46
Commit & WithTreeId(TreeIdT &&value)
Definition Commit.h:63
bool ParentsHasBeenSet() const
Definition Commit.h:72
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:122
void SetParents(ParentsT &&value)
Definition Commit.h:74
bool AdditionalDataHasBeenSet() const
Definition Commit.h:130
void SetAdditionalData(AdditionalDataT &&value)
Definition Commit.h:132
Commit & WithAuthor(AuthorT &&value)
Definition Commit.h:104
bool AuthorHasBeenSet() const
Definition Commit.h:100
bool TreeIdHasBeenSet() const
Definition Commit.h:59
bool MessageHasBeenSet() const
Definition Commit.h:86
void SetMessage(MessageT &&value)
Definition Commit.h:88
Commit & WithParents(ParentsT &&value)
Definition Commit.h:76
Commit & AddParents(ParentsT &&value)
Definition Commit.h:78
void SetAuthor(AuthorT &&value)
Definition Commit.h:102
bool CommitterHasBeenSet() const
Definition Commit.h:118
void SetCommitter(CommitterT &&value)
Definition Commit.h:120
Commit & WithCommitId(CommitIdT &&value)
Definition Commit.h:51
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