{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "active": {
          "type": "boolean"
        },
        "addCloudCredential": {
          "type": "boolean"
        },
        "builtin": {
          "type": "boolean"
        },
        "checksum": {
          "maxLength": 128,
          "pattern": "^$|^[a-fA-F0-9]{32,128}$",
          "type": "string"
        },
        "displayName": {
          "maxLength": 57,
          "type": "string"
        },
        "externalId": {
          "type": "string"
        },
        "uiUrl": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "whitelistDomains": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "active",
        "url"
      ],
      "type": "object",
      "x-kubernetes-validations": [
        {
          "message": "Checksum must be an md5, sha1, sha256, or sha512 digest.",
          "rule": "!has(self.checksum) || (self.checksum.size() in [0, 32, 40, 64, 128])"
        }
      ]
    },
    "status": {
      "properties": {
        "appliedChecksum": {
          "type": "string"
        },
        "appliedDockerMachineVersion": {
          "type": "string"
        },
        "appliedURL": {
          "type": "string"
        },
        "conditions": {
          "items": {
            "properties": {
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "lastUpdateTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "maxLength": 32768,
                "type": "string"
              },
              "reason": {
                "maxLength": 1024,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
