{
  "type": "object",
  "properties": {
    "version": {
      "const": "quay.material/1",
      "type": "string"
    },
    "identity": {
      "type": "string"
    },
    "alias": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "category": {
      "anyOf": [
        {
          "const": "generic",
          "type": "string"
        },
        {
          "const": "wood",
          "type": "string"
        },
        {
          "const": "metal",
          "type": "string"
        },
        {
          "const": "stone",
          "type": "string"
        },
        {
          "const": "concrete",
          "type": "string"
        },
        {
          "const": "ceramic",
          "type": "string"
        },
        {
          "const": "fabric",
          "type": "string"
        },
        {
          "const": "glass",
          "type": "string"
        },
        {
          "const": "paper",
          "type": "string"
        },
        {
          "const": "plastic",
          "type": "string"
        },
        {
          "const": "paint",
          "type": "string"
        }
      ]
    },
    "shader": {
      "anyOf": [
        {
          "const": "standard",
          "type": "string"
        },
        {
          "const": "unlit",
          "type": "string"
        }
      ]
    },
    "color": {
      "type": "string"
    },
    "roughness": {
      "type": "number"
    },
    "metalness": {
      "type": "number"
    },
    "emissive": {
      "type": "string"
    },
    "emissiveIntensity": {
      "type": "number"
    },
    "opacity": {
      "type": "number"
    },
    "alphaMode": {
      "anyOf": [
        {
          "const": "opaque",
          "type": "string"
        },
        {
          "const": "mask",
          "type": "string"
        },
        {
          "const": "blend",
          "type": "string"
        }
      ]
    },
    "alphaCutoff": {
      "type": "number"
    },
    "side": {
      "anyOf": [
        {
          "const": "front",
          "type": "string"
        },
        {
          "const": "back",
          "type": "string"
        },
        {
          "const": "double",
          "type": "string"
        }
      ]
    },
    "preset": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "maps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slot": {
            "anyOf": [
              {
                "const": "color",
                "type": "string"
              },
              {
                "const": "normal",
                "type": "string"
              },
              {
                "const": "roughness",
                "type": "string"
              },
              {
                "const": "metalness",
                "type": "string"
              },
              {
                "const": "emissive",
                "type": "string"
              },
              {
                "const": "occlusion",
                "type": "string"
              },
              {
                "const": "alpha",
                "type": "string"
              }
            ]
          },
          "image": {
            "type": "object",
            "properties": {
              "assetId": {
                "type": "string"
              },
              "uri": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "byteLength": {
                "type": "number"
              },
              "mediaType": {
                "anyOf": [
                  {
                    "const": "image/png",
                    "type": "string"
                  },
                  {
                    "const": "image/jpeg",
                    "type": "string"
                  },
                  {
                    "const": "image/webp",
                    "type": "string"
                  }
                ]
              },
              "displayName": {
                "type": "string"
              }
            },
            "required": [
              "assetId",
              "uri",
              "sha256",
              "byteLength",
              "mediaType",
              "displayName"
            ],
            "additionalProperties": false
          },
          "repeat": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "minItems": 2,
            "maxItems": 2,
            "items": false
          },
          "offset": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "minItems": 2,
            "maxItems": 2,
            "items": false
          },
          "rotation": {
            "type": "number"
          },
          "wrap": {
            "anyOf": [
              {
                "const": "repeat",
                "type": "string"
              },
              {
                "const": "clamp",
                "type": "string"
              },
              {
                "const": "mirror",
                "type": "string"
              }
            ]
          }
        },
        "required": ["slot", "image", "repeat", "offset", "rotation", "wrap"],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "version",
    "identity",
    "alias",
    "label",
    "description",
    "category",
    "shader",
    "color",
    "roughness",
    "metalness",
    "emissive",
    "emissiveIntensity",
    "opacity",
    "alphaMode",
    "alphaCutoff",
    "side",
    "preset",
    "maps"
  ],
  "additionalProperties": false
}
