/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Returns information about comments on a pull request. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CommentsForPullRequest implements Serializable, Cloneable, StructuredPojo { /** ** The system-generated ID of the pull request. *
*/ private String pullRequestId; /** ** The name of the repository that contains the pull request. *
*/ private String repositoryName; /** ** The full commit ID of the commit that was the tip of the destination branch when the pull request was created. * This commit is superceded by the after commit in the source branch when and if you merge the source branch into * the destination branch. *
*/ private String beforeCommitId; /** ** The full commit ID of the commit that was the tip of the source branch at the time the comment was made. *
*/ private String afterCommitId; /** ** The full blob ID of the file on which you want to comment on the destination commit. *
*/ private String beforeBlobId; /** ** The full blob ID of the file on which you want to comment on the source commit. *
*/ private String afterBlobId; /** ** Location information about the comment on the pull request, including the file name, line number, and whether the * version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch). *
*/ private Location location; /** ** An array of comment objects. Each comment object contains information about a comment on the pull request. *
*/ private java.util.List* The system-generated ID of the pull request. *
* * @param pullRequestId * The system-generated ID of the pull request. */ public void setPullRequestId(String pullRequestId) { this.pullRequestId = pullRequestId; } /** ** The system-generated ID of the pull request. *
* * @return The system-generated ID of the pull request. */ public String getPullRequestId() { return this.pullRequestId; } /** ** The system-generated ID of the pull request. *
* * @param pullRequestId * The system-generated ID of the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withPullRequestId(String pullRequestId) { setPullRequestId(pullRequestId); return this; } /** ** The name of the repository that contains the pull request. *
* * @param repositoryName * The name of the repository that contains the pull request. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** ** The name of the repository that contains the pull request. *
* * @return The name of the repository that contains the pull request. */ public String getRepositoryName() { return this.repositoryName; } /** ** The name of the repository that contains the pull request. *
* * @param repositoryName * The name of the repository that contains the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** ** The full commit ID of the commit that was the tip of the destination branch when the pull request was created. * This commit is superceded by the after commit in the source branch when and if you merge the source branch into * the destination branch. *
* * @param beforeCommitId * The full commit ID of the commit that was the tip of the destination branch when the pull request was * created. This commit is superceded by the after commit in the source branch when and if you merge the * source branch into the destination branch. */ public void setBeforeCommitId(String beforeCommitId) { this.beforeCommitId = beforeCommitId; } /** ** The full commit ID of the commit that was the tip of the destination branch when the pull request was created. * This commit is superceded by the after commit in the source branch when and if you merge the source branch into * the destination branch. *
* * @return The full commit ID of the commit that was the tip of the destination branch when the pull request was * created. This commit is superceded by the after commit in the source branch when and if you merge the * source branch into the destination branch. */ public String getBeforeCommitId() { return this.beforeCommitId; } /** ** The full commit ID of the commit that was the tip of the destination branch when the pull request was created. * This commit is superceded by the after commit in the source branch when and if you merge the source branch into * the destination branch. *
* * @param beforeCommitId * The full commit ID of the commit that was the tip of the destination branch when the pull request was * created. This commit is superceded by the after commit in the source branch when and if you merge the * source branch into the destination branch. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withBeforeCommitId(String beforeCommitId) { setBeforeCommitId(beforeCommitId); return this; } /** ** The full commit ID of the commit that was the tip of the source branch at the time the comment was made. *
* * @param afterCommitId * The full commit ID of the commit that was the tip of the source branch at the time the comment was made. */ public void setAfterCommitId(String afterCommitId) { this.afterCommitId = afterCommitId; } /** ** The full commit ID of the commit that was the tip of the source branch at the time the comment was made. *
* * @return The full commit ID of the commit that was the tip of the source branch at the time the comment was made. */ public String getAfterCommitId() { return this.afterCommitId; } /** ** The full commit ID of the commit that was the tip of the source branch at the time the comment was made. *
* * @param afterCommitId * The full commit ID of the commit that was the tip of the source branch at the time the comment was made. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withAfterCommitId(String afterCommitId) { setAfterCommitId(afterCommitId); return this; } /** ** The full blob ID of the file on which you want to comment on the destination commit. *
* * @param beforeBlobId * The full blob ID of the file on which you want to comment on the destination commit. */ public void setBeforeBlobId(String beforeBlobId) { this.beforeBlobId = beforeBlobId; } /** ** The full blob ID of the file on which you want to comment on the destination commit. *
* * @return The full blob ID of the file on which you want to comment on the destination commit. */ public String getBeforeBlobId() { return this.beforeBlobId; } /** ** The full blob ID of the file on which you want to comment on the destination commit. *
* * @param beforeBlobId * The full blob ID of the file on which you want to comment on the destination commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withBeforeBlobId(String beforeBlobId) { setBeforeBlobId(beforeBlobId); return this; } /** ** The full blob ID of the file on which you want to comment on the source commit. *
* * @param afterBlobId * The full blob ID of the file on which you want to comment on the source commit. */ public void setAfterBlobId(String afterBlobId) { this.afterBlobId = afterBlobId; } /** ** The full blob ID of the file on which you want to comment on the source commit. *
* * @return The full blob ID of the file on which you want to comment on the source commit. */ public String getAfterBlobId() { return this.afterBlobId; } /** ** The full blob ID of the file on which you want to comment on the source commit. *
* * @param afterBlobId * The full blob ID of the file on which you want to comment on the source commit. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withAfterBlobId(String afterBlobId) { setAfterBlobId(afterBlobId); return this; } /** ** Location information about the comment on the pull request, including the file name, line number, and whether the * version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch). *
* * @param location * Location information about the comment on the pull request, including the file name, line number, and * whether the version of the file where the comment was made is BEFORE (destination branch) or AFTER (source * branch). */ public void setLocation(Location location) { this.location = location; } /** ** Location information about the comment on the pull request, including the file name, line number, and whether the * version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch). *
* * @return Location information about the comment on the pull request, including the file name, line number, and * whether the version of the file where the comment was made is BEFORE (destination branch) or AFTER * (source branch). */ public Location getLocation() { return this.location; } /** ** Location information about the comment on the pull request, including the file name, line number, and whether the * version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch). *
* * @param location * Location information about the comment on the pull request, including the file name, line number, and * whether the version of the file where the comment was made is BEFORE (destination branch) or AFTER (source * branch). * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withLocation(Location location) { setLocation(location); return this; } /** ** An array of comment objects. Each comment object contains information about a comment on the pull request. *
* * @return An array of comment objects. Each comment object contains information about a comment on the pull * request. */ public java.util.List* An array of comment objects. Each comment object contains information about a comment on the pull request. *
* * @param comments * An array of comment objects. Each comment object contains information about a comment on the pull request. */ public void setComments(java.util.Collection* An array of comment objects. Each comment object contains information about a comment on the pull request. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setComments(java.util.Collection)} or {@link #withComments(java.util.Collection)} if you want to override * the existing values. *
* * @param comments * An array of comment objects. Each comment object contains information about a comment on the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withComments(Comment... comments) { if (this.comments == null) { setComments(new java.util.ArrayList* An array of comment objects. Each comment object contains information about a comment on the pull request. *
* * @param comments * An array of comment objects. Each comment object contains information about a comment on the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public CommentsForPullRequest withComments(java.util.Collection