{
  "$id": "http://asl-validator.cloud/choice.json#",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Operator": {
      "type": "object",
      "properties": {
        "Variable": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "And": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Operator"
          }
        },
        "Or": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Operator"
          }
        },
        "Not": {
          "$ref": "#/definitions/Operator"
        },
        "IsNull": {
          "type": "boolean"
        },
        "IsPresent": {
          "type": "boolean"
        },
        "BooleanEquals": {
          "type": "boolean"
        },
        "BooleanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "IsBoolean": {
          "type": "boolean"
        },
        "NumericEquals": {
          "type": "number"
        },
        "NumericEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "NumericGreaterThan": {
          "type": "number"
        },
        "NumericGreaterThanPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "NumericGreaterThanEquals": {
          "type": "number"
        },
        "NumericGreaterThanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "NumericLessThan": {
          "type": "number"
        },
        "NumericLessThanPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "NumericLessThanEquals": {
          "type": "number"
        },
        "NumericLessThanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "IsNumeric": {
          "type": "boolean"
        },
        "StringEquals": {
          "type": "string"
        },
        "StringEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "StringGreaterThan": {
          "type": "string"
        },
        "StringGreaterThanPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "StringGreaterThanEquals": {
          "type": "string"
        },
        "StringGreaterThanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "StringLessThan": {
          "type": "string"
        },
        "StringLessThanPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "StringLessThanEquals": {
          "type": "string"
        },
        "StringLessThanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "StringMatches": {
          "type": "string"
        },
        "IsString": {
          "type": "boolean"
        },
        "TimestampEquals": {
          "type": "string"
        },
        "TimestampEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "TimestampGreaterThan": {
          "type": "string"
        },
        "TimestampGreaterThanPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "TimestampGreaterThanEquals": {
          "type": "string"
        },
        "TimestampGreaterThanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "TimestampLessThan": {
          "type": "string"
        },
        "TimestampLessThanPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "TimestampLessThanEquals": {
          "type": "string"
        },
        "TimestampLessThanEqualsPath": {
          "$ref": "paths.json#/definitions/asl_ref_path"
        },
        "IsTimestamp": {
          "type": "boolean"
        },
        "Condition": {
          "$ref": "jsonata.json#/definitions/condition"
        }
      },
      "oneOf": [
        {
          "required": ["And"]
        },
        {
          "required": ["BooleanEquals"]
        },
        {
          "required": ["BooleanEqualsPath"]
        },
        {
          "required": ["IsBoolean"]
        },
        {
          "required": ["Not"]
        },
        {
          "required": ["IsNull"]
        },
        {
          "required": ["IsPresent"]
        },
        {
          "required": ["NumericEquals"]
        },
        {
          "required": ["NumericEqualsPath"]
        },
        {
          "required": ["NumericGreaterThan"]
        },
        {
          "required": ["NumericGreaterThanPath"]
        },
        {
          "required": ["NumericGreaterThanEquals"]
        },
        {
          "required": ["NumericGreaterThanEqualsPath"]
        },
        {
          "required": ["NumericLessThan"]
        },
        {
          "required": ["NumericLessThanPath"]
        },
        {
          "required": ["NumericLessThanEquals"]
        },
        {
          "required": ["NumericLessThanEqualsPath"]
        },
        {
          "required": ["IsNumeric"]
        },
        {
          "required": ["Or"]
        },
        {
          "required": ["StringEquals"]
        },
        {
          "required": ["StringEqualsPath"]
        },
        {
          "required": ["StringGreaterThan"]
        },
        {
          "required": ["StringGreaterThanPath"]
        },
        {
          "required": ["StringGreaterThanEquals"]
        },
        {
          "required": ["StringGreaterThanEqualsPath"]
        },
        {
          "required": ["StringLessThan"]
        },
        {
          "required": ["StringLessThanPath"]
        },
        {
          "required": ["StringLessThanEquals"]
        },
        {
          "required": ["StringLessThanEqualsPath"]
        },
        {
          "required": ["StringMatches"]
        },
        {
          "required": ["IsString"]
        },
        {
          "required": ["TimestampEquals"]
        },
        {
          "required": ["TimestampEqualsPath"]
        },
        {
          "required": ["TimestampGreaterThan"]
        },
        {
          "required": ["TimestampGreaterThanPath"]
        },
        {
          "required": ["TimestampGreaterThanEquals"]
        },
        {
          "required": ["TimestampGreaterThanEqualsPath"]
        },
        {
          "required": ["TimestampLessThan"]
        },
        {
          "required": ["TimestampLessThanPath"]
        },
        {
          "required": ["TimestampLessThanEquals"]
        },
        {
          "required": ["TimestampLessThanEqualsPath"]
        },
        {
          "required": ["IsTimestamp"]
        },
        {
          "required": ["Condition"]
        }
      ]
    }
  },
  "type": "object",
  "properties": {
    "Type": {
      "type": "string",
      "enum": ["Choice"]
    },
    "Next": {
      "type": "string"
    },
    "End": {
      "enum": [true]
    },
    "Comment": {
      "type": "string"
    },
    "OutputPath": {
      "$ref": "paths.json#/definitions/asl_path"
    },
    "InputPath": {
      "$ref": "paths.json#/definitions/asl_path"
    },
    "Choices": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "Next": {
                "type": "string"
              },
              "Assign": {
                "$ref": "jsonata.json#/definitions/assign"
              }
            },
            "required": ["Next"]
          },
          {
            "$ref": "#/definitions/Operator"
          }
        ]
      }
    },
    "Default": {
      "type": "string"
    },
    "Assign": {
      "$ref": "jsonata.json#/definitions/assign"
    },
    "QueryLanguage": {
      "$ref": "jsonata.json#/definitions/queryLanguage"
    },
    "Output": {
      "$ref": "jsonata.json#/definitions/output"
    }
  },
  "required": ["Type", "Choices"],
  "additionalProperties": false
}
