{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-codecommit/json-schema/amazon-codecommit-merge-branches-by-squash-input-schema.json",
  "title": "MergeBranchesBySquashInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-codecommit-operations-api-openapi.yml#/components/schemas/MergeBranchesBySquashInput",
  "type": "object",
  "properties": {
    "repositoryName": {
      "type": "string",
      "description": "The name of the repository where you want to merge two branches."
    },
    "sourceCommitSpecifier": {
      "type": "string",
      "description": "The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID)."
    },
    "destinationCommitSpecifier": {
      "type": "string",
      "description": "The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID)."
    },
    "targetBranch": {
      "type": "string",
      "description": "The branch where the merge is applied."
    },
    "conflictDetailLevel": {
      "type": "string",
      "enum": [
        "FILE_LEVEL",
        "LINE_LEVEL"
      ],
      "description": "The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line."
    },
    "conflictResolutionStrategy": {
      "type": "string",
      "enum": [
        "NONE",
        "ACCEPT_SOURCE",
        "ACCEPT_DESTINATION",
        "AUTOMERGE"
      ],
      "description": "Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful."
    },
    "authorName": {
      "type": "string",
      "description": "The name of the author who created the commit. This information is used as both the author and committer for the commit."
    },
    "email": {
      "type": "string",
      "description": "The email address of the person merging the branches. This information is used in the commit information for the merge."
    },
    "commitMessage": {
      "type": "string",
      "description": "The commit message for the merge."
    },
    "keepEmptyFolders": {
      "type": "boolean",
      "description": "If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file is created for empty folders. The default is false."
    },
    "conflictResolution": {
      "$ref": "#/$defs/ConflictResolution"
    }
  },
  "required": [
    "repositoryName",
    "sourceCommitSpecifier",
    "destinationCommitSpecifier"
  ],
  "$defs": {
    "ConflictResolution": {
      "type": "object",
      "properties": {
        "replaceContents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReplaceContentEntry"
          },
          "description": "Files to have content replaced as part of the merge conflict resolution."
        },
        "deleteFiles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeleteFileEntry"
          },
          "description": "Files to be deleted as part of the merge conflict resolution."
        },
        "setFileModes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SetFileModeEntry"
          },
          "description": "File modes that are set as part of the merge conflict resolution."
        }
      }
    },
    "DeleteFileEntry": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The full path of the file to be deleted, including the name of the file."
        }
      },
      "required": [
        "filePath"
      ]
    },
    "ReplaceContentEntry": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The path of the conflicting file."
        },
        "replacementType": {
          "type": "string",
          "enum": [
            "KEEP_BASE",
            "KEEP_SOURCE",
            "KEEP_DESTINATION",
            "USE_NEW_CONTENT"
          ],
          "description": "The replacement type to use when determining how to resolve the conflict."
        },
        "content": {
          "type": "string",
          "format": "byte",
          "description": "The base-64 encoded content to use when the replacement type is USE_NEW_CONTENT."
        },
        "fileMode": {
          "type": "string",
          "enum": [
            "EXECUTABLE",
            "NORMAL",
            "SYMLINK"
          ],
          "description": "The file mode to apply during conflict resoltion."
        }
      },
      "required": [
        "filePath",
        "replacementType"
      ]
    },
    "SetFileModeEntry": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The full path to the file, including the name of the file."
        },
        "fileMode": {
          "type": "string",
          "enum": [
            "EXECUTABLE",
            "NORMAL",
            "SYMLINK"
          ],
          "description": "The file mode for the file."
        }
      },
      "required": [
        "filePath",
        "fileMode"
      ]
    }
  }
}