{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-codecommit/json-schema/amazon-codecommit-create-pull-request-output-schema.json",
  "title": "CreatePullRequestOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-codecommit-pull-request-api-openapi.yml#/components/schemas/CreatePullRequestOutput",
  "type": "object",
  "properties": {
    "pullRequest": {
      "$ref": "#/$defs/PullRequest"
    }
  },
  "required": [
    "pullRequest"
  ],
  "$defs": {
    "ApprovalRule": {
      "type": "object",
      "properties": {
        "approvalRuleId": {
          "type": "string",
          "description": "The system-generated ID of the approval rule."
        },
        "approvalRuleName": {
          "type": "string",
          "description": "The name of the approval rule."
        },
        "approvalRuleContent": {
          "type": "string",
          "description": "The content of the approval rule."
        },
        "ruleContentSha256": {
          "type": "string",
          "description": "The SHA-256 hash signature for the content of the approval rule."
        },
        "lastModifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date the approval rule was most recently changed, in timestamp format."
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date the approval rule was created, in timestamp format."
        },
        "lastModifiedUser": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule."
        },
        "originApprovalRuleTemplate": {
          "$ref": "#/$defs/OriginApprovalRuleTemplate"
        }
      }
    },
    "MergeMetadata": {
      "type": "object",
      "properties": {
        "isMerged": {
          "type": "boolean",
          "description": "A Boolean value indicating whether the merge has been made."
        },
        "mergedBy": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the user who merged the branches."
        },
        "mergeCommitId": {
          "type": "string",
          "description": "The commit ID for the merge commit, if any."
        },
        "mergeOption": {
          "type": "string",
          "enum": [
            "FAST_FORWARD_MERGE",
            "SQUASH_MERGE",
            "THREE_WAY_MERGE"
          ],
          "description": "The merge strategy used in the merge."
        }
      }
    },
    "OriginApprovalRuleTemplate": {
      "type": "object",
      "properties": {
        "approvalRuleTemplateId": {
          "type": "string",
          "description": "The ID of the template that created the approval rule."
        },
        "approvalRuleTemplateName": {
          "type": "string",
          "description": "The name of the template that created the approval rule."
        }
      }
    },
    "PullRequest": {
      "type": "object",
      "properties": {
        "pullRequestId": {
          "type": "string",
          "description": "The system-generated ID of the pull request."
        },
        "title": {
          "type": "string",
          "description": "The user-defined title of the pull request. This title is displayed in the list of pull requests to other repository users."
        },
        "description": {
          "type": "string",
          "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."
        },
        "lastActivityDate": {
          "type": "string",
          "format": "date-time",
          "description": "The day and time of the last user or system activity on the pull request, in timestamp format."
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the pull request was originally created, in timestamp format."
        },
        "pullRequestStatus": {
          "type": "string",
          "enum": [
            "OPEN",
            "CLOSED"
          ],
          "description": "The status of the pull request. Pull request status can only change from OPEN to CLOSED."
        },
        "authorArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the user who created the pull request."
        },
        "pullRequestTargets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PullRequestTarget"
          },
          "description": "The targets of the pull request, including the source branch and destination branch for the pull request."
        },
        "clientRequestToken": {
          "type": "string",
          "description": "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."
        },
        "revisionId": {
          "type": "string",
          "description": "The system-generated revision ID for the pull request."
        },
        "approvalRules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApprovalRule"
          },
          "description": "The approval rules applied to the pull request."
        }
      }
    },
    "PullRequestTarget": {
      "type": "object",
      "properties": {
        "repositoryName": {
          "type": "string",
          "description": "The name of the repository that contains the pull request source and destination branches."
        },
        "sourceReference": {
          "type": "string",
          "description": "The branch of the repository that contains the changes for the pull request. Also known as the source branch."
        },
        "destinationReference": {
          "type": "string",
          "description": "The branch of the repository where the pull request changes are merged. Also known as the destination branch."
        },
        "destinationCommit": {
          "type": "string",
          "description": "The full commit ID that is the tip of the destination branch. This is the commit where the pull request was or will be merged."
        },
        "sourceCommit": {
          "type": "string",
          "description": "The full commit ID of the tip of the source branch used to create the pull request. If the pull request branch is updated by a push while the pull request is open, the commit ID changes to reflect the new tip of the branch."
        },
        "mergeBase": {
          "type": "string",
          "description": "The commit ID of the most recent commit that the source branch and the destination branch have in common."
        },
        "mergeMetadata": {
          "$ref": "#/$defs/MergeMetadata"
        }
      }
    }
  }
}