/** * 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 namespace Aws { namespace CodeCommit { namespace Model { /** */ class CreatePullRequestRequest : public CodeCommitRequest { public: AWS_CODECOMMIT_API CreatePullRequestRequest(); // 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 "CreatePullRequest"; } AWS_CODECOMMIT_API Aws::String SerializePayload() const override; AWS_CODECOMMIT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

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

The title of the pull request. This title is used to identify the pull * request to other users in the repository.

*/ inline CreatePullRequestRequest& WithTitle(const char* value) { SetTitle(value); return *this;} /** *

A description of the pull request.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the pull request.

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

A description of the pull request.

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

A description of the pull request.

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

A description of the pull request.

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

A description of the pull request.

*/ inline CreatePullRequestRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the pull request.

*/ inline CreatePullRequestRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the pull request.

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

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline const Aws::Vector& GetTargets() const{ return m_targets; } /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; } /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline void SetTargets(const Aws::Vector& value) { m_targetsHasBeenSet = true; m_targets = value; } /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline void SetTargets(Aws::Vector&& value) { m_targetsHasBeenSet = true; m_targets = std::move(value); } /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline CreatePullRequestRequest& WithTargets(const Aws::Vector& value) { SetTargets(value); return *this;} /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline CreatePullRequestRequest& WithTargets(Aws::Vector&& value) { SetTargets(std::move(value)); return *this;} /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline CreatePullRequestRequest& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; } /** *

The targets for the pull request, including the source of the code to be * reviewed (the source branch) and the destination where the creator of the pull * request intends the code to be merged after the pull request is closed (the * destination branch).

*/ inline CreatePullRequestRequest& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ inline CreatePullRequestRequest& 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ inline CreatePullRequestRequest& 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.

*

The AWS SDKs prepopulate client request tokens. If you are using an * AWS SDK, an idempotency token is created for you.

*/ inline CreatePullRequestRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} private: Aws::String m_title; bool m_titleHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Vector m_targets; bool m_targetsHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws