/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CodeCommit { namespace Model { /** */ class DeleteFileRequest : public CodeCommitRequest { public: AWS_CODECOMMIT_API DeleteFileRequest(); // 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 "DeleteFile"; } AWS_CODECOMMIT_API Aws::String SerializePayload() const override; AWS_CODECOMMIT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the repository that contains the file to delete.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The name of the branch where the commit that deletes the file is made.

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

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline const Aws::String& GetFilePath() const{ return m_filePath; } /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline bool FilePathHasBeenSet() const { return m_filePathHasBeenSet; } /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline void SetFilePath(const Aws::String& value) { m_filePathHasBeenSet = true; m_filePath = value; } /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline void SetFilePath(Aws::String&& value) { m_filePathHasBeenSet = true; m_filePath = std::move(value); } /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline void SetFilePath(const char* value) { m_filePathHasBeenSet = true; m_filePath.assign(value); } /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline DeleteFileRequest& WithFilePath(const Aws::String& value) { SetFilePath(value); return *this;} /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline DeleteFileRequest& WithFilePath(Aws::String&& value) { SetFilePath(std::move(value)); return *this;} /** *

The fully qualified path to the file that to be deleted, including the full * name and extension of that file. For example, /examples/file.md is a fully * qualified path to a file named file.md in a folder named examples.

*/ inline DeleteFileRequest& WithFilePath(const char* value) { SetFilePath(value); return *this;} /** *

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

The ID of the commit that is the tip of the branch where you want to create * the commit that deletes the file. This must be the HEAD commit for the branch. * The commit that deletes the file is created from this commit ID.

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

If a file is the only object in the folder or directory, specifies whether to * delete the folder or directory that contains the file. By default, empty folders * are deleted. This includes empty folders that are part of the directory * structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 * and dir3 are empty, deleting the last file in dir4 also deletes the empty * folders dir4, dir3, and dir2.

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

If a file is the only object in the folder or directory, specifies whether to * delete the folder or directory that contains the file. By default, empty folders * are deleted. This includes empty folders that are part of the directory * structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 * and dir3 are empty, deleting the last file in dir4 also deletes the empty * folders dir4, dir3, and dir2.

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

If a file is the only object in the folder or directory, specifies whether to * delete the folder or directory that contains the file. By default, empty folders * are deleted. This includes empty folders that are part of the directory * structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 * and dir3 are empty, deleting the last file in dir4 also deletes the empty * folders dir4, dir3, and dir2.

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

If a file is the only object in the folder or directory, specifies whether to * delete the folder or directory that contains the file. By default, empty folders * are deleted. This includes empty folders that are part of the directory * structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 * and dir3 are empty, deleting the last file in dir4 also deletes the empty * folders dir4, dir3, and dir2.

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

The commit message you want to include as part of deleting the file. 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 as part of deleting the file. 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 as part of deleting the file. 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 as part of deleting the file. 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 as part of deleting the file. 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 as part of deleting the file. Commit * messages are limited to 256 KB. If no message is specified, a default message is * used.

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

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

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

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

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

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline DeleteFileRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline DeleteFileRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the author of the commit that deletes the file. If no name is * specified, the user's ARN is used as the author name and committer name.

*/ inline DeleteFileRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

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

The email address for the commit that deletes the file. If no email address * is specified, the email address is left blank.

*/ inline DeleteFileRequest& WithEmail(const char* value) { SetEmail(value); return *this;} private: Aws::String m_repositoryName; bool m_repositoryNameHasBeenSet = false; Aws::String m_branchName; bool m_branchNameHasBeenSet = false; Aws::String m_filePath; bool m_filePathHasBeenSet = false; Aws::String m_parentCommitId; bool m_parentCommitIdHasBeenSet = false; bool m_keepEmptyFolders; bool m_keepEmptyFoldersHasBeenSet = false; Aws::String m_commitMessage; bool m_commitMessageHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_email; bool m_emailHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws