/* * 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 a pull request. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PullRequest implements Serializable, Cloneable, StructuredPojo { /** ** The system-generated ID of the pull request. *
*/ private String pullRequestId; /** ** The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. *
*/ private String title; /** ** The user-defined description of the pull request. This description can be used to clarify what should be reviewed * and other details of the request. *
*/ private String description; /** ** The day and time of the last user or system activity on the pull request, in timestamp format. *
*/ private java.util.Date lastActivityDate; /** ** The date and time the pull request was originally created, in timestamp format. *
*/ private java.util.Date creationDate; /** *
* The status of the pull request. Pull request status can only change from OPEN
to CLOSED
* .
*
* The Amazon Resource Name (ARN) of the user who created the pull request. *
*/ private String authorArn; /** ** The targets of the pull request, including the source branch and destination branch for the pull request. *
*/ private java.util.List* A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be * repeated with a changed parameter. If a request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token. *
*/ private String clientRequestToken; /** ** The system-generated revision ID for the pull request. *
*/ private String revisionId; /** ** The approval rules applied to 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 PullRequest withPullRequestId(String pullRequestId) { setPullRequestId(pullRequestId); return this; } /** ** The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. *
* * @param title * The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. */ public void setTitle(String title) { this.title = title; } /** ** The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. *
* * @return The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. */ public String getTitle() { return this.title; } /** ** The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. *
* * @param title * The user-defined title of the pull request. This title is displayed in the list of pull requests to other * repository users. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withTitle(String title) { setTitle(title); return this; } /** ** The user-defined description of the pull request. This description can be used to clarify what should be reviewed * and other details of the request. *
* * @param description * The user-defined description of the pull request. This description can be used to clarify what should be * reviewed and other details of the request. */ public void setDescription(String description) { this.description = description; } /** ** The user-defined description of the pull request. This description can be used to clarify what should be reviewed * and other details of the request. *
* * @return The user-defined description of the pull request. This description can be used to clarify what should be * reviewed and other details of the request. */ public String getDescription() { return this.description; } /** ** The user-defined description of the pull request. This description can be used to clarify what should be reviewed * and other details of the request. *
* * @param description * The user-defined description of the pull request. This description can be used to clarify what should be * reviewed and other details of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withDescription(String description) { setDescription(description); return this; } /** ** The day and time of the last user or system activity on the pull request, in timestamp format. *
* * @param lastActivityDate * The day and time of the last user or system activity on the pull request, in timestamp format. */ public void setLastActivityDate(java.util.Date lastActivityDate) { this.lastActivityDate = lastActivityDate; } /** ** The day and time of the last user or system activity on the pull request, in timestamp format. *
* * @return The day and time of the last user or system activity on the pull request, in timestamp format. */ public java.util.Date getLastActivityDate() { return this.lastActivityDate; } /** ** The day and time of the last user or system activity on the pull request, in timestamp format. *
* * @param lastActivityDate * The day and time of the last user or system activity on the pull request, in timestamp format. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withLastActivityDate(java.util.Date lastActivityDate) { setLastActivityDate(lastActivityDate); return this; } /** ** The date and time the pull request was originally created, in timestamp format. *
* * @param creationDate * The date and time the pull request was originally created, in timestamp format. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** ** The date and time the pull request was originally created, in timestamp format. *
* * @return The date and time the pull request was originally created, in timestamp format. */ public java.util.Date getCreationDate() { return this.creationDate; } /** ** The date and time the pull request was originally created, in timestamp format. *
* * @param creationDate * The date and time the pull request was originally created, in timestamp format. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** *
* The status of the pull request. Pull request status can only change from OPEN
to CLOSED
* .
*
OPEN
to
* CLOSED
.
* @see PullRequestStatusEnum
*/
public void setPullRequestStatus(String pullRequestStatus) {
this.pullRequestStatus = pullRequestStatus;
}
/**
*
* The status of the pull request. Pull request status can only change from OPEN
to CLOSED
* .
*
OPEN
to
* CLOSED
.
* @see PullRequestStatusEnum
*/
public String getPullRequestStatus() {
return this.pullRequestStatus;
}
/**
*
* The status of the pull request. Pull request status can only change from OPEN
to CLOSED
* .
*
OPEN
to
* CLOSED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PullRequestStatusEnum
*/
public PullRequest withPullRequestStatus(String pullRequestStatus) {
setPullRequestStatus(pullRequestStatus);
return this;
}
/**
*
* The status of the pull request. Pull request status can only change from OPEN
to CLOSED
* .
*
OPEN
to
* CLOSED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PullRequestStatusEnum
*/
public PullRequest withPullRequestStatus(PullRequestStatusEnum pullRequestStatus) {
this.pullRequestStatus = pullRequestStatus.toString();
return this;
}
/**
* * The Amazon Resource Name (ARN) of the user who created the pull request. *
* * @param authorArn * The Amazon Resource Name (ARN) of the user who created the pull request. */ public void setAuthorArn(String authorArn) { this.authorArn = authorArn; } /** ** The Amazon Resource Name (ARN) of the user who created the pull request. *
* * @return The Amazon Resource Name (ARN) of the user who created the pull request. */ public String getAuthorArn() { return this.authorArn; } /** ** The Amazon Resource Name (ARN) of the user who created the pull request. *
* * @param authorArn * The Amazon Resource Name (ARN) of the user who created the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withAuthorArn(String authorArn) { setAuthorArn(authorArn); return this; } /** ** The targets of the pull request, including the source branch and destination branch for the pull request. *
* * @return The targets of the pull request, including the source branch and destination branch for the pull request. */ public java.util.List* The targets of the pull request, including the source branch and destination branch for the pull request. *
* * @param pullRequestTargets * The targets of the pull request, including the source branch and destination branch for the pull request. */ public void setPullRequestTargets(java.util.Collection* The targets of the pull request, including the source branch and destination branch for the pull request. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPullRequestTargets(java.util.Collection)} or {@link #withPullRequestTargets(java.util.Collection)} if * you want to override the existing values. *
* * @param pullRequestTargets * The targets of the pull request, including the source branch and destination branch for the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withPullRequestTargets(PullRequestTarget... pullRequestTargets) { if (this.pullRequestTargets == null) { setPullRequestTargets(new java.util.ArrayList* The targets of the pull request, including the source branch and destination branch for the pull request. *
* * @param pullRequestTargets * The targets of the pull request, including the source branch and destination branch for the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withPullRequestTargets(java.util.Collection* A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be * repeated with a changed parameter. If a request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token. *
* * @param clientRequestToken * A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot * be repeated with a changed parameter. If a request is received with the same parameters and a token is * included, the request returns information about the initial request that used that token. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** ** A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be * repeated with a changed parameter. If a request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token. *
* * @return A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot * be repeated with a changed parameter. If a request is received with the same parameters and a token is * included, the request returns information about the initial request that used that token. */ public String getClientRequestToken() { return this.clientRequestToken; } /** ** A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be * repeated with a changed parameter. If a request is received with the same parameters and a token is included, the * request returns information about the initial request that used that token. *
* * @param clientRequestToken * A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot * be repeated with a changed parameter. If a request is received with the same parameters and a token is * included, the request returns information about the initial request that used that token. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** ** The system-generated revision ID for the pull request. *
* * @param revisionId * The system-generated revision ID for the pull request. */ public void setRevisionId(String revisionId) { this.revisionId = revisionId; } /** ** The system-generated revision ID for the pull request. *
* * @return The system-generated revision ID for the pull request. */ public String getRevisionId() { return this.revisionId; } /** ** The system-generated revision ID for the pull request. *
* * @param revisionId * The system-generated revision ID for the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withRevisionId(String revisionId) { setRevisionId(revisionId); return this; } /** ** The approval rules applied to the pull request. *
* * @return The approval rules applied to the pull request. */ public java.util.List* The approval rules applied to the pull request. *
* * @param approvalRules * The approval rules applied to the pull request. */ public void setApprovalRules(java.util.Collection* The approval rules applied to the pull request. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setApprovalRules(java.util.Collection)} or {@link #withApprovalRules(java.util.Collection)} if you want * to override the existing values. *
* * @param approvalRules * The approval rules applied to the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withApprovalRules(ApprovalRule... approvalRules) { if (this.approvalRules == null) { setApprovalRules(new java.util.ArrayList* The approval rules applied to the pull request. *
* * @param approvalRules * The approval rules applied to the pull request. * @return Returns a reference to this object so that method calls can be chained together. */ public PullRequest withApprovalRules(java.util.Collection