{
  "description": "Auto-generated derived type for SnapshotSpec via `CustomResource`",
  "properties": {
    "spec": {
      "additionalProperties": false,
      "description": "A single kopia snapshot represented as a Kubernetes object.",
      "properties": {
        "deletionPolicy": {
          "description": "Lifecycle of the underlying kopia snapshot when its `Snapshot` CR is deleted.\nProduced backups default to `Delete`; discovered snapshots are forced to `Retain`.",
          "enum": [
            "Delete",
            "Retain",
            "Orphan"
          ],
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "description": "Free-form text recorded on the kopia snapshot manifest\n(`snapshot create --description`). Per-invocation by nature —\nscheduled/discovered `Snapshot`s never set this (no templated\ndescriptions).",
          "maxLength": 1024,
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "failurePolicy": {
          "additionalProperties": false,
          "description": "Mover Job retry and deadline limits for this run.",
          "nullable": true,
          "properties": {
            "activeDeadlineSeconds": {
              "description": "Mover `Job.spec.activeDeadlineSeconds` — wall-clock cap after which a running run is killed.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "backoffLimit": {
              "description": "Mover `Job.spec.backoffLimit` — retries before a failed run is marked failed.",
              "format": "int32",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "podStartupDeadlineSeconds": {
              "description": "Seconds a non-starting (wedged) mover pod may sit before the run is failed; default 300s.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "mover": {
          "additionalProperties": false,
          "description": "Per-run mover overrides for THIS snapshot's Job (resources, cache budgets,\n`securityContext`, `privilegedMode`, `ttlSecondsAfterFinished`).\n\nLayered field-wise as `repository.moverDefaults \u003c policyRef's mover \u003c\nthis mover` — the highest layer that sets a field wins, and a field you\nomit falls through, so a partial override here can only adjust what it\nnames. This exists so an ad-hoc one-shot (`kubectl create` before a risky\nchange, a debug run that needs more memory or a different UID) does not\nrequire editing the shared, GitOps-managed `SnapshotPolicy` that every\nscheduled run also uses.\n\nTwo deliberate exclusions:\n\n* `mover.cache` here is **run-scoped only**. It sets this run's kopia cache\n  budgets (`--content-cache-size-mb`/`--metadata-cache-size-mb`) and, when\n  the cache is `Ephemeral`, that Job's cache-volume `capacity` and\n  `storageClassName` — a generic ephemeral volume bound to this pod and\n  GC'd with it. What it cannot touch is anything **shared**: `cache.mode`\n  is policy-owned (a per-run `mode: Persistent` never mints the shared\n  PVC), and under `mode: Persistent` the PVC's own `capacity`/\n  `storageClassName` come from the policy alone, because that claim is\n  named per-POLICY and every sibling `Snapshot` depends on it.\n\n* `inheritSecurityContextFrom.snapshot` is restore-only and rejected here,\n  exactly as on `SnapshotPolicy`: a backup's identity comes from the live\n  workload; it is the run that *records* an identity.\n\nAn elevated mover assembled here is gated by the namespace's\n`privileged-movers` opt-in just like a policy-level one — the gate runs on\nthe merged result.",
          "nullable": true,
          "properties": {
            "cache": {
              "additionalProperties": false,
              "description": "Override the repository's [`CacheDefaults`] for this recipe's movers.",
              "nullable": true,
              "properties": {
                "capacity": {
                  "description": "Size of the PVC backing the mover's kopia cache (e.g. `10Gi`).",
                  "nullable": true,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contentCacheSizeMb": {
                  "description": "kopia content cache budget in MiB (`--content-cache-size-mb`).",
                  "format": "int64",
                  "nullable": true,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "metadataCacheSizeMb": {
                  "description": "kopia metadata cache budget in MiB (`--metadata-cache-size-mb`).",
                  "format": "int64",
                  "nullable": true,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mode": {
                  "description": "How a mover's kopia cache volume is provisioned.",
                  "enum": [
                    "Ephemeral",
                    "Persistent"
                  ],
                  "nullable": true,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "storageClassName": {
                  "description": "StorageClass for the cache PVC; absent uses the cluster default.",
                  "nullable": true,
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "inheritSecurityContextFrom": {
              "additionalProperties": false,
              "description": "Copy the UID/GID security context from a live workload rather than hard-coding it.\n\nRequires the workload to pin `runAsUser` (container or pod level): a UID that comes\nfrom the container image's `USER` line is invisible in the pod spec and cannot be\ninherited — the mover would silently run as its own image's UID instead.\n\nMay be combined with `securityContext`/`podSecurityContext`, which override it\nfield-wise and act as the fallback when no workload pod can be resolved.",
              "nullable": true,
              "oneOf": [
                {
                  "required": [
                    "workloadSelector"
                  ]
                },
                {
                  "required": [
                    "pvcConsumer"
                  ]
                },
                {
                  "required": [
                    "snapshot"
                  ]
                }
              ],
              "properties": {
                "pvcConsumer": {
                  "additionalProperties": false,
                  "description": "Backup sources only: auto-derive the workload from the PVC this snapshot backs up.",
                  "properties": {
                    "container": {
                      "description": "Which container within the matched consumer pod to inherit from; absent uses the first/only.",
                      "nullable": true,
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "snapshot": {
                  "description": "Restores only: inherit the identity RECORDED on the backup itself\n(`Snapshot.status.recorded`, decoded from the `kopiur-meta` kopia tag) —\nuid/gid/fsGroup the backup mover actually ran as. Needs no live workload\npod, so it works on a rebuilt cluster and with `target.populator`.\nRejected at admission on SnapshotPolicy/Maintenance (backups read the\nlive workload; maintenance has no snapshot). Write it as `snapshot: {}`\n(an empty sub-object) — a bare `snapshot:` is null and rejected.",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "workloadSelector": {
                  "additionalProperties": false,
                  "description": "Inherit from workload pod(s) matched by an explicit label selector (backup or restore).",
                  "properties": {
                    "container": {
                      "description": "Which container within the matched pod; absent uses the first/only container.",
                      "nullable": true,
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "podSelector": {
                      "additionalProperties": false,
                      "description": "Label selector matching the workload pod(s) to read context/hooks from.",
                      "properties": {
                        "matchExpressions": {
                          "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                          "items": {
                            "additionalProperties": false,
                            "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
                            "properties": {
                              "key": {
                                "description": "key is the label key that the selector applies to.",
                                "type": "string"
                              },
                              "operator": {
                                "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
                                "type": "string"
                              },
                              "values": {
                                "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.",
                                "items": {
                                  "type": "string"
                                },
                                "type": [
                                  "array",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "key",
                              "operator"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "matchLabels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    }
                  },
                  "required": [
                    "podSelector"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": "object"
            },
            "podSecurityContext": {
              "additionalProperties": false,
              "description": "Pod security context for the mover (notably `fsGroup` for group-writable restore\nvolumes). Same layering as `securityContext`: highest layer, merged field-wise, and\ncombinable with `inheritSecurityContextFrom`.",
              "nullable": true,
              "properties": {
                "appArmorProfile": {
                  "additionalProperties": false,
                  "description": "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "localhostProfile": {
                      "description": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "description": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n  Localhost - a profile pre-loaded on the node.\n  RuntimeDefault - the container runtime's default profile.\n  Unconfined - no AppArmor enforcement.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "fsGroup": {
                  "description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "fsGroupChangePolicy": {
                  "description": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "runAsGroup": {
                  "description": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "runAsNonRoot": {
                  "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "runAsUser": {
                  "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "seLinuxChangePolicy": {
                  "description": "seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\".\n\n\"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.\n\n\"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled.\n\nIf not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes.\n\nThis field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.\n\nAll Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "seLinuxOptions": {
                  "additionalProperties": false,
                  "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container.  May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "level": {
                      "description": "Level is SELinux level label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "description": "Role is a SELinux role label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "description": "Type is a SELinux type label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "user": {
                      "description": "User is a SELinux user label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "seccompProfile": {
                  "additionalProperties": false,
                  "description": "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "localhostProfile": {
                      "description": "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "description": "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "supplementalGroups": {
                  "description": "A list of groups applied to the first process run in each container, in addition to the container's primary GID and fsGroup (if specified).  If the SupplementalGroupsPolicy feature is enabled, the supplementalGroupsPolicy field determines whether these are in addition to or instead of any group memberships defined in the container image. If unspecified, no additional groups are added, though group memberships defined in the container image may still be used, depending on the supplementalGroupsPolicy field. Note that this field cannot be set when spec.os.name is windows.",
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "supplementalGroupsPolicy": {
                  "description": "Defines how supplemental groups of the first container processes are calculated. Valid values are \"Merge\" and \"Strict\". If not specified, \"Merge\" is used. (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled and the container runtime must implement support for this feature. Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sysctls": {
                  "description": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.",
                  "items": {
                    "additionalProperties": false,
                    "description": "Sysctl defines a kernel parameter to be set",
                    "properties": {
                      "name": {
                        "description": "Name of a property to set",
                        "type": "string"
                      },
                      "value": {
                        "description": "Value of a property to set",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "value"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "windowsOptions": {
                  "additionalProperties": false,
                  "description": "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.",
                  "properties": {
                    "gmsaCredentialSpec": {
                      "description": "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "gmsaCredentialSpecName": {
                      "description": "GMSACredentialSpecName is the name of the GMSA credential spec to use.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "hostProcess": {
                      "description": "HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.",
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "runAsUserName": {
                      "description": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "privilegedMode": {
              "description": "Opt-in, namespace-gated privileged mode; preserves UID/GID on restore.",
              "nullable": true,
              "type": [
                "boolean",
                "null"
              ]
            },
            "resources": {
              "additionalProperties": false,
              "description": "Resource requests/limits for the mover container.",
              "nullable": true,
              "properties": {
                "claims": {
                  "description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.",
                  "items": {
                    "additionalProperties": false,
                    "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                    "properties": {
                      "name": {
                        "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
                        "type": "string"
                      },
                      "request": {
                        "description": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "limits": {
                  "additionalProperties": {
                    "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` \u003cquantity\u003e        ::= \u003csignedNumber\u003e\u003csuffix\u003e\n\n\t(Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\n\u003cdigit\u003e           ::= 0 | 1 | ... | 9 \u003cdigits\u003e          ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e          ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e            ::= \"+\" | \"-\" \u003csignedNumber\u003e    ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e          ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e        ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n\u003cdecimalSI\u003e       ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ],
                    "x-kubernetes-int-or-string": true
                  },
                  "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "additionalProperties": {
                    "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` \u003cquantity\u003e        ::= \u003csignedNumber\u003e\u003csuffix\u003e\n\n\t(Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\n\u003cdigit\u003e           ::= 0 | 1 | ... | 9 \u003cdigits\u003e          ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e          ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e            ::= \"+\" | \"-\" \u003csignedNumber\u003e    ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e          ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e        ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n\u003cdecimalSI\u003e       ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ],
                    "x-kubernetes-int-or-string": true
                  },
                  "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "securityContext": {
              "additionalProperties": false,
              "description": "Container security context for the mover; merged field-wise over the hardened base,\n`moverDefaults`, and any inherited context — this is the highest layer, so every field\nset here wins. Combines with `inheritSecurityContextFrom`: fields you set override the\nworkload's, fields you omit are inherited, and this context stands in alone when\ninheritance cannot resolve a pod.",
              "nullable": true,
              "properties": {
                "allowPrivilegeEscalation": {
                  "description": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "appArmorProfile": {
                  "additionalProperties": false,
                  "description": "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "localhostProfile": {
                      "description": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "description": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n  Localhost - a profile pre-loaded on the node.\n  RuntimeDefault - the container runtime's default profile.\n  Unconfined - no AppArmor enforcement.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "capabilities": {
                  "additionalProperties": false,
                  "description": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "add": {
                      "description": "Added capabilities",
                      "items": {
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "drop": {
                      "description": "Removed capabilities",
                      "items": {
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "privileged": {
                  "description": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "procMount": {
                  "description": "procMount denotes the type of proc mount to use for the containers. The default value is Default which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "readOnlyRootFilesystem": {
                  "description": "Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "runAsGroup": {
                  "description": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "runAsNonRoot": {
                  "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "runAsUser": {
                  "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "seLinuxOptions": {
                  "additionalProperties": false,
                  "description": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container.  May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "level": {
                      "description": "Level is SELinux level label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "description": "Role is a SELinux role label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "description": "Type is a SELinux type label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "user": {
                      "description": "User is a SELinux user label that applies to the container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "seccompProfile": {
                  "additionalProperties": false,
                  "description": "The seccomp options to use by this container. If seccomp options are provided at both the pod \u0026 container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.",
                  "properties": {
                    "localhostProfile": {
                      "description": "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "type": {
                      "description": "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "windowsOptions": {
                  "additionalProperties": false,
                  "description": "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.",
                  "properties": {
                    "gmsaCredentialSpec": {
                      "description": "GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "gmsaCredentialSpecName": {
                      "description": "GMSACredentialSpecName is the name of the GMSA credential spec to use.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "hostProcess": {
                      "description": "HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.",
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "runAsUserName": {
                      "description": "The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "ttlSecondsAfterFinished": {
              "description": "Per-recipe override of `Job.spec.ttlSecondsAfterFinished` so finished Jobs self-GC.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "onScheduleDelete": {
          "description": "What the deletion of a `SnapshotSchedule` does to the `Snapshot` CRs it\nproduced (which Kubernetes GC cascade-deletes via their ownerReference).\nDefault `Retain`: the CRs are removed but their kopia snapshots survive and\nthe catalog rediscovers them as `origin: discovered`. `Delete` opts into the\ncascade: each Snapshot's own `deletionPolicy` applies.\n\nDeliberately 2-variant (not reusing [`DeletionPolicy`]): an `Orphan` in\ncascade position would differ from `Retain` only in per-CR event/metric\nbookkeeping — an invalid state made unrepresentable. The guard's `Retain`\nis exactly `DeletionPolicy::Retain`'s semantics (CR removed, kopia snapshot\nstays, catalog rediscovers it), deliberately NOT the `Orphan` event storm\n(no per-CR \"orphaned\" event/metric for every produced Snapshot).",
          "enum": [
            "Retain",
            "Delete"
          ],
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "pin": {
          "description": "Exempt this snapshot from GFS retention.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "policyRef": {
          "additionalProperties": false,
          "description": "The `SnapshotPolicy` recipe to run; absent for `discovered` backups.",
          "nullable": true,
          "properties": {
            "name": {
              "description": "Name of the referenced `SnapshotPolicy`.",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the `SnapshotPolicy`; absent = same namespace as the referrer.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "name"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "repository": {
          "additionalProperties": false,
          "description": "The ONE repository this `Snapshot` targets, pinned by value at mint\ntime. Stamped by a multi-repository `SnapshotPolicy` fan-out (each child\ncovers exactly one member of the policy's repository set) and by\n`SnapshotReplication` copy CRs (the destination repository). Absent for\nthe legacy single-repository case, where the policy's own\n`spec.repository` (or, for catalog rows, the owning repository CR) is\nthe answer — an absent pin resolves exactly as before this field\nexisted, so pre-feature `Snapshot`s are untouched.",
          "nullable": true,
          "properties": {
            "kind": {
              "default": "Repository",
              "description": "Which repository CRD this points at; defaults to [`RepositoryKind::Repository`].",
              "enum": [
                "Repository",
                "ClusterRepository"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "description": "Name of the referenced `Repository`/`ClusterRepository`.",
              "type": "string"
            },
            "namespace": {
              "description": "Cross-namespace `Repository` reference; ignored/forbidden for `ClusterRepository`.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "name"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "source": {
          "additionalProperties": false,
          "description": "The ONE concrete source this `Snapshot` covers, when `policyRef` names a\nrecipe whose `sources[]` expands to many — i.e. a\n[`pvcSelector`](crate::snapshot_policy::PvcSelector).\n\nStamped by whoever minted the CR: a `SnapshotSchedule` fire, or\n`kubectl kopiur snapshot now`. Absent for the ordinary single-source\ncase, where the policy's own `sources[0]` is the target.\n\nAbsent against a *selector* policy is refused rather than guessed. The\noperator must never pick a PVC on the user's behalf: silently backing up\none arbitrary volume out of N looks exactly like success.",
          "nullable": true,
          "properties": {
            "group": {
              "additionalProperties": false,
              "description": "The consistency group this child belongs to, present only when the\npolicy asked for one (`groupBy: VolumeGroupSnapshot`) AND the expansion\nproduced more than one member in this namespace.",
              "nullable": true,
              "properties": {
                "namespace": {
                  "description": "Namespace the `VolumeGroupSnapshot` lives in.\n\nA `VolumeGroupSnapshot` is namespaced and its `source.selector` is\nnamespace-local, so a selector spanning namespaces yields ONE GROUP PER\nNAMESPACE, not one group. The consistency guarantee is per-namespace and\nthis field is where that shows.",
                  "type": "string"
                },
                "volumeGroupSnapshotName": {
                  "description": "Name of the shared `VolumeGroupSnapshot`.",
                  "type": "string"
                }
              },
              "required": [
                "namespace",
                "volumeGroupSnapshotName"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "sourceIndex": {
              "description": "Zero-based index into `policyRef`'s `spec.sources` this child expanded\nfrom.\n\nPins WHICH source's knobs (`readOnly`, `sourcePathOverride`,\n`sourcePathStrategy`, `acknowledgeLiveMutation`) govern this run, so a\npolicy carrying several sources stays unambiguous. An index that is out\nof range at reconcile time — the policy shrank mid-run — is a named\nterminal failure, never a silent fallback to `sources[0]`.",
              "format": "uint32",
              "minimum": 0,
              "type": "integer"
            },
            "target": {
              "additionalProperties": false,
              "description": "What the expansion resolved to.",
              "oneOf": [
                {
                  "required": [
                    "pvc"
                  ]
                }
              ],
              "properties": {
                "pvc": {
                  "additionalProperties": false,
                  "description": "One `PersistentVolumeClaim`, fully qualified.",
                  "properties": {
                    "name": {
                      "description": "Name of the matched `PersistentVolumeClaim`.",
                      "type": "string"
                    },
                    "namespace": {
                      "description": "Namespace of the matched `PersistentVolumeClaim`.\n\nExplicit rather than inferred from the `Snapshot`'s own namespace: a\n`pvcSelector` under a `ClusterRepository` may match across namespaces.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "namespace"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": "object"
            }
          },
          "required": [
            "sourceIndex",
            "target"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Free-form tags attached to the kopia snapshot manifest itself\n(`snapshot create --tags`), e.g. `reason: pre-upgrade` — durable in the\nrepository, independent of this CR. Keys must be non-empty, colon-free\n(kopia splits on the first colon), and must not start with the reserved\n`kopiur` prefix; at most 10 tags, keys ≤ 63 bytes, values ≤ 256 bytes\n(webhook-enforced).",
          "nullable": true,
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "description": "Observed state of a [`Snapshot`].",
      "nullable": true,
      "properties": {
        "cleanup": {
          "additionalProperties": false,
          "description": "Post-run cleanup bookkeeping, so each cleanup runs at most once per Snapshot.",
          "nullable": true,
          "properties": {
            "credsReapedAt": {
              "description": "When the run's projected credential Secrets were reclaimed (RFC 3339);\nabsent until the reap has run. A projected copy is only needed while a mover\nJob can still load it via `envFrom`, but it is owner-ref'd to this CR, which\nlong outlives that Job — so without an explicit reap it would sit in the\nworkload namespace holding live repository credentials until the CR is pruned\n(#240).",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "conditions": {
          "description": "Standard Kubernetes conditions (e.g. `SourcesQuiesced`, `SnapshotCreated`).",
          "items": {
            "additionalProperties": false,
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition. This may be an empty string.",
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "copiedFrom": {
          "additionalProperties": false,
          "description": "Lineage for `origin: replicated` rows: the source repository, source\nmanifest id, and `startTime` the copy was migrated from. Written by the\n`SnapshotReplication` mover in the same atomic PATCH as\n`status.snapshot`; absent on every other origin. See [`CopiedFrom`] for\nwhy this lives on the CR rather than as kopia tags.",
          "nullable": true,
          "properties": {
            "repository": {
              "additionalProperties": false,
              "description": "The SOURCE repository the snapshot was migrated from (the\n`SnapshotReplication`'s `sourceRef`, resolved at run time).",
              "properties": {
                "kind": {
                  "default": "Repository",
                  "description": "Which repository CRD this points at; defaults to [`RepositoryKind::Repository`].",
                  "enum": [
                    "Repository",
                    "ClusterRepository"
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "description": "Name of the referenced `Repository`/`ClusterRepository`.",
                  "type": "string"
                },
                "namespace": {
                  "description": "Cross-namespace `Repository` reference; ignored/forbidden for `ClusterRepository`.",
                  "nullable": true,
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "sourceManifestId": {
              "description": "The kopia manifest id the snapshot had in the SOURCE repository.\nMigrate assigns a NEW manifest id on the destination\n(`status.snapshot.kopiaSnapshotID`); this is the old one, kept for\ncross-repository correlation.",
              "type": "string"
            },
            "startTime": {
              "description": "The snapshot's RFC3339 `startTime` — preserved verbatim by migrate and\nthe key (together with the identity triple) both idempotent re-migration\nand `pruning: mirrorSource` correlate source and destination rows on.",
              "type": "string"
            }
          },
          "required": [
            "repository",
            "sourceManifestId",
            "startTime"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "failure": {
          "additionalProperties": false,
          "description": "Structured terminal-failure detail (kopia error class, stderr tail, retry hint).",
          "nullable": true,
          "properties": {
            "exitCode": {
              "description": "The process exit code, if one was reported.",
              "format": "int32",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "kopiaErrorClass": {
              "description": "kopia error class (e.g. `RepositoryUnavailable`, `AuthFailure`).",
              "type": "string"
            },
            "message": {
              "description": "A short human-readable message: what failed, why, and how to fix it.",
              "type": "string"
            },
            "op": {
              "description": "The mover operation that failed, as a stable label (e.g.\n`repository connect`, `snapshot create`) — the values of the mover's\n`KopiaOp::as_str()`. Distinguishes a repository-level connect failure\nfrom a source-level failure (a broken PVC), which share\n`kopiaErrorClass` values (e.g. `NotFound`). Absent on failures that\noccurred outside a kopia invocation.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "retryRecommended": {
              "description": "Whether retrying the same operation unchanged could succeed.",
              "type": "boolean"
            },
            "stderrTail": {
              "description": "The last lines of kopia's stderr, if any were captured (bounded by\n[`MAX_LOG_TAIL_BYTES`]).",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "kopiaErrorClass",
            "message",
            "retryRecommended"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "hooks": {
          "additionalProperties": false,
          "description": "Hook-execution bookkeeping so each hook list runs exactly once per Snapshot.",
          "nullable": true,
          "properties": {
            "postCompletedAt": {
              "description": "When the `afterSnapshot` list completed (RFC3339); absent until it has.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "preCompletedAt": {
              "description": "When the `beforeSnapshot` list completed (RFC3339); absent until it has.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "job": {
          "additionalProperties": false,
          "description": "The mover Job backing this run; absent for discovered.",
          "nullable": true,
          "properties": {
            "attempts": {
              "description": "Number of attempts so far (bounded by `failurePolicy.backoffLimit`).",
              "format": "int32",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "name": {
              "description": "Name of the mover `Job`.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "logTail": {
          "description": "The last lines of the run's output, written by the mover at the terminal transition.",
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "observedGeneration": {
          "description": "`metadata.generation` last reconciled, for staleness detection.",
          "format": "int64",
          "nullable": true,
          "type": [
            "integer",
            "null"
          ]
        },
        "origin": {
          "description": "How a `Snapshot` came to exist. Canonical value mirrored from the\n`kopiur.home-operations.com/origin` label. Origin drives the deletion-policy\ndefault: `discovered` backups are forced to `Retain` because the operator did\nnot create those snapshots.",
          "enum": [
            "scheduled",
            "manual",
            "discovered",
            "adopted",
            "replicated"
          ],
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "phase": {
          "description": "Lifecycle phase of a `Snapshot`.",
          "enum": [
            "Pending",
            "Running",
            "Succeeded",
            "Failed",
            "Deleting",
            "Discovered",
            "Unchanged"
          ],
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "pinned": {
          "description": "The observed kopia-side pin state: `Some(true)` if pinned, `Some(false)` if unpinned, `None` before any pin reconcile.",
          "nullable": true,
          "type": [
            "boolean",
            "null"
          ]
        },
        "preflightSince": {
          "description": "RFC 3339 timestamp of the first reconcile where the repository was `Ready`\nbut a `spec.preflight` check was failing. The one-shot anchor for the\npreflight `timeout` deadline (so the budget covers preflight only, not the\nearlier repository-not-Ready wait). Cleared once every preflight check passes,\nso a later failing episode gets a fresh budget rather than a stale anchor.",
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "recorded": {
          "additionalProperties": false,
          "description": "The mover identity recorded on the kopia snapshot itself (the\n`kopiur-meta` tag): the resolved effective uid/gid/fsGroup the backup ran\nas, plus its provenance. Produced runs stamp this at launch (from the\nsame value written into the tag); discovered rows decode it from the tag\nduring the catalog scan. Absent for pre-feature snapshots, foreign\nbackups without the tag, or a tag this operator version cannot decode.",
          "nullable": true,
          "properties": {
            "fsGroup": {
              "description": "The resolved pod-level `fsGroup` the mover ran with (the hardened\ndefault is `65532`). Absent = no layer set one.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "gid": {
              "description": "The resolved effective `runAsGroup` the mover ran as at backup time\n(container `runAsGroup`, else pod). Absent = image-determined.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "schema": {
              "description": "The `kopiur-meta` schema version this value was written under. Writers\nemit the lowest schema that represents the data (currently\n[`KOPIUR_META_SCHEMA_V1`]); readers reject only a schema NEWER than they\nunderstand (degrading to recorded-absent, never an error).",
              "format": "int64",
              "type": "integer"
            },
            "src": {
              "description": "Which layer pinned the recorded identity. Only `inherited` means the\nidentity tracked the workload.",
              "enum": [
                "inherited",
                "explicit",
                "defaults",
                "unknown"
              ],
              "type": "string"
            },
            "uid": {
              "description": "The resolved effective `runAsUser` the mover ran as at backup time\n(container `runAsUser`, else pod). Absent = no layer pinned a UID, so\nthe mover's UID was image-determined.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "schema",
            "src"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "resolved": {
          "additionalProperties": false,
          "description": "Frozen recipe values at run time (scheduled/manual).",
          "nullable": true,
          "properties": {
            "credentialProjection": {
              "additionalProperties": false,
              "description": "The recipe's `spec.credentialProjection` as it stood for this run.\n\nThe deletion path re-projects the mover's credentials, but the opt-in lives on the\n`SnapshotPolicy` — which a user may delete first. Pinning it here lets the finalizer\nhonor the opt-in that was actually in force, instead of reading an absent recipe as\n\"projection off\" and blocking on a Secret that was never meant to be namespace-local\n(#255). Absent only on a `Snapshot` that predates the pin or never ran; a run always\nwrites it, including `enabled: false`, so absent stays distinguishable from off.",
              "nullable": true,
              "properties": {
                "enabled": {
                  "default": false,
                  "description": "Copy the repository's credential Secret(s) into the namespace of each mover Job; off by default.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "repository": {
              "additionalProperties": false,
              "description": "The repository this run targeted, frozen at run time.",
              "nullable": true,
              "properties": {
                "kind": {
                  "default": "Repository",
                  "description": "Which repository CRD this points at; defaults to [`RepositoryKind::Repository`].",
                  "enum": [
                    "Repository",
                    "ClusterRepository"
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "description": "Name of the referenced `Repository`/`ClusterRepository`.",
                  "type": "string"
                },
                "namespace": {
                  "description": "Cross-namespace `Repository` reference; ignored/forbidden for `ClusterRepository`.",
                  "nullable": true,
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "sources": {
              "description": "The concrete PVCs + source paths backed up this run.",
              "items": {
                "additionalProperties": false,
                "description": "One resolved source backed up by a run — a concrete PVC and its kopia path.",
                "properties": {
                  "pvc": {
                    "description": "`namespace/name` of the PVC, as kopia sees it.",
                    "nullable": true,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sourcePath": {
                    "description": "The source path kopia recorded for this PVC.",
                    "nullable": true,
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "snapshot": {
          "additionalProperties": false,
          "description": "The kopia artifact this CR represents.",
          "nullable": true,
          "properties": {
            "description": {
              "description": "The kopia snapshot description (`snapshot create --description`), when\none is recorded and non-empty. For discovered rows this is copied from\nthe repository listing TRUNCATED to 1024 bytes (char-boundary-safe) —\nthe value is foreign-writer-controlled and must never fail the CR write.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "identity": {
              "additionalProperties": false,
              "description": "The `username@hostname:path` identity recorded for this snapshot.",
              "properties": {
                "hostname": {
                  "description": "The final `hostname` kopia records, fixed at admission.",
                  "type": "string"
                },
                "sourcePath": {
                  "description": "The resolved snapshot source path, when applicable (`username@hostname:path`).",
                  "nullable": true,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "username": {
                  "description": "The final `username` kopia records, fixed at admission.",
                  "type": "string"
                }
              },
              "required": [
                "hostname",
                "username"
              ],
              "type": "object"
            },
            "kopiaSnapshotID": {
              "description": "kopia's snapshot ID — the handle the finalizer uses to delete content.",
              "type": "string"
            }
          },
          "required": [
            "identity",
            "kopiaSnapshotID"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "staged": {
          "additionalProperties": false,
          "description": "The CSI staging objects the run created for `copyMethod: Snapshot`/`Clone`.",
          "nullable": true,
          "properties": {
            "copyMethod": {
              "description": "The resolved capture method (`Snapshot` or `Clone`) that produced this stage.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "pvcName": {
              "description": "Name of the staged `PersistentVolumeClaim` the mover mounts in place of the live source PVC.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "ready": {
              "description": "`true` once the stage is ready for the mover.",
              "nullable": true,
              "type": [
                "boolean",
                "null"
              ]
            },
            "stagingTimeoutSeconds": {
              "description": "The resolved `spec.staging.timeout` (seconds) pinned when the stage was\nstamped, so the running-Job staged-PVC bind watchdog never re-resolves a\npolicy that may have been edited or deleted mid-run. `0` = wait\nindefinitely.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "storageClassName": {
              "description": "StorageClass of the staged PVC — `spec.staging.storageClassName` when set,\nelse the source PVC's class. Pinned for observability (e.g. confirming a\nCephFS shallow-clone class actually took effect).",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "volumeGroupSnapshotName": {
              "description": "Name of the shared CSI `VolumeGroupSnapshot` this member staged from,\nwhen the recipe asked for a consistency group\n([`groupBy: VolumeGroupSnapshot`](crate::snapshot_policy::GroupBy)).\n\nRecorded because the group is otherwise invisible: it deliberately\ncarries no ownerReferences (see `io::group_staging`), so this is how an\noperator tells which capture a backup came from — and how `kubectl\nkopiur doctor` finds one that outlived its members.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "volumeSnapshotName": {
              "description": "Name of the `VolumeSnapshot` created from the source PVC (`copyMethod: Snapshot` only).",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "stats": {
          "additionalProperties": false,
          "description": "Byte/file counts parsed from kopia's JSON output.",
          "nullable": true,
          "properties": {
            "bytesNew": {
              "description": "Bytes newly uploaded this run (after dedup/compression).",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "filesFailed": {
              "description": "Count of source entries kopia could not read and excluded, making the snapshot incomplete.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "filesModified": {
              "description": "Count of files changed since the previous snapshot.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "filesNew": {
              "description": "Count of files new since the previous snapshot.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "filesUnchanged": {
              "description": "Count of files unchanged since the previous snapshot.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "sizeBytes": {
              "description": "Total logical size of the snapshot in bytes.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "timing": {
          "additionalProperties": false,
          "description": "Start/end/duration of the snapshot run.",
          "nullable": true,
          "properties": {
            "durationSeconds": {
              "description": "Wall-clock duration in seconds.",
              "format": "int64",
              "nullable": true,
              "type": [
                "integer",
                "null"
              ]
            },
            "endTime": {
              "description": "RFC3339 end time of the run.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            },
            "startTime": {
              "description": "RFC3339 start time of the run.",
              "nullable": true,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "title": "Snapshot",
  "type": "object"
}