/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace CodeCommit { namespace Model { /** */ class UpdatePullRequestApprovalRuleContentRequest : public CodeCommitRequest { public: AWS_CODECOMMIT_API UpdatePullRequestApprovalRuleContentRequest(); // 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 "UpdatePullRequestApprovalRuleContent"; } AWS_CODECOMMIT_API Aws::String SerializePayload() const override; AWS_CODECOMMIT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

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 UpdatePullRequestApprovalRuleContentRequest& WithPullRequestId(const Aws::String& value) { SetPullRequestId(value); return *this;} /** *

The system-generated ID of the pull request.

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

The system-generated ID of the pull request.

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

The name of the approval rule you want to update.

*/ inline const Aws::String& GetApprovalRuleName() const{ return m_approvalRuleName; } /** *

The name of the approval rule you want to update.

*/ inline bool ApprovalRuleNameHasBeenSet() const { return m_approvalRuleNameHasBeenSet; } /** *

The name of the approval rule you want to update.

*/ inline void SetApprovalRuleName(const Aws::String& value) { m_approvalRuleNameHasBeenSet = true; m_approvalRuleName = value; } /** *

The name of the approval rule you want to update.

*/ inline void SetApprovalRuleName(Aws::String&& value) { m_approvalRuleNameHasBeenSet = true; m_approvalRuleName = std::move(value); } /** *

The name of the approval rule you want to update.

*/ inline void SetApprovalRuleName(const char* value) { m_approvalRuleNameHasBeenSet = true; m_approvalRuleName.assign(value); } /** *

The name of the approval rule you want to update.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithApprovalRuleName(const Aws::String& value) { SetApprovalRuleName(value); return *this;} /** *

The name of the approval rule you want to update.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithApprovalRuleName(Aws::String&& value) { SetApprovalRuleName(std::move(value)); return *this;} /** *

The name of the approval rule you want to update.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithApprovalRuleName(const char* value) { SetApprovalRuleName(value); return *this;} /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline const Aws::String& GetExistingRuleContentSha256() const{ return m_existingRuleContentSha256; } /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline bool ExistingRuleContentSha256HasBeenSet() const { return m_existingRuleContentSha256HasBeenSet; } /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline void SetExistingRuleContentSha256(const Aws::String& value) { m_existingRuleContentSha256HasBeenSet = true; m_existingRuleContentSha256 = value; } /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline void SetExistingRuleContentSha256(Aws::String&& value) { m_existingRuleContentSha256HasBeenSet = true; m_existingRuleContentSha256 = std::move(value); } /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline void SetExistingRuleContentSha256(const char* value) { m_existingRuleContentSha256HasBeenSet = true; m_existingRuleContentSha256.assign(value); } /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithExistingRuleContentSha256(const Aws::String& value) { SetExistingRuleContentSha256(value); return *this;} /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithExistingRuleContentSha256(Aws::String&& value) { SetExistingRuleContentSha256(std::move(value)); return *this;} /** *

The SHA-256 hash signature for the content of the approval rule. You can * retrieve this information by using GetPullRequest.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithExistingRuleContentSha256(const char* value) { SetExistingRuleContentSha256(value); return *this;} /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline const Aws::String& GetNewRuleContent() const{ return m_newRuleContent; } /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline bool NewRuleContentHasBeenSet() const { return m_newRuleContentHasBeenSet; } /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline void SetNewRuleContent(const Aws::String& value) { m_newRuleContentHasBeenSet = true; m_newRuleContent = value; } /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline void SetNewRuleContent(Aws::String&& value) { m_newRuleContentHasBeenSet = true; m_newRuleContent = std::move(value); } /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline void SetNewRuleContent(const char* value) { m_newRuleContentHasBeenSet = true; m_newRuleContent.assign(value); } /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithNewRuleContent(const Aws::String& value) { SetNewRuleContent(value); return *this;} /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithNewRuleContent(Aws::String&& value) { SetNewRuleContent(std::move(value)); return *this;} /** *

The updated content for the approval rule.

When you update the * content of the approval rule, you can specify approvers in an approval pool in * one of two ways:

  • CodeCommitApprovers: This option only * requires an AWS account and a resource. It can be used for both IAM users and * federated access users whose name matches the provided resource name. This is a * very powerful option that offers a great deal of flexibility. For example, if * you specify the AWS account 123456789012 and Mary_Major, all of * the following are counted as approvals coming from that user:

    • *

      An IAM user in the account * (arn:aws:iam::123456789012:user/Mary_Major)

    • A * federated user identified in IAM as Mary_Major * (arn:aws:sts::123456789012:federated-user/Mary_Major)

    • *

    This option does not recognize an active session of someone assuming * the role of CodeCommitReview with a role session name of Mary_Major * (arn:aws:sts::123456789012:assumed-role/CodeCommitReview/Mary_Major) * unless you include a wildcard (*Mary_Major).

  • Fully * qualified ARN: This option allows you to specify the fully qualified Amazon * Resource Name (ARN) of the IAM user or role.

For more * information about IAM ARNs, wildcards, and formats, see IAM * Identifiers in the IAM User Guide.

*/ inline UpdatePullRequestApprovalRuleContentRequest& WithNewRuleContent(const char* value) { SetNewRuleContent(value); return *this;} private: Aws::String m_pullRequestId; bool m_pullRequestIdHasBeenSet = false; Aws::String m_approvalRuleName; bool m_approvalRuleNameHasBeenSet = false; Aws::String m_existingRuleContentSha256; bool m_existingRuleContentSha256HasBeenSet = false; Aws::String m_newRuleContent; bool m_newRuleContentHasBeenSet = false; }; } // namespace Model } // namespace CodeCommit } // namespace Aws