/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.codecommit.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateCommitRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the repository where you create the commit. *
*/ private String repositoryName; /** ** The name of the branch where you create the commit. *
*/ private String branchName; /** ** The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository. *
*/ private String parentCommitId; /** ** The name of the author who created the commit. This information is used as both the author and committer for the * commit. *
*/ private String authorName; /** ** The email address of the person who created the commit. *
*/ private String email; /** ** 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. *
*/ private String commitMessage; /** ** 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. *
*/ private Boolean keepEmptyFolders; /** ** The files to add or update in this commit. *
*/ private java.util.List* The files to delete in this commit. These files still exist in earlier commits. *
*/ private java.util.List* The file modes to update for files in this commit. *
*/ private java.util.List* The name of the repository where you create the commit. *
* * @param repositoryName * The name of the repository where you create the commit. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** ** The name of the repository where you create the commit. *
* * @return The name of the repository where you create the commit. */ public String getRepositoryName() { return this.repositoryName; } /** ** The name of the repository where you create the commit. *
* * @param repositoryName * The name of the repository where you create the commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** ** The name of the branch where you create the commit. *
* * @param branchName * The name of the branch where you create the commit. */ public void setBranchName(String branchName) { this.branchName = branchName; } /** ** The name of the branch where you create the commit. *
* * @return The name of the branch where you create the commit. */ public String getBranchName() { return this.branchName; } /** ** The name of the branch where you create the commit. *
* * @param branchName * The name of the branch where you create the commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withBranchName(String branchName) { setBranchName(branchName); return this; } /** ** The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository. *
* * @param parentCommitId * The ID of the commit that is the parent of the commit you create. Not required if this is an empty * repository. */ public void setParentCommitId(String parentCommitId) { this.parentCommitId = parentCommitId; } /** ** The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository. *
* * @return The ID of the commit that is the parent of the commit you create. Not required if this is an empty * repository. */ public String getParentCommitId() { return this.parentCommitId; } /** ** The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository. *
* * @param parentCommitId * The ID of the commit that is the parent of the commit you create. Not required if this is an empty * repository. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withParentCommitId(String parentCommitId) { setParentCommitId(parentCommitId); return this; } /** ** The name of the author who created the commit. This information is used as both the author and committer for the * commit. *
* * @param authorName * The name of the author who created the commit. This information is used as both the author and committer * for the commit. */ public void setAuthorName(String authorName) { this.authorName = authorName; } /** ** The name of the author who created the commit. This information is used as both the author and committer for the * commit. *
* * @return The name of the author who created the commit. This information is used as both the author and committer * for the commit. */ public String getAuthorName() { return this.authorName; } /** ** The name of the author who created the commit. This information is used as both the author and committer for the * commit. *
* * @param authorName * The name of the author who created the commit. This information is used as both the author and committer * for the commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withAuthorName(String authorName) { setAuthorName(authorName); return this; } /** ** The email address of the person who created the commit. *
* * @param email * The email address of the person who created the commit. */ public void setEmail(String email) { this.email = email; } /** ** The email address of the person who created the commit. *
* * @return The email address of the person who created the commit. */ public String getEmail() { return this.email; } /** ** The email address of the person who created the commit. *
* * @param email * The email address of the person who created the commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withEmail(String email) { setEmail(email); 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. *
* * @param 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. */ public void setCommitMessage(String commitMessage) { this.commitMessage = 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. *
* * @return 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. */ public String getCommitMessage() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withCommitMessage(String commitMessage) { setCommitMessage(commitMessage); 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. *
* * @param 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. */ public void setKeepEmptyFolders(Boolean keepEmptyFolders) { this.keepEmptyFolders = 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. *
* * @return 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. */ public Boolean getKeepEmptyFolders() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withKeepEmptyFolders(Boolean keepEmptyFolders) { setKeepEmptyFolders(keepEmptyFolders); 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. *
* * @return 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. */ public Boolean isKeepEmptyFolders() { return this.keepEmptyFolders; } /** ** The files to add or update in this commit. *
* * @return The files to add or update in this commit. */ public java.util.List* The files to add or update in this commit. *
* * @param putFiles * The files to add or update in this commit. */ public void setPutFiles(java.util.Collection* The files to add or update in this commit. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPutFiles(java.util.Collection)} or {@link #withPutFiles(java.util.Collection)} if you want to override * the existing values. *
* * @param putFiles * The files to add or update in this commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withPutFiles(PutFileEntry... putFiles) { if (this.putFiles == null) { setPutFiles(new java.util.ArrayList* The files to add or update in this commit. *
* * @param putFiles * The files to add or update in this commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withPutFiles(java.util.Collection* The files to delete in this commit. These files still exist in earlier commits. *
* * @return The files to delete in this commit. These files still exist in earlier commits. */ public java.util.List* The files to delete in this commit. These files still exist in earlier commits. *
* * @param deleteFiles * The files to delete in this commit. These files still exist in earlier commits. */ public void setDeleteFiles(java.util.Collection* The files to delete in this commit. These files still exist in earlier commits. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDeleteFiles(java.util.Collection)} or {@link #withDeleteFiles(java.util.Collection)} if you want to * override the existing values. *
* * @param deleteFiles * The files to delete in this commit. These files still exist in earlier commits. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withDeleteFiles(DeleteFileEntry... deleteFiles) { if (this.deleteFiles == null) { setDeleteFiles(new java.util.ArrayList* The files to delete in this commit. These files still exist in earlier commits. *
* * @param deleteFiles * The files to delete in this commit. These files still exist in earlier commits. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withDeleteFiles(java.util.Collection* The file modes to update for files in this commit. *
* * @return The file modes to update for files in this commit. */ public java.util.List* The file modes to update for files in this commit. *
* * @param setFileModes * The file modes to update for files in this commit. */ public void setSetFileModes(java.util.Collection* The file modes to update for files in this commit. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSetFileModes(java.util.Collection)} or {@link #withSetFileModes(java.util.Collection)} if you want to * override the existing values. *
* * @param setFileModes * The file modes to update for files in this commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withSetFileModes(SetFileModeEntry... setFileModes) { if (this.setFileModes == null) { setSetFileModes(new java.util.ArrayList* The file modes to update for files in this commit. *
* * @param setFileModes * The file modes to update for files in this commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCommitRequest withSetFileModes(java.util.Collection