{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "title": "pauhu-contact-ticket",
 "type": "object",
 "required": [
  "ticket",
  "state",
  "verified",
  "reason",
  "resume_when"
 ],
 "properties": {
  "ticket": {
   "type": "string"
  },
  "kind": {
   "enum": [
    "human",
    "machine"
   ]
  },
  "acting_for": {
   "type": [
    "string",
    "null"
   ]
  },
  "state": {
   "enum": [
    "RECEIVED",
    "REFUSED",
    "HELD",
    "AWAITING_VERIFICATION",
    "PAYMENT_REQUIRED",
    "READY",
    "OPEN_NO_PACK"
   ]
  },
  "verified": {
   "type": "boolean"
  },
  "lang": {
   "type": "string"
  },
  "cards": {
   "type": "array",
   "items": {
    "enum": [
     "sharepoint_m365",
     "snowflake",
     "sql",
     "files"
    ]
   }
  },
  "unsupported": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "pack_url": {
   "type": [
    "string",
    "null"
   ]
  },
  "price": {
   "type": [
    "object",
    "null"
   ],
   "required": [
    "unit_eur",
    "unit_usd",
    "cap_eur",
    "cap_usd",
    "rails",
    "search_billed"
   ]
  },
  "reason": {
   "type": [
    "string",
    "null"
   ]
  },
  "resume_when": {
   "type": [
    "string",
    "null"
   ]
  },
  "draft": {
   "type": "string"
  },
  "example": {
   "type": "object"
  }
 },
 "allOf": [
  {
   "if": {
    "properties": {
     "state": {
      "enum": [
       "REFUSED",
       "HELD",
       "AWAITING_VERIFICATION",
       "PAYMENT_REQUIRED",
       "OPEN_NO_PACK"
      ]
     }
    }
   },
   "then": {
    "properties": {
     "reason": {
      "type": "string"
     },
     "resume_when": {
      "type": "string"
     }
    }
   }
  }
 ]
}