{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "deletionPolicy": {
          "enum": [
            "Delete",
            "Retain"
          ],
          "type": "string"
        },
        "driver": {
          "type": "string"
        },
        "source": {
          "properties": {
            "groupSnapshotHandles": {
              "properties": {
                "volumeGroupSnapshotHandle": {
                  "type": "string"
                },
                "volumeSnapshotHandles": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "volumeGroupSnapshotHandle",
                "volumeSnapshotHandles"
              ],
              "type": "object",
              "x-kubernetes-validations": [
                {
                  "message": "groupSnapshotHandles is immutable",
                  "rule": "self == oldSelf"
                }
              ]
            },
            "volumeHandles": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-kubernetes-validations": [
                {
                  "message": "volumeHandles is immutable",
                  "rule": "self == oldSelf"
                }
              ]
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "volumeHandles is required once set",
              "rule": "!has(oldSelf.volumeHandles) || has(self.volumeHandles)"
            },
            {
              "message": "groupSnapshotHandles is required once set",
              "rule": "!has(oldSelf.groupSnapshotHandles) || has(self.groupSnapshotHandles)"
            },
            {
              "message": "exactly one of volumeHandles and groupSnapshotHandles must be set",
              "rule": "(has(self.volumeHandles) && !has(self.groupSnapshotHandles)) || (!has(self.volumeHandles) && has(self.groupSnapshotHandles))"
            }
          ]
        },
        "volumeGroupSnapshotClassName": {
          "type": "string"
        },
        "volumeGroupSnapshotRef": {
          "properties": {
            "apiVersion": {
              "type": "string"
            },
            "fieldPath": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "resourceVersion": {
              "type": "string"
            },
            "uid": {
              "type": "string"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "x-kubernetes-validations": [
            {
              "message": "both volumeGroupSnapshotRef.name and volumeGroupSnapshotRef.namespace must be set",
              "rule": "has(self.name) && has(self.__namespace__)"
            }
          ]
        }
      },
      "required": [
        "deletionPolicy",
        "driver",
        "source",
        "volumeGroupSnapshotRef"
      ],
      "type": "object"
    },
    "status": {
      "properties": {
        "creationTime": {
          "format": "date-time",
          "type": "string"
        },
        "error": {
          "properties": {
            "message": {
              "type": "string"
            },
            "time": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "readyToUse": {
          "type": "boolean"
        },
        "volumeGroupSnapshotHandle": {
          "type": "string"
        },
        "volumeSnapshotHandlePairList": {
          "items": {
            "properties": {
              "snapshotHandle": {
                "type": "string"
              },
              "volumeHandle": {
                "type": "string"
              }
            },
            "required": [
              "snapshotHandle",
              "volumeHandle"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
