{
  "name": "DeleteDeployment",
  "plane": "control",
  "terraformEligible": false,
  "protocol": {
    "kind": "cloudJson",
    "target": "CloudSites.DeleteDeployment",
    "service": "sites"
  },
  "requestBody": "typed",
  "responseBody": "typed",
  "requestSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "properties": {
      "deploymentId": {
        "type": "string"
      },
      "expectedRevision": {
        "format": "uint64",
        "minimum": 0.0,
        "type": "integer"
      },
      "siteId": {
        "type": "string"
      }
    },
    "required": [
      "deploymentId",
      "expectedRevision",
      "siteId"
    ],
    "title": "DeleteDeploymentRequest",
    "type": "object"
  },
  "responseSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
      "AsyncEffectState": {
        "enum": [
          "PENDING",
          "LEASED",
          "APPLIED",
          "TERMINAL_FAILED",
          "BLOCKED_PLATFORM"
        ],
        "type": "string"
      },
      "AsyncOperationStatus": {
        "properties": {
          "commandGeneration": {
            "format": "uint64",
            "minimum": 0.0,
            "type": "integer"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "edgePropagation": {
            "$ref": "#/definitions/EdgePropagationStatus"
          },
          "effectId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/definitions/AsyncEffectState"
          }
        },
        "required": [
          "commandGeneration",
          "edgePropagation",
          "effectId",
          "state"
        ],
        "type": "object"
      },
      "DeploymentPutUrl": {
        "properties": {
          "contentDigest": {
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "key": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "contentDigest",
          "headers",
          "key",
          "url"
        ],
        "type": "object"
      },
      "DeploymentStatus": {
        "enum": [
          "UPLOADING",
          "PUBLISHING",
          "READY",
          "FAILED",
          "DELETING",
          "DELETED"
        ],
        "type": "string"
      },
      "DeploymentUploadSession": {
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "putUrls": {
            "items": {
              "$ref": "#/definitions/DeploymentPutUrl"
            },
            "type": "array"
          },
          "uploadId": {
            "type": "string"
          }
        },
        "required": [
          "expiresAt",
          "uploadId"
        ],
        "type": "object"
      },
      "EdgePropagationStatus": {
        "enum": [
          "COMPLETE",
          "PENDING",
          "FAILED"
        ],
        "type": "string"
      }
    },
    "properties": {
      "adapterId": {
        "type": [
          "string",
          "null"
        ]
      },
      "contentDigest": {
        "type": "string"
      },
      "deploymentId": {
        "type": "string"
      },
      "detail": {
        "type": [
          "string",
          "null"
        ]
      },
      "frameworkId": {
        "type": [
          "string",
          "null"
        ]
      },
      "operation": {
        "anyOf": [
          {
            "$ref": "#/definitions/AsyncOperationStatus"
          },
          {
            "type": "null"
          }
        ]
      },
      "previewHostname": {
        "type": [
          "string",
          "null"
        ]
      },
      "revision": {
        "description": "OCC revision for DeleteDeployment / conditional writes.",
        "format": "uint64",
        "minimum": 0.0,
        "type": "integer"
      },
      "siteId": {
        "type": "string"
      },
      "status": {
        "$ref": "#/definitions/DeploymentStatus"
      },
      "upload": {
        "anyOf": [
          {
            "$ref": "#/definitions/DeploymentUploadSession"
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "contentDigest",
      "deploymentId",
      "revision",
      "siteId",
      "status"
    ],
    "title": "DeploymentDescription",
    "type": "object"
  }
}
