/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace CodeCommit { namespace Model { /** */ class CreateCommitRequest : public CodeCommitRequest { public: AWS_CODECOMMIT_API CreateCommitRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateCommit"; } AWS_CODECOMMIT_API Aws::String SerializePayload() const override; AWS_CODECOMMIT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the repository where you create the commit.

*/ inline const Aws::String& GetRepositoryName() const{ return m_repositoryName; } /** *

The name of the repository where you create the commit.

*/ inline bool RepositoryNameHasBeenSet() const { return m_repositoryNameHasBeenSet; } /** *

The name of the repository where you create the commit.

*/ inline void SetRepositoryName(const Aws::String& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = value; } /** *

The name of the repository where you create the commit.

*/ inline void SetRepositoryName(Aws::String&& value) { m_repositoryNameHasBeenSet = true; m_repositoryName = std::move(value); } /** *

The name of the repository where you create the commit.

*/ inline void SetRepositoryName(const char* value) { m_repositoryNameHasBeenSet = true; m_repositoryName.assign(value); } /** *

The name of the repository where you create the commit.

*/ inline CreateCommitRequest& WithRepositoryName(const Aws::String& value) { SetRepositoryName(value); return *this;} /** *

The name of the repository where you create the commit.

*/ inline CreateCommitRequest& WithRepositoryName(Aws::String&& value) { SetRepositoryName(std::move(value)); return *this;} /** *

The name of the repository where you create the commit.

*/ inline CreateCommitRequest& WithRepositoryName(const char* value) { SetRepositoryName(value); return *this;} /** *

The name of the branch where you create the commit.

*/ inline const Aws::String& GetBranchName() const{ return m_branchName; } /** *

The name of the branch where you create the commit.

*/ inline bool BranchNameHasBeenSet() const { return m_branchNameHasBeenSet; } /** *

The name of the branch where you create the commit.

*/ inline void SetBranchName(const Aws::String& value) { m_branchNameHasBeenSet = true; m_branchName = value; } /** *

The name of the branch where you create the commit.

*/ inline void SetBranchName(Aws::String&& value) { m_branchNameHasBeenSet = true; m_branchName = std::move(value); } /** *

The name of the branch where you create the commit.

*/ inline void SetBranchName(const char* value) { m_branchNameHasBeenSet = true; m_branchName.assign(value); } /** *

The name of the branch where you create the commit.

*/ inline CreateCommitRequest& WithBranchName(const Aws::String& value) { SetBranchName(value); return *this;} /** *

The name of the branch where you create the commit.

*/ inline CreateCommitRequest& WithBranchName(Aws::String&& value) { SetBranchName(std::move(value)); return *this;} /** *

The name of the branch where you create the commit.

*/ inline CreateCommitRequest& WithBranchName(const char* value) { SetBranchName(value); return *this;} /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline const Aws::String& GetParentCommitId() const{ return m_parentCommitId; } /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline bool ParentCommitIdHasBeenSet() const { return m_parentCommitIdHasBeenSet; } /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline void SetParentCommitId(const Aws::String& value) { m_parentCommitIdHasBeenSet = true; m_parentCommitId = value; } /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline void SetParentCommitId(Aws::String&& value) { m_parentCommitIdHasBeenSet = true; m_parentCommitId = std::move(value); } /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline void SetParentCommitId(const char* value) { m_parentCommitIdHasBeenSet = true; m_parentCommitId.assign(value); } /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline CreateCommitRequest& WithParentCommitId(const Aws::String& value) { SetParentCommitId(value); return *this;} /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline CreateCommitRequest& WithParentCommitId(Aws::String&& value) { SetParentCommitId(std::move(value)); return *this;} /** *

The ID of the commit that is the parent of the commit you create. Not * required if this is an empty repository.

*/ inline CreateCommitRequest& WithParentCommitId(const char* value) { SetParentCommitId(value); return *this;} /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline const Aws::String& GetAuthorName() const{ return m_authorName; } /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline bool AuthorNameHasBeenSet() const { return m_authorNameHasBeenSet; } /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline void SetAuthorName(const Aws::String& value) { m_authorNameHasBeenSet = true; m_authorName = value; } /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline void SetAuthorName(Aws::String&& value) { m_authorNameHasBeenSet = true; m_authorName = std::move(value); } /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline void SetAuthorName(const char* value) { m_authorNameHasBeenSet = true; m_authorName.assign(value); } /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline CreateCommitRequest& WithAuthorName(const Aws::String& value) { SetAuthorName(value); return *this;} /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline CreateCommitRequest& WithAuthorName(Aws::String&& value) { SetAuthorName(std::move(value)); return *this;} /** *

The name of the author who created the commit. This information is used as * both the author and committer for the commit.

*/ inline CreateCommitRequest& WithAuthorName(const char* value) { SetAuthorName(value); return *this;} /** *

The email address of the person who created the commit.

*/ inline const Aws::String& GetEmail() const{ return m_email; } /** *

The email address of the person who created the commit.

*/ inline bool EmailHasBeenSet() const { return m_emailHasBeenSet; } /** *

The email address of the person who created the commit.

*/ inline void SetEmail(const Aws::String& value) { m_emailHasBeenSet = true; m_email = value; } /** *

The email address of the person who created the commit.

*/ inline void SetEmail(Aws::String&& value) { m_emailHasBeenSet = true; m_email = std::move(value); } /** *

The email address of the person who created the commit.

*/ inline void SetEmail(const char* value) { m_emailHasBeenSet = true; m_email.assign(value); } /** *

The email address of the person who created the commit.

*/ inline CreateCommitRequest& WithEmail(const Aws::String& value) { SetEmail(value); return *this;} /** *

The email address of the person who created the commit.

*/ inline CreateCommitRequest& WithEmail(Aws::String&& value) { SetEmail(std::move(value)); return *this;} /** *

The email address of the person who created the commit.

*/ inline CreateCommitRequest& WithEmail(const char* value) { SetEmail(value); return *this;} /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline const Aws::String& GetCommitMessage() const{ return m_commitMessage; } /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline bool CommitMessageHasBeenSet() const { return m_commitMessageHasBeenSet; } /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline void SetCommitMessage(const Aws::String& value) { m_commitMessageHasBeenSet = true; m_commitMessage = value; } /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline void SetCommitMessage(Aws::String&& value) { m_commitMessageHasBeenSet = true; m_commitMessage = std::move(value); } /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline void SetCommitMessage(const char* value) { m_commitMessageHasBeenSet = true; m_commitMessage.assign(value); } /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline CreateCommitRequest& WithCommitMessage(const Aws::String& value) { SetCommitMessage(value); return *this;} /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline CreateCommitRequest& WithCommitMessage(Aws::String&& value) { SetCommitMessage(std::move(value)); return *this;} /** *

The commit message you want to include in the commit. Commit messages are * limited to 256 KB. If no message is specified, a default message is used.

*/ inline CreateCommitRequest& WithCommitMessage(const char* value) { SetCommitMessage(value); return *this;} /** *

If the commit contains deletions, whether to keep a folder or folder * structure if the changes leave the folders empty. If true, a ..gitkeep file is * created for empty folders. The default is false.

*/ inline bool GetKeepEmptyFolders() const{ return m_keepEmptyFolders; } /** *

If the commit contains deletions, whether to keep a folder or folder * structure if the changes leave the folders empty. If true, a ..gitkeep file is * created for empty folders. The default is false.

*/ inline bool KeepEmptyFoldersHasBeenSet() const { return m_keepEmptyFoldersHasBeenSet; } /** *

If the commit contains deletions, whether to keep a folder or folder * structure if the changes leave the folders empty. If true, a ..gitkeep file is * created for empty folders. The default is false.

*/ inline void SetKeepEmptyFolders(bool value) { m_keepEmptyFoldersHasBeenSet = true; m_keepEmptyFolders = value; } /** *

If the commit contains deletions, whether to keep a folder or folder * structure if the changes leave the folders empty. If true, a ..gitkeep file is * created for empty folders. The default is false.

*/ inline CreateCommitRequest& WithKeepEmptyFolders(bool value) { SetKeepEmptyFolders(value); return *this;} /** *

The files to add or update in this commit.

*/ inline const Aws::Vector& GetPutFiles() const{ return m_putFiles; } /** *

The files to add or update in this commit.

*/ inline bool PutFilesHasBeenSet() const { return m_putFilesHasBeenSet; } /** *

The files to add or update in this commit.

*/ inline void SetPutFiles(const Aws::Vector& value) { m_putFilesHasBeenSet = true; m_putFiles = value; } /** *

The files to add or update in this commit.

*/ inline void SetPutFiles(Aws::Vector&& value) { m_putFilesHasBeenSet = true; m_putFiles = std::move(value); } /** *

The files to add or update in this commit.

*/ inline CreateCommitRequest& WithPutFiles(const Aws::Vector& value) { SetPutFiles(value); return *this;} /** *

The files to add or update in this commit.

*/ inline CreateCommitRequest& WithPutFiles(Aws::Vector&& value) { SetPutFiles(std::move(value)); return *this;} /** *

The files to add or update in this commit.

*/ inline CreateCommitRequest& AddPutFiles(const PutFileEntry& value) { m_putFilesHasBeenSet = true; m_putFiles.push_back(value); return *this; } /** *

The files to add or update in this commit.

*/ inline CreateCommitRequest& AddPutFiles(PutFileEntry&& value) { m_putFilesHasBeenSet = true; m_putFiles.push_back(std::move(value)); return *this; } /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline const Aws::Vector& GetDeleteFiles() const{ return m_deleteFiles; } /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline bool DeleteFilesHasBeenSet() const { return m_deleteFilesHasBeenSet; } /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline void SetDeleteFiles(const Aws::Vector& value) { m_deleteFilesHasBeenSet = true; m_deleteFiles = value; } /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline void SetDeleteFiles(Aws::Vector&& value) { m_deleteFilesHasBeenSet = true; m_deleteFiles = std::move(value); } /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline CreateCommitRequest& WithDeleteFiles(const Aws::Vector& value) { SetDeleteFiles(value); return *this;} /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline CreateCommitRequest& WithDeleteFiles(Aws::Vector&& value) { SetDeleteFiles(std::move(value)); return *this;} /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline CreateCommitRequest& AddDeleteFiles(const DeleteFileEntry& value) { m_deleteFilesHasBeenSet = true; m_deleteFiles.push_back(value); return *this; } /** *

The files to delete in this commit. These files still exist in earlier * commits.

*/ inline CreateCommitRequest& AddDeleteFiles(DeleteFileEntry&& value) { m_deleteFilesHasBeenSet = true; m_deleteFiles.push_back(std::move(value)); return *this; } /** *

The file modes to update for files in this commit.

*/ inline const Aws::Vector& GetSetFileModes() const{ return m_setFileModes; } /** *

The file modes to update for files in this commit.

*/ inline bool SetFileModesHasBeenSet() const { return m_setFileModesHasBeenSet; } /** *

The file modes to update for files in this commit.

*/ inline void SetSetFileModes(const Aws::Vector& value) { m_setFileModesHasBeenSet = true; m_setFileModes = value; } /** *

The file modes to update for files in this commit.

*/ inline void SetSetFileModes(Aws::Vector&& value) { m_setFileModesHasBeenSet = true; m_setFileModes = std::move(value); } /** *

The file modes to update for files in this commit.

*/ inline CreateCommitRequest& WithSetFileModes(const Aws::Vector& value) { SetSetFileModes(value); return *this;} /** *

The file modes to update for files in this commit.

*/ inline CreateCommitRequest& WithSetFileModes(Aws::Vector&& value) { SetSetFileModes(std::move(value)); return *this;} /** *

The file modes to update for files in this commit.

*/ inline CreateCommitRequest& AddSetFileModes(const SetFileModeEntry& value) { m_setFileModesHasBeenSet = true; m_setFileModes.push_back(value); return *this; } /** *

The file modes to update for files in this commit.

*/ inline CreateCommitRequest& AddSetFileModes(SetFileModeEntry&& value) { m_setFileModesHasBeenSet = true; m_setFileModes.push_back(std::move(value)); return *this; } private: Aws::String m_repositoryName; bool m_repositoryNameHasBeenSet = false; Aws::String m_branchName; bool m_branchNameHasBeenSet = false; Aws::String m_parentCommitId; bool m_parentCommitIdHasBeenSet = false; Aws::String m_authorName; bool m_authorNameHasBeenSet = false; Aws::String m_email; bool m_emailHasBeenSet = false; Aws::String m_commitMessage; bool m_commitMessageHasBeenSet = false; bool m_keepEmptyFolders; bool m_keepEmptyFoldersHasBeenSet = false; Aws::Vector m_putFiles; bool m_putFilesHasBeenSet = false; Aws::Vector m_deleteFiles; bool m_deleteFilesHasBeenSet = false; Aws::Vector m_setFileModes; bool m_setFileModesHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws