/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeCommit { namespace Model { /** *

Returns information about a pull request.

See Also:

AWS * API Reference

*/ class PullRequest { public: AWS_CODECOMMIT_API PullRequest(); AWS_CODECOMMIT_API PullRequest(Aws::Utils::Json::JsonView jsonValue); AWS_CODECOMMIT_API PullRequest& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODECOMMIT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The system-generated ID of the pull request.

*/ inline const Aws::String& GetPullRequestId() const{ return m_pullRequestId; } /** *

The system-generated ID of the pull request.

*/ inline bool PullRequestIdHasBeenSet() const { return m_pullRequestIdHasBeenSet; } /** *

The system-generated ID of the pull request.

*/ inline void SetPullRequestId(const Aws::String& value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId = value; } /** *

The system-generated ID of the pull request.

*/ inline void SetPullRequestId(Aws::String&& value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId = std::move(value); } /** *

The system-generated ID of the pull request.

*/ inline void SetPullRequestId(const char* value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId.assign(value); } /** *

The system-generated ID of the pull request.

*/ inline PullRequest& WithPullRequestId(const Aws::String& value) { SetPullRequestId(value); return *this;} /** *

The system-generated ID of the pull request.

*/ inline PullRequest& WithPullRequestId(Aws::String&& value) { SetPullRequestId(std::move(value)); return *this;} /** *

The system-generated ID of the pull request.

*/ inline PullRequest& WithPullRequestId(const char* value) { SetPullRequestId(value); return *this;} /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline const Aws::String& GetTitle() const{ return m_title; } /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline PullRequest& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline PullRequest& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** *

The user-defined title of the pull request. This title is displayed in the * list of pull requests to other repository users.

*/ inline PullRequest& WithTitle(const char* value) { SetTitle(value); 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.

*/ inline const Aws::String& GetDescription() const{ return m_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.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

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.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

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.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

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.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

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.

*/ inline PullRequest& WithDescription(const Aws::String& value) { SetDescription(value); 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.

*/ inline PullRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); 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.

*/ inline PullRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The day and time of the last user or system activity on the pull request, in * timestamp format.

*/ inline const Aws::Utils::DateTime& GetLastActivityDate() const{ return m_lastActivityDate; } /** *

The day and time of the last user or system activity on the pull request, in * timestamp format.

*/ inline bool LastActivityDateHasBeenSet() const { return m_lastActivityDateHasBeenSet; } /** *

The day and time of the last user or system activity on the pull request, in * timestamp format.

*/ inline void SetLastActivityDate(const Aws::Utils::DateTime& value) { m_lastActivityDateHasBeenSet = true; m_lastActivityDate = value; } /** *

The day and time of the last user or system activity on the pull request, in * timestamp format.

*/ inline void SetLastActivityDate(Aws::Utils::DateTime&& value) { m_lastActivityDateHasBeenSet = true; m_lastActivityDate = std::move(value); } /** *

The day and time of the last user or system activity on the pull request, in * timestamp format.

*/ inline PullRequest& WithLastActivityDate(const Aws::Utils::DateTime& value) { SetLastActivityDate(value); return *this;} /** *

The day and time of the last user or system activity on the pull request, in * timestamp format.

*/ inline PullRequest& WithLastActivityDate(Aws::Utils::DateTime&& value) { SetLastActivityDate(std::move(value)); return *this;} /** *

The date and time the pull request was originally created, in timestamp * format.

*/ inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; } /** *

The date and time the pull request was originally created, in timestamp * format.

*/ inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; } /** *

The date and time the pull request was originally created, in timestamp * format.

*/ inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; } /** *

The date and time the pull request was originally created, in timestamp * format.

*/ inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); } /** *

The date and time the pull request was originally created, in timestamp * format.

*/ inline PullRequest& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;} /** *

The date and time the pull request was originally created, in timestamp * format.

*/ inline PullRequest& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;} /** *

The status of the pull request. Pull request status can only change from * OPEN to CLOSED.

*/ inline const PullRequestStatusEnum& GetPullRequestStatus() const{ return m_pullRequestStatus; } /** *

The status of the pull request. Pull request status can only change from * OPEN to CLOSED.

*/ inline bool PullRequestStatusHasBeenSet() const { return m_pullRequestStatusHasBeenSet; } /** *

The status of the pull request. Pull request status can only change from * OPEN to CLOSED.

*/ inline void SetPullRequestStatus(const PullRequestStatusEnum& value) { m_pullRequestStatusHasBeenSet = true; m_pullRequestStatus = value; } /** *

The status of the pull request. Pull request status can only change from * OPEN to CLOSED.

*/ inline void SetPullRequestStatus(PullRequestStatusEnum&& value) { m_pullRequestStatusHasBeenSet = true; m_pullRequestStatus = std::move(value); } /** *

The status of the pull request. Pull request status can only change from * OPEN to CLOSED.

*/ inline PullRequest& WithPullRequestStatus(const PullRequestStatusEnum& value) { SetPullRequestStatus(value); return *this;} /** *

The status of the pull request. Pull request status can only change from * OPEN to CLOSED.

*/ inline PullRequest& WithPullRequestStatus(PullRequestStatusEnum&& value) { SetPullRequestStatus(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline const Aws::String& GetAuthorArn() const{ return m_authorArn; } /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline bool AuthorArnHasBeenSet() const { return m_authorArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline void SetAuthorArn(const Aws::String& value) { m_authorArnHasBeenSet = true; m_authorArn = value; } /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline void SetAuthorArn(Aws::String&& value) { m_authorArnHasBeenSet = true; m_authorArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline void SetAuthorArn(const char* value) { m_authorArnHasBeenSet = true; m_authorArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline PullRequest& WithAuthorArn(const Aws::String& value) { SetAuthorArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline PullRequest& WithAuthorArn(Aws::String&& value) { SetAuthorArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the user who created the pull request.

*/ inline PullRequest& WithAuthorArn(const char* value) { SetAuthorArn(value); return *this;} /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline const Aws::Vector& GetPullRequestTargets() const{ return m_pullRequestTargets; } /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline bool PullRequestTargetsHasBeenSet() const { return m_pullRequestTargetsHasBeenSet; } /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline void SetPullRequestTargets(const Aws::Vector& value) { m_pullRequestTargetsHasBeenSet = true; m_pullRequestTargets = value; } /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline void SetPullRequestTargets(Aws::Vector&& value) { m_pullRequestTargetsHasBeenSet = true; m_pullRequestTargets = std::move(value); } /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline PullRequest& WithPullRequestTargets(const Aws::Vector& value) { SetPullRequestTargets(value); return *this;} /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline PullRequest& WithPullRequestTargets(Aws::Vector&& value) { SetPullRequestTargets(std::move(value)); return *this;} /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline PullRequest& AddPullRequestTargets(const PullRequestTarget& value) { m_pullRequestTargetsHasBeenSet = true; m_pullRequestTargets.push_back(value); return *this; } /** *

The targets of the pull request, including the source branch and destination * branch for the pull request.

*/ inline PullRequest& AddPullRequestTargets(PullRequestTarget&& value) { m_pullRequestTargetsHasBeenSet = true; m_pullRequestTargets.push_back(std::move(value)); return *this; } /** *

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.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_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.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

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.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

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.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

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.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

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.

*/ inline PullRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

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.

*/ inline PullRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

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.

*/ inline PullRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

The system-generated revision ID for the pull request.

*/ inline const Aws::String& GetRevisionId() const{ return m_revisionId; } /** *

The system-generated revision ID for the pull request.

*/ inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; } /** *

The system-generated revision ID for the pull request.

*/ inline void SetRevisionId(const Aws::String& value) { m_revisionIdHasBeenSet = true; m_revisionId = value; } /** *

The system-generated revision ID for the pull request.

*/ inline void SetRevisionId(Aws::String&& value) { m_revisionIdHasBeenSet = true; m_revisionId = std::move(value); } /** *

The system-generated revision ID for the pull request.

*/ inline void SetRevisionId(const char* value) { m_revisionIdHasBeenSet = true; m_revisionId.assign(value); } /** *

The system-generated revision ID for the pull request.

*/ inline PullRequest& WithRevisionId(const Aws::String& value) { SetRevisionId(value); return *this;} /** *

The system-generated revision ID for the pull request.

*/ inline PullRequest& WithRevisionId(Aws::String&& value) { SetRevisionId(std::move(value)); return *this;} /** *

The system-generated revision ID for the pull request.

*/ inline PullRequest& WithRevisionId(const char* value) { SetRevisionId(value); return *this;} /** *

The approval rules applied to the pull request.

*/ inline const Aws::Vector& GetApprovalRules() const{ return m_approvalRules; } /** *

The approval rules applied to the pull request.

*/ inline bool ApprovalRulesHasBeenSet() const { return m_approvalRulesHasBeenSet; } /** *

The approval rules applied to the pull request.

*/ inline void SetApprovalRules(const Aws::Vector& value) { m_approvalRulesHasBeenSet = true; m_approvalRules = value; } /** *

The approval rules applied to the pull request.

*/ inline void SetApprovalRules(Aws::Vector&& value) { m_approvalRulesHasBeenSet = true; m_approvalRules = std::move(value); } /** *

The approval rules applied to the pull request.

*/ inline PullRequest& WithApprovalRules(const Aws::Vector& value) { SetApprovalRules(value); return *this;} /** *

The approval rules applied to the pull request.

*/ inline PullRequest& WithApprovalRules(Aws::Vector&& value) { SetApprovalRules(std::move(value)); return *this;} /** *

The approval rules applied to the pull request.

*/ inline PullRequest& AddApprovalRules(const ApprovalRule& value) { m_approvalRulesHasBeenSet = true; m_approvalRules.push_back(value); return *this; } /** *

The approval rules applied to the pull request.

*/ inline PullRequest& AddApprovalRules(ApprovalRule&& value) { m_approvalRulesHasBeenSet = true; m_approvalRules.push_back(std::move(value)); return *this; } private: Aws::String m_pullRequestId; bool m_pullRequestIdHasBeenSet = false; Aws::String m_title; bool m_titleHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Utils::DateTime m_lastActivityDate; bool m_lastActivityDateHasBeenSet = false; Aws::Utils::DateTime m_creationDate; bool m_creationDateHasBeenSet = false; PullRequestStatusEnum m_pullRequestStatus; bool m_pullRequestStatusHasBeenSet = false; Aws::String m_authorArn; bool m_authorArnHasBeenSet = false; Aws::Vector m_pullRequestTargets; bool m_pullRequestTargetsHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::String m_revisionId; bool m_revisionIdHasBeenSet = false; Aws::Vector m_approvalRules; bool m_approvalRulesHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws