AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateCommitRequest.h
1
6#pragma once
7#include <aws/codecommit/CodeCommit_EXPORTS.h>
8#include <aws/codecommit/CodeCommitRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/codecommit/model/PutFileEntry.h>
12#include <aws/codecommit/model/DeleteFileEntry.h>
13#include <aws/codecommit/model/SetFileModeEntry.h>
14#include <utility>
15
16namespace Aws
17{
18namespace CodeCommit
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_CODECOMMIT_API CreateCommitRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateCommit"; }
35
36 AWS_CODECOMMIT_API Aws::String SerializePayload() const override;
37
39
40
42
45 inline const Aws::String& GetRepositoryName() const { return m_repositoryName; }
46 inline bool RepositoryNameHasBeenSet() const { return m_repositoryNameHasBeenSet; }
47 template<typename RepositoryNameT = Aws::String>
48 void SetRepositoryName(RepositoryNameT&& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = std::forward<RepositoryNameT>(value); }
49 template<typename RepositoryNameT = Aws::String>
50 CreateCommitRequest& WithRepositoryName(RepositoryNameT&& value) { SetRepositoryName(std::forward<RepositoryNameT>(value)); return *this;}
52
54
57 inline const Aws::String& GetBranchName() const { return m_branchName; }
58 inline bool BranchNameHasBeenSet() const { return m_branchNameHasBeenSet; }
59 template<typename BranchNameT = Aws::String>
60 void SetBranchName(BranchNameT&& value) { m_branchNameHasBeenSet = true; m_branchName = std::forward<BranchNameT>(value); }
61 template<typename BranchNameT = Aws::String>
62 CreateCommitRequest& WithBranchName(BranchNameT&& value) { SetBranchName(std::forward<BranchNameT>(value)); return *this;}
64
66
70 inline const Aws::String& GetParentCommitId() const { return m_parentCommitId; }
71 inline bool ParentCommitIdHasBeenSet() const { return m_parentCommitIdHasBeenSet; }
72 template<typename ParentCommitIdT = Aws::String>
73 void SetParentCommitId(ParentCommitIdT&& value) { m_parentCommitIdHasBeenSet = true; m_parentCommitId = std::forward<ParentCommitIdT>(value); }
74 template<typename ParentCommitIdT = Aws::String>
75 CreateCommitRequest& WithParentCommitId(ParentCommitIdT&& value) { SetParentCommitId(std::forward<ParentCommitIdT>(value)); return *this;}
77
79
83 inline const Aws::String& GetAuthorName() const { return m_authorName; }
84 inline bool AuthorNameHasBeenSet() const { return m_authorNameHasBeenSet; }
85 template<typename AuthorNameT = Aws::String>
86 void SetAuthorName(AuthorNameT&& value) { m_authorNameHasBeenSet = true; m_authorName = std::forward<AuthorNameT>(value); }
87 template<typename AuthorNameT = Aws::String>
88 CreateCommitRequest& WithAuthorName(AuthorNameT&& value) { SetAuthorName(std::forward<AuthorNameT>(value)); return *this;}
90
92
95 inline const Aws::String& GetEmail() const { return m_email; }
96 inline bool EmailHasBeenSet() const { return m_emailHasBeenSet; }
97 template<typename EmailT = Aws::String>
98 void SetEmail(EmailT&& value) { m_emailHasBeenSet = true; m_email = std::forward<EmailT>(value); }
99 template<typename EmailT = Aws::String>
100 CreateCommitRequest& WithEmail(EmailT&& value) { SetEmail(std::forward<EmailT>(value)); return *this;}
102
104
108 inline const Aws::String& GetCommitMessage() const { return m_commitMessage; }
109 inline bool CommitMessageHasBeenSet() const { return m_commitMessageHasBeenSet; }
110 template<typename CommitMessageT = Aws::String>
111 void SetCommitMessage(CommitMessageT&& value) { m_commitMessageHasBeenSet = true; m_commitMessage = std::forward<CommitMessageT>(value); }
112 template<typename CommitMessageT = Aws::String>
113 CreateCommitRequest& WithCommitMessage(CommitMessageT&& value) { SetCommitMessage(std::forward<CommitMessageT>(value)); return *this;}
115
117
122 inline bool GetKeepEmptyFolders() const { return m_keepEmptyFolders; }
123 inline bool KeepEmptyFoldersHasBeenSet() const { return m_keepEmptyFoldersHasBeenSet; }
124 inline void SetKeepEmptyFolders(bool value) { m_keepEmptyFoldersHasBeenSet = true; m_keepEmptyFolders = value; }
125 inline CreateCommitRequest& WithKeepEmptyFolders(bool value) { SetKeepEmptyFolders(value); return *this;}
127
129
132 inline const Aws::Vector<PutFileEntry>& GetPutFiles() const { return m_putFiles; }
133 inline bool PutFilesHasBeenSet() const { return m_putFilesHasBeenSet; }
134 template<typename PutFilesT = Aws::Vector<PutFileEntry>>
135 void SetPutFiles(PutFilesT&& value) { m_putFilesHasBeenSet = true; m_putFiles = std::forward<PutFilesT>(value); }
136 template<typename PutFilesT = Aws::Vector<PutFileEntry>>
137 CreateCommitRequest& WithPutFiles(PutFilesT&& value) { SetPutFiles(std::forward<PutFilesT>(value)); return *this;}
138 template<typename PutFilesT = PutFileEntry>
139 CreateCommitRequest& AddPutFiles(PutFilesT&& value) { m_putFilesHasBeenSet = true; m_putFiles.emplace_back(std::forward<PutFilesT>(value)); return *this; }
141
143
147 inline const Aws::Vector<DeleteFileEntry>& GetDeleteFiles() const { return m_deleteFiles; }
148 inline bool DeleteFilesHasBeenSet() const { return m_deleteFilesHasBeenSet; }
149 template<typename DeleteFilesT = Aws::Vector<DeleteFileEntry>>
150 void SetDeleteFiles(DeleteFilesT&& value) { m_deleteFilesHasBeenSet = true; m_deleteFiles = std::forward<DeleteFilesT>(value); }
151 template<typename DeleteFilesT = Aws::Vector<DeleteFileEntry>>
152 CreateCommitRequest& WithDeleteFiles(DeleteFilesT&& value) { SetDeleteFiles(std::forward<DeleteFilesT>(value)); return *this;}
153 template<typename DeleteFilesT = DeleteFileEntry>
154 CreateCommitRequest& AddDeleteFiles(DeleteFilesT&& value) { m_deleteFilesHasBeenSet = true; m_deleteFiles.emplace_back(std::forward<DeleteFilesT>(value)); return *this; }
156
158
161 inline const Aws::Vector<SetFileModeEntry>& GetSetFileModes() const { return m_setFileModes; }
162 inline bool SetFileModesHasBeenSet() const { return m_setFileModesHasBeenSet; }
163 template<typename SetFileModesT = Aws::Vector<SetFileModeEntry>>
164 void SetSetFileModes(SetFileModesT&& value) { m_setFileModesHasBeenSet = true; m_setFileModes = std::forward<SetFileModesT>(value); }
165 template<typename SetFileModesT = Aws::Vector<SetFileModeEntry>>
166 CreateCommitRequest& WithSetFileModes(SetFileModesT&& value) { SetSetFileModes(std::forward<SetFileModesT>(value)); return *this;}
167 template<typename SetFileModesT = SetFileModeEntry>
168 CreateCommitRequest& AddSetFileModes(SetFileModesT&& value) { m_setFileModesHasBeenSet = true; m_setFileModes.emplace_back(std::forward<SetFileModesT>(value)); return *this; }
170 private:
171
172 Aws::String m_repositoryName;
173 bool m_repositoryNameHasBeenSet = false;
174
175 Aws::String m_branchName;
176 bool m_branchNameHasBeenSet = false;
177
178 Aws::String m_parentCommitId;
179 bool m_parentCommitIdHasBeenSet = false;
180
181 Aws::String m_authorName;
182 bool m_authorNameHasBeenSet = false;
183
184 Aws::String m_email;
185 bool m_emailHasBeenSet = false;
186
187 Aws::String m_commitMessage;
188 bool m_commitMessageHasBeenSet = false;
189
190 bool m_keepEmptyFolders{false};
191 bool m_keepEmptyFoldersHasBeenSet = false;
192
193 Aws::Vector<PutFileEntry> m_putFiles;
194 bool m_putFilesHasBeenSet = false;
195
196 Aws::Vector<DeleteFileEntry> m_deleteFiles;
197 bool m_deleteFilesHasBeenSet = false;
198
199 Aws::Vector<SetFileModeEntry> m_setFileModes;
200 bool m_setFileModesHasBeenSet = false;
201 };
202
203} // namespace Model
204} // namespace CodeCommit
205} // namespace Aws
CreateCommitRequest & WithAuthorName(AuthorNameT &&value)
const Aws::Vector< DeleteFileEntry > & GetDeleteFiles() const
CreateCommitRequest & WithCommitMessage(CommitMessageT &&value)
CreateCommitRequest & WithPutFiles(PutFilesT &&value)
CreateCommitRequest & WithBranchName(BranchNameT &&value)
void SetParentCommitId(ParentCommitIdT &&value)
AWS_CODECOMMIT_API CreateCommitRequest()=default
AWS_CODECOMMIT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetRepositoryName(RepositoryNameT &&value)
CreateCommitRequest & AddPutFiles(PutFilesT &&value)
CreateCommitRequest & WithEmail(EmailT &&value)
CreateCommitRequest & WithRepositoryName(RepositoryNameT &&value)
CreateCommitRequest & WithDeleteFiles(DeleteFilesT &&value)
CreateCommitRequest & AddDeleteFiles(DeleteFilesT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< PutFileEntry > & GetPutFiles() const
CreateCommitRequest & WithParentCommitId(ParentCommitIdT &&value)
CreateCommitRequest & WithKeepEmptyFolders(bool value)
CreateCommitRequest & AddSetFileModes(SetFileModesT &&value)
CreateCommitRequest & WithSetFileModes(SetFileModesT &&value)
const Aws::Vector< SetFileModeEntry > & GetSetFileModes() const
AWS_CODECOMMIT_API Aws::String SerializePayload() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector