{
  "description": "Restore is a Velero resource that represents the application of\nresources from a Velero backup to a target Kubernetes cluster.",
  "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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "RestoreSpec defines the specification for a Velero restore.",
      "properties": {
        "backupName": {
          "description": "BackupName is the unique name of the Velero backup to restore\nfrom.",
          "type": [
            "string",
            "null"
          ]
        },
        "excludedNamespaces": {
          "description": "ExcludedNamespaces contains a list of namespaces that are not\nincluded in the restore.",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "excludedResources": {
          "description": "ExcludedResources is a slice of resource names that are not\nincluded in the restore.",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "existingResourcePolicy": {
          "description": "ExistingResourcePolicy specifies the restore behavior for the Kubernetes resource to be restored",
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "hooks": {
          "additionalProperties": false,
          "description": "Hooks represent custom behaviors that should be executed during or post restore.",
          "properties": {
            "resources": {
              "items": {
                "additionalProperties": false,
                "description": "RestoreResourceHookSpec defines one or more RestoreResrouceHooks that should be executed based on\nthe rules defined for namespaces, resources, and label selector.",
                "properties": {
                  "excludedNamespaces": {
                    "description": "ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "excludedResources": {
                    "description": "ExcludedResources specifies the resources to which this hook spec does not apply.",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "includedNamespaces": {
                    "description": "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies\nto all namespaces.",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "includedResources": {
                    "description": "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies\nto all resources.",
                    "items": {
                      "type": "string"
                    },
                    "nullable": true,
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "labelSelector": {
                    "additionalProperties": false,
                    "description": "LabelSelector, if specified, filters the resources to which this hook spec applies.",
                    "nullable": true,
                    "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\nrelates 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.\nValid 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,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                              "items": {
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ],
                              "x-kubernetes-list-type": "atomic"
                            }
                          },
                          "required": [
                            "key",
                            "operator"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ],
                        "x-kubernetes-list-type": "atomic"
                      },
                      "matchLabels": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ],
                    "x-kubernetes-map-type": "atomic"
                  },
                  "name": {
                    "description": "Name is the name of this hook.",
                    "type": "string"
                  },
                  "postHooks": {
                    "description": "PostHooks is a list of RestoreResourceHooks to execute during and after restoring a resource.",
                    "items": {
                      "additionalProperties": false,
                      "description": "RestoreResourceHook defines a restore hook for a resource.",
                      "properties": {
                        "exec": {
                          "additionalProperties": false,
                          "description": "Exec defines an exec restore hook.",
                          "properties": {
                            "command": {
                              "description": "Command is the command and arguments to execute from within a container after a pod has been restored.",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1,
                              "type": "array"
                            },
                            "container": {
                              "description": "Container is the container in the pod where the command should be executed. If not specified,\nthe pod's first container is used.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "execTimeout": {
                              "description": "ExecTimeout defines the maximum amount of time Velero should wait for the hook to complete before\nconsidering the execution a failure.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "onError": {
                              "description": "OnError specifies how Velero should behave if it encounters an error executing this hook.",
                              "enum": [
                                "Continue",
                                "Fail"
                              ],
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "waitForReady": {
                              "description": "WaitForReady ensures command will be launched when container is Ready instead of Running.",
                              "nullable": true,
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "waitTimeout": {
                              "description": "WaitTimeout defines the maximum amount of time Velero should wait for the container to be Ready\nbefore attempting to run the command.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "command"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "init": {
                          "additionalProperties": false,
                          "description": "Init defines an init restore hook.",
                          "properties": {
                            "initContainers": {
                              "description": "InitContainers is list of init containers to be added to a pod during its restore.",
                              "items": {
                                "type": "object",
                                "x-kubernetes-preserve-unknown-fields": true
                              },
                              "type": [
                                "array",
                                "null"
                              ],
                              "x-kubernetes-preserve-unknown-fields": true
                            },
                            "timeout": {
                              "description": "Timeout defines the maximum amount of time Velero should wait for the initContainers to complete.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "includeClusterResources": {
          "description": "IncludeClusterResources specifies whether cluster-scoped resources\nshould be included for consideration in the restore. If null, defaults\nto true.",
          "nullable": true,
          "type": [
            "boolean",
            "null"
          ]
        },
        "includedNamespaces": {
          "description": "IncludedNamespaces is a slice of namespace names to include objects\nfrom. If empty, all namespaces are included.",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "includedResources": {
          "description": "IncludedResources is a slice of resource names to include\nin the restore. If empty, all resources in the backup are included.",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "itemOperationTimeout": {
          "description": "ItemOperationTimeout specifies the time used to wait for RestoreItemAction operations\nThe default value is 4 hour.",
          "type": [
            "string",
            "null"
          ]
        },
        "labelSelector": {
          "additionalProperties": false,
          "description": "LabelSelector is a metav1.LabelSelector to filter with\nwhen restoring individual objects from the backup. If empty\nor nil, all objects are included. Optional.",
          "nullable": true,
          "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\nrelates 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.\nValid 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,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                    "items": {
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "required": [
                  "key",
                  "operator"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ],
              "x-kubernetes-list-type": "atomic"
            },
            "matchLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-map-type": "atomic"
        },
        "namespaceMapping": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "NamespaceMapping is a map of source namespace names\nto target namespace names to restore into. Any source\nnamespaces not included in the map will be restored into\nnamespaces of the same name.",
          "type": [
            "object",
            "null"
          ]
        },
        "orLabelSelectors": {
          "description": "OrLabelSelectors is list of metav1.LabelSelector to filter with\nwhen restoring individual objects from the backup. If multiple provided\nthey will be joined by the OR operator. LabelSelector as well as\nOrLabelSelectors cannot co-exist in restore request, only one of them\ncan be used",
          "items": {
            "additionalProperties": false,
            "description": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.",
            "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\nrelates 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.\nValid 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,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                      "items": {
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ],
                      "x-kubernetes-list-type": "atomic"
                    }
                  },
                  "required": [
                    "key",
                    "operator"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ],
                "x-kubernetes-list-type": "atomic"
              },
              "matchLabels": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "type": "object",
            "x-kubernetes-map-type": "atomic"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "preserveNodePorts": {
          "description": "PreserveNodePorts specifies whether to restore old nodePorts from backup.",
          "nullable": true,
          "type": [
            "boolean",
            "null"
          ]
        },
        "resourceModifier": {
          "additionalProperties": false,
          "description": "ResourceModifier specifies the reference to JSON resource patches that should be applied to resources before restoration.",
          "nullable": true,
          "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",
                "null"
              ]
            },
            "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",
            "null"
          ],
          "x-kubernetes-map-type": "atomic"
        },
        "restorePVs": {
          "description": "RestorePVs specifies whether to restore all included\nPVs from snapshot",
          "nullable": true,
          "type": [
            "boolean",
            "null"
          ]
        },
        "restoreStatus": {
          "additionalProperties": false,
          "description": "RestoreStatus specifies which resources we should restore the status\nfield. If nil, no objects are included. Optional.",
          "nullable": true,
          "properties": {
            "excludedResources": {
              "description": "ExcludedResources specifies the resources to which will not restore the status.",
              "items": {
                "type": "string"
              },
              "nullable": true,
              "type": [
                "array",
                "null"
              ]
            },
            "includedResources": {
              "description": "IncludedResources specifies the resources to which will restore the status.\nIf empty, it applies to all resources.",
              "items": {
                "type": "string"
              },
              "nullable": true,
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "scheduleName": {
          "description": "ScheduleName is the unique name of the Velero schedule to restore\nfrom. If specified, and BackupName is empty, Velero will restore\nfrom the most recent successful backup created from this schedule.",
          "type": [
            "string",
            "null"
          ]
        },
        "uploaderConfig": {
          "additionalProperties": false,
          "description": "UploaderConfig specifies the configuration for the restore.",
          "nullable": true,
          "properties": {
            "parallelFilesDownload": {
              "description": "ParallelFilesDownload is the concurrency number setting for restore.",
              "type": [
                "integer",
                "null"
              ]
            },
            "writeSparseFiles": {
              "description": "WriteSparseFiles is a flag to indicate whether write files sparsely or not.",
              "nullable": true,
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "RestoreStatus captures the current status of a Velero restore",
      "properties": {
        "completionTimestamp": {
          "description": "CompletionTimestamp records the time the restore operation was completed.\nCompletion time is recorded even on failed restore.\nThe server's time is used for StartTimestamps",
          "format": "date-time",
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "errors": {
          "description": "Errors is a count of all error messages that were generated during\nexecution of the restore. The actual errors are stored in object storage.",
          "type": [
            "integer",
            "null"
          ]
        },
        "failureReason": {
          "description": "FailureReason is an error that caused the entire restore to fail.",
          "type": [
            "string",
            "null"
          ]
        },
        "hookStatus": {
          "additionalProperties": false,
          "description": "HookStatus contains information about the status of the hooks.",
          "nullable": true,
          "properties": {
            "hooksAttempted": {
              "description": "HooksAttempted is the total number of attempted hooks\nSpecifically, HooksAttempted represents the number of hooks that failed to execute\nand the number of hooks that executed successfully.",
              "type": [
                "integer",
                "null"
              ]
            },
            "hooksFailed": {
              "description": "HooksFailed is the total number of hooks which ended with an error",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "phase": {
          "description": "Phase is the current state of the Restore",
          "enum": [
            "New",
            "FailedValidation",
            "InProgress",
            "WaitingForPluginOperations",
            "WaitingForPluginOperationsPartiallyFailed",
            "Completed",
            "PartiallyFailed",
            "Failed",
            "Finalizing",
            "FinalizingPartiallyFailed"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "progress": {
          "additionalProperties": false,
          "description": "Progress contains information about the restore's execution progress. Note\nthat this information is best-effort only -- if Velero fails to update it\nduring a restore for any reason, it may be inaccurate/stale.",
          "nullable": true,
          "properties": {
            "itemsRestored": {
              "description": "ItemsRestored is the number of items that have actually been restored so far",
              "type": [
                "integer",
                "null"
              ]
            },
            "totalItems": {
              "description": "TotalItems is the total number of items to be restored. This number may change\nthroughout the execution of the restore due to plugins that return additional related\nitems to restore",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "restoreItemOperationsAttempted": {
          "description": "RestoreItemOperationsAttempted is the total number of attempted\nasync RestoreItemAction operations for this restore.",
          "type": [
            "integer",
            "null"
          ]
        },
        "restoreItemOperationsCompleted": {
          "description": "RestoreItemOperationsCompleted is the total number of successfully completed\nasync RestoreItemAction operations for this restore.",
          "type": [
            "integer",
            "null"
          ]
        },
        "restoreItemOperationsFailed": {
          "description": "RestoreItemOperationsFailed is the total number of async\nRestoreItemAction operations for this restore which ended with an error.",
          "type": [
            "integer",
            "null"
          ]
        },
        "startTimestamp": {
          "description": "StartTimestamp records the time the restore operation was started.\nThe server's time is used for StartTimestamps",
          "format": "date-time",
          "nullable": true,
          "type": [
            "string",
            "null"
          ]
        },
        "validationErrors": {
          "description": "ValidationErrors is a slice of all validation errors (if\napplicable)",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": [
            "array",
            "null"
          ]
        },
        "warnings": {
          "description": "Warnings is a count of all warning messages that were generated during\nexecution of the restore. The actual warnings are stored in object storage.",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}