{
  "description": "VirtualMachineSnapshot defines the operation of snapshotting a VM",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource",
      "properties": {
        "deletionPolicy": {
          "description": "DeletionPolicy defines that to do with VirtualMachineSnapshot\nwhen VirtualMachineSnapshot is deleted",
          "type": "string"
        },
        "failureDeadline": {
          "description": "This time represents the number of seconds we permit the vm snapshot\nto take. In case we pass this deadline we mark this snapshot\nas failed.\nDefaults to DefaultFailureDeadline - 5min",
          "type": "string"
        },
        "overlayScratchSize": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "description": "OverlayScratchSize overrides the size of the scratch volume holding the\ncopy-on-write overlays for the duration of an External mode snapshot.\nWhen not set, the size is derived from FailureDeadline, capped by the\nsize of the snapshotted disks.\nThis field can only be set when SnapshotMode is External",
          "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
          "x-kubernetes-int-or-string": true,
          "x-kubernetes-validations": [
            {
              "message": "overlayScratchSize must be greater than zero",
              "rule": "!isQuantity(string(self)) || quantity(string(self)).isGreaterThan(quantity('0'))"
            }
          ]
        },
        "snapshotMode": {
          "default": "Direct",
          "description": "SnapshotMode selects the flow used to snapshot a running VM.\nOnly meaningful for online snapshots; offline snapshots are unaffected.\nExternal requires the ExternalVMSnapshot feature gate.\nDefaults to Direct",
          "type": "string"
        },
        "source": {
          "description": "TypedLocalObjectReference contains enough information to let you locate the\ntyped referenced object inside the same namespace.",
          "properties": {
            "apiGroup": {
              "description": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required.",
              "type": "string"
            },
            "kind": {
              "description": "Kind is the type of resource being referenced",
              "type": "string"
            },
            "name": {
              "description": "Name is the name of resource being referenced",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        }
      },
      "required": [
        "source"
      ],
      "type": "object",
      "x-kubernetes-validations": [
        {
          "message": "overlayScratchSize can only be set when snapshotMode is External",
          "rule": "!has(self.overlayScratchSize) || (has(self.snapshotMode) && self.snapshotMode == 'External')"
        }
      ],
      "additionalProperties": false
    },
    "status": {
      "description": "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource",
      "properties": {
        "conditions": {
          "items": {
            "description": "Condition defines conditions",
            "properties": {
              "lastProbeTime": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "lastTransitionTime": {
                "format": "date-time",
                "nullable": true,
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "description": "ConditionType is the const type for Conditions",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "creationTime": {
          "format": "date-time",
          "nullable": true,
          "type": "string"
        },
        "error": {
          "description": "Error is the last error encountered during the snapshot/restore",
          "properties": {
            "message": {
              "type": "string"
            },
            "time": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "indications": {
          "description": "Deprecated: Use SourceIndications instead. This field will be removed in a future version.",
          "items": {
            "description": "Indication is a way to indicate the state of the vm when taking the snapshot",
            "type": "string"
          },
          "type": "array",
          "x-kubernetes-list-type": "set"
        },
        "phase": {
          "description": "VirtualMachineSnapshotPhase is the current phase of the VirtualMachineSnapshot",
          "type": "string"
        },
        "readyToUse": {
          "type": "boolean"
        },
        "snapshotVolumes": {
          "description": "SnapshotVolumesLists includes the list of volumes which were included in the snapshot and volumes which were excluded from the snapshot",
          "properties": {
            "excludedVolumes": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-kubernetes-list-type": "set"
            },
            "includedVolumes": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "x-kubernetes-list-type": "set"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "sourceIndications": {
          "items": {
            "description": "SourceIndication provides an indication of the source VM with its description message",
            "properties": {
              "indication": {
                "description": "Indication is the indication type",
                "type": "string"
              },
              "message": {
                "description": "Message provides a description message of the indication",
                "type": "string"
              }
            },
            "required": [
              "indication",
              "message"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-type": "atomic"
        },
        "sourceUID": {
          "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
          "type": "string"
        },
        "virtualMachineSnapshotContentName": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
