-- out/import/velero/cluster-role-binding.go --
// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package velero

import (
	rbacv1 "k8s.io/api/rbac/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var CRB = &rbacv1.ClusterRoleBinding{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{"component": "velero"},
		Name:   "velero",
	},
	RoleRef: rbacv1.RoleRef{
		APIGroup: "rbac.authorization.k8s.io",
		Kind:     "ClusterRole",
		Name:     "cluster-admin",
	},
	Subjects: []rbacv1.Subject{rbacv1.Subject{
		Kind:      "ServiceAccount",
		Name:      "velero",
		Namespace: "velero",
	}},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "rbac.authorization.k8s.io/v1",
		Kind:       "ClusterRoleBinding",
	},
}
-- out/import/velero/custom-resource-definition.go --
// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package velero

import (
	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var BackuprepositoriesIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "backuprepositories.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "BackupRepository",
			ListKind: "BackupRepositoryList",
			Plural:   "backuprepositories",
			Singular: "backuprepository",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".metadata.creationTimestamp",
				Name:     "Age",
				Type:     "date",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".spec.repositoryType",
				Name:     "Repository Type",
				Type:     "string",
			}},
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "BackupRepositorySpec is the specification for a BackupRepository.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"backupStorageLocation": apiextensionsv1.JSONSchemaProps{
								Description: "BackupStorageLocation is the name of the BackupStorageLocation that should contain this repository.",
								Type:        "string",
							},
							"maintenanceFrequency": apiextensionsv1.JSONSchemaProps{
								Description: "MaintenanceFrequency is how often maintenance should be run.",
								Type:        "string",
							},
							"repositoryType": apiextensionsv1.JSONSchemaProps{
								Description: "RepositoryType indicates the type of the backend repository",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"kopia\"")}, apiextensionsv1.JSON{Raw: []byte("\"restic\"")}, apiextensionsv1.JSON{Raw: []byte("\"\"")}},
								Type:        "string",
							},
							"resticIdentifier": apiextensionsv1.JSONSchemaProps{
								Description: "ResticIdentifier is the full restic-compatible string for identifying this repository.",
								Type:        "string",
							},
							"volumeNamespace": apiextensionsv1.JSONSchemaProps{
								Description: "VolumeNamespace is the namespace this backup repository contains pod volume backups for.",
								Type:        "string",
							},
						},
						Required: []string{"backupStorageLocation", "maintenanceFrequency", "resticIdentifier", "volumeNamespace"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "BackupRepositoryStatus is the current status of a BackupRepository.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"lastMaintenanceTime": apiextensionsv1.JSONSchemaProps{
								Description: "LastMaintenanceTime is the last time maintenance was run.",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"message": apiextensionsv1.JSONSchemaProps{
								Description: "Message is a message about the current status of the BackupRepository.",
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the BackupRepository.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"Ready\"")}, apiextensionsv1.JSON{Raw: []byte("\"NotReady\"")}},
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var BackupsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "backups.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "Backup",
			ListKind: "BackupList",
			Plural:   "backups",
			Singular: "backup",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "Backup is a Velero resource that represents the capture of Kubernetes cluster state at a point in time (API objects and associated volume state).",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "BackupSpec defines the specification for a Velero backup.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"csiSnapshotTimeout": apiextensionsv1.JSONSchemaProps{
								Description: "CSISnapshotTimeout specifies the time used to wait for CSI VolumeSnapshot status turns to ReadyToUse during creation, before returning error as timeout. The default value is 10 minute.",
								Type:        "string",
							},
							"defaultVolumesToFsBackup": apiextensionsv1.JSONSchemaProps{
								Description: "DefaultVolumesToFsBackup specifies whether pod volume file system backup should be used for all volumes by default.",
								Nullable:    true,
								Type:        "boolean",
							},
							"defaultVolumesToRestic": apiextensionsv1.JSONSchemaProps{
								Description: `DefaultVolumesToRestic specifies whether restic should be used to take a backup of all pod volumes by default. 
 Deprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.`,
								Nullable: true,
								Type:     "boolean",
							},
							"excludedClusterScopedResources": apiextensionsv1.JSONSchemaProps{
								Description: `ExcludedClusterScopedResources is a slice of cluster-scoped resource type names to exclude from the backup. If set to "*", all cluster-scoped resource types are excluded. The default value is empty.`,
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"excludedNamespaceScopedResources": apiextensionsv1.JSONSchemaProps{
								Description: `ExcludedNamespaceScopedResources is a slice of namespace-scoped resource type names to exclude from the backup. If set to "*", all namespace-scoped resource types are excluded. The default value is empty.`,
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"excludedNamespaces": apiextensionsv1.JSONSchemaProps{
								Description: "ExcludedNamespaces contains a list of namespaces that are not included in the backup.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"excludedResources": apiextensionsv1.JSONSchemaProps{
								Description: "ExcludedResources is a slice of resource names that are not included in the backup.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"hooks": apiextensionsv1.JSONSchemaProps{
								Description: "Hooks represent custom behaviors that should be executed at different phases of the backup.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{"resources": apiextensionsv1.JSONSchemaProps{
									Description: "Resources are hooks that should be executed when backing up individual instances of a resource.",
									Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
										Description: "BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on the rules defined for namespaces, resources, and label selector.",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"excludedNamespaces": apiextensionsv1.JSONSchemaProps{
												Description: "ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"excludedResources": apiextensionsv1.JSONSchemaProps{
												Description: "ExcludedResources specifies the resources to which this hook spec does not apply.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"includedNamespaces": apiextensionsv1.JSONSchemaProps{
												Description: "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies to all namespaces.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"includedResources": apiextensionsv1.JSONSchemaProps{
												Description: "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies to all resources.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"labelSelector": apiextensionsv1.JSONSchemaProps{
												Description: "LabelSelector, if specified, filters the resources to which this hook spec applies.",
												Nullable:    true,
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"matchExpressions": apiextensionsv1.JSONSchemaProps{
														Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
														Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
															Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": apiextensionsv1.JSONSchemaProps{
																	Description: "key is the label key that the selector applies to.",
																	Type:        "string",
																},
																"operator": apiextensionsv1.JSONSchemaProps{
																	Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
																	Type:        "string",
																},
																"values": apiextensionsv1.JSONSchemaProps{
																	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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																	Type:        "array",
																},
															},
															Required: []string{"key", "operator"},
															Type:     "object",
														}},
														Type: "array",
													},
													"matchLabels": apiextensionsv1.JSONSchemaProps{
														AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
															Allows: true,
															Schema: &apiextensionsv1.JSONSchemaProps{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",
													},
												},
												Type: "object",
											},
											"name": apiextensionsv1.JSONSchemaProps{
												Description: "Name is the name of this hook.",
												Type:        "string",
											},
											"post": apiextensionsv1.JSONSchemaProps{
												Description: `PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup. These are executed after all "additional items" from item actions are processed.`,
												Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
													Description: "BackupResourceHook defines a hook for a resource.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{"exec": apiextensionsv1.JSONSchemaProps{
														Description: "Exec defines an exec hook.",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"command": apiextensionsv1.JSONSchemaProps{
																Description: "Command is the command and arguments to execute.",
																Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																MinItems:    P(int64(1)),
																Type:        "array",
															},
															"container": apiextensionsv1.JSONSchemaProps{
																Description: "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.",
																Type:        "string",
															},
															"onError": apiextensionsv1.JSONSchemaProps{
																Description: "OnError specifies how Velero should behave if it encounters an error executing this hook.",
																Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Continue\"")}, apiextensionsv1.JSON{Raw: []byte("\"Fail\"")}},
																Type:        "string",
															},
															"timeout": apiextensionsv1.JSONSchemaProps{
																Description: "Timeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.",
																Type:        "string",
															},
														},
														Required: []string{"command"},
														Type:     "object",
													}},
													Required: []string{"exec"},
													Type:     "object",
												}},
												Type: "array",
											},
											"pre": apiextensionsv1.JSONSchemaProps{
												Description: `PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup. These are executed before any "additional items" from item actions are processed.`,
												Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
													Description: "BackupResourceHook defines a hook for a resource.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{"exec": apiextensionsv1.JSONSchemaProps{
														Description: "Exec defines an exec hook.",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"command": apiextensionsv1.JSONSchemaProps{
																Description: "Command is the command and arguments to execute.",
																Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																MinItems:    P(int64(1)),
																Type:        "array",
															},
															"container": apiextensionsv1.JSONSchemaProps{
																Description: "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.",
																Type:        "string",
															},
															"onError": apiextensionsv1.JSONSchemaProps{
																Description: "OnError specifies how Velero should behave if it encounters an error executing this hook.",
																Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Continue\"")}, apiextensionsv1.JSON{Raw: []byte("\"Fail\"")}},
																Type:        "string",
															},
															"timeout": apiextensionsv1.JSONSchemaProps{
																Description: "Timeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.",
																Type:        "string",
															},
														},
														Required: []string{"command"},
														Type:     "object",
													}},
													Required: []string{"exec"},
													Type:     "object",
												}},
												Type: "array",
											},
										},
										Required: []string{"name"},
										Type:     "object",
									}},
									Nullable: true,
									Type:     "array",
								}},
								Type: "object",
							},
							"includeClusterResources": apiextensionsv1.JSONSchemaProps{
								Description: "IncludeClusterResources specifies whether cluster-scoped resources should be included for consideration in the backup.",
								Nullable:    true,
								Type:        "boolean",
							},
							"includedClusterScopedResources": apiextensionsv1.JSONSchemaProps{
								Description: `IncludedClusterScopedResources is a slice of cluster-scoped resource type names to include in the backup. If set to "*", all cluster-scoped resource types are included. The default value is empty, which means only related cluster-scoped resources are included.`,
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"includedNamespaceScopedResources": apiextensionsv1.JSONSchemaProps{
								Description: `IncludedNamespaceScopedResources is a slice of namespace-scoped resource type names to include in the backup. The default value is "*".`,
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"includedNamespaces": apiextensionsv1.JSONSchemaProps{
								Description: "IncludedNamespaces is a slice of namespace names to include objects from. If empty, all namespaces are included.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"includedResources": apiextensionsv1.JSONSchemaProps{
								Description: "IncludedResources is a slice of resource names to include in the backup. If empty, all resources are included.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"itemOperationTimeout": apiextensionsv1.JSONSchemaProps{
								Description: "ItemOperationTimeout specifies the time used to wait for asynchronous BackupItemAction operations The default value is 1 hour.",
								Type:        "string",
							},
							"labelSelector": apiextensionsv1.JSONSchemaProps{
								Description: "LabelSelector is a metav1.LabelSelector to filter with when adding individual objects to the backup. If empty or nil, all objects are included. Optional.",
								Nullable:    true,
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"matchExpressions": apiextensionsv1.JSONSchemaProps{
										Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
											Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"key": apiextensionsv1.JSONSchemaProps{
													Description: "key is the label key that the selector applies to.",
													Type:        "string",
												},
												"operator": apiextensionsv1.JSONSchemaProps{
													Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
													Type:        "string",
												},
												"values": apiextensionsv1.JSONSchemaProps{
													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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
													Type:        "array",
												},
											},
											Required: []string{"key", "operator"},
											Type:     "object",
										}},
										Type: "array",
									},
									"matchLabels": apiextensionsv1.JSONSchemaProps{
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{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",
									},
								},
								Type: "object",
							},
							"metadata": apiextensionsv1.JSONSchemaProps{
								Properties: map[string]apiextensionsv1.JSONSchemaProps{"labels": apiextensionsv1.JSONSchemaProps{
									AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
										Allows: true,
										Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
									},
									Type: "object",
								}},
								Type: "object",
							},
							"orLabelSelectors": apiextensionsv1.JSONSchemaProps{
								Description: "OrLabelSelectors is list of metav1.LabelSelector to filter with when adding individual objects to the backup. If multiple provided they will be joined by the OR operator. LabelSelector as well as OrLabelSelectors cannot co-exist in backup request, only one of them can be used.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"matchExpressions": apiextensionsv1.JSONSchemaProps{
											Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"key": apiextensionsv1.JSONSchemaProps{
														Description: "key is the label key that the selector applies to.",
														Type:        "string",
													},
													"operator": apiextensionsv1.JSONSchemaProps{
														Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
														Type:        "string",
													},
													"values": apiextensionsv1.JSONSchemaProps{
														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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Type:        "array",
													},
												},
												Required: []string{"key", "operator"},
												Type:     "object",
											}},
											Type: "array",
										},
										"matchLabels": apiextensionsv1.JSONSchemaProps{
											AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
												Allows: true,
												Schema: &apiextensionsv1.JSONSchemaProps{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",
										},
									},
									Type: "object",
								}},
								Nullable: true,
								Type:     "array",
							},
							"orderedResources": apiextensionsv1.JSONSchemaProps{
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: `OrderedResources specifies the backup order of resources of specific Kind. The map key is the resource name and value is a list of object names separated by commas. Each resource name has format "namespace/objectname".  For cluster resources, simply use "objectname".`,
								Nullable:    true,
								Type:        "object",
							},
							"resourcePolicy": apiextensionsv1.JSONSchemaProps{
								Description: "ResourcePolicy specifies the referenced resource policies that backup should follow",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"apiGroup": apiextensionsv1.JSONSchemaProps{
										Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.",
										Type:        "string",
									},
									"kind": apiextensionsv1.JSONSchemaProps{
										Description: "Kind is the type of resource being referenced",
										Type:        "string",
									},
									"name": apiextensionsv1.JSONSchemaProps{
										Description: "Name is the name of resource being referenced",
										Type:        "string",
									},
								},
								Required: []string{"kind", "name"},
								Type:     "object",
							},
							"snapshotVolumes": apiextensionsv1.JSONSchemaProps{
								Description: "SnapshotVolumes specifies whether to take snapshots of any PV's referenced in the set of objects included in the Backup.",
								Nullable:    true,
								Type:        "boolean",
							},
							"storageLocation": apiextensionsv1.JSONSchemaProps{
								Description: "StorageLocation is a string containing the name of a BackupStorageLocation where the backup should be stored.",
								Type:        "string",
							},
							"ttl": apiextensionsv1.JSONSchemaProps{
								Description: "TTL is a time.Duration-parseable string describing how long the Backup should be retained for.",
								Type:        "string",
							},
							"volumeSnapshotLocations": apiextensionsv1.JSONSchemaProps{
								Description: "VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Type:        "array",
							},
						},
						Type: "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "BackupStatus captures the current status of a Velero backup.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"backupItemOperationsAttempted": apiextensionsv1.JSONSchemaProps{
								Description: "BackupItemOperationsAttempted is the total number of attempted async BackupItemAction operations for this backup.",
								Type:        "integer",
							},
							"backupItemOperationsCompleted": apiextensionsv1.JSONSchemaProps{
								Description: "BackupItemOperationsCompleted is the total number of successfully completed async BackupItemAction operations for this backup.",
								Type:        "integer",
							},
							"backupItemOperationsFailed": apiextensionsv1.JSONSchemaProps{
								Description: "BackupItemOperationsFailed is the total number of async BackupItemAction operations for this backup which ended with an error.",
								Type:        "integer",
							},
							"completionTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "CompletionTimestamp records the time a backup was completed. Completion time is recorded even on failed backups. Completion time is recorded before uploading the backup object. The server's time is used for CompletionTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"csiVolumeSnapshotsAttempted": apiextensionsv1.JSONSchemaProps{
								Description: "CSIVolumeSnapshotsAttempted is the total number of attempted CSI VolumeSnapshots for this backup.",
								Type:        "integer",
							},
							"csiVolumeSnapshotsCompleted": apiextensionsv1.JSONSchemaProps{
								Description: "CSIVolumeSnapshotsCompleted is the total number of successfully completed CSI VolumeSnapshots for this backup.",
								Type:        "integer",
							},
							"errors": apiextensionsv1.JSONSchemaProps{
								Description: "Errors is a count of all error messages that were generated during execution of the backup.  The actual errors are in the backup's log file in object storage.",
								Type:        "integer",
							},
							"expiration": apiextensionsv1.JSONSchemaProps{
								Description: "Expiration is when this Backup is eligible for garbage-collection.",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"failureReason": apiextensionsv1.JSONSchemaProps{
								Description: "FailureReason is an error that caused the entire backup to fail.",
								Type:        "string",
							},
							"formatVersion": apiextensionsv1.JSONSchemaProps{
								Description: "FormatVersion is the backup format version, including major, minor, and patch version.",
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the Backup.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"FailedValidation\"")}, apiextensionsv1.JSON{Raw: []byte("\"InProgress\"")}, apiextensionsv1.JSON{Raw: []byte("\"WaitingForPluginOperations\"")}, apiextensionsv1.JSON{Raw: []byte("\"WaitingForPluginOperationsPartiallyFailed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Finalizing\"")}, apiextensionsv1.JSON{Raw: []byte("\"FinalizingPartiallyFailed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Completed\"")}, apiextensionsv1.JSON{Raw: []byte("\"PartiallyFailed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Failed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Deleting\"")}},
								Type:        "string",
							},
							"progress": apiextensionsv1.JSONSchemaProps{
								Description: "Progress contains information about the backup's execution progress. Note that this information is best-effort only -- if Velero fails to update it during a backup for any reason, it may be inaccurate/stale.",
								Nullable:    true,
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"itemsBackedUp": apiextensionsv1.JSONSchemaProps{
										Description: "ItemsBackedUp is the number of items that have actually been written to the backup tarball so far.",
										Type:        "integer",
									},
									"totalItems": apiextensionsv1.JSONSchemaProps{
										Description: "TotalItems is the total number of items to be backed up. This number may change throughout the execution of the backup due to plugins that return additional related items to back up, the velero.io/exclude-from-backup label, and various other filters that happen as items are processed.",
										Type:        "integer",
									},
								},
								Type: "object",
							},
							"startTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "StartTimestamp records the time a backup was started. Separate from CreationTimestamp, since that value changes on restores. The server's time is used for StartTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"validationErrors": apiextensionsv1.JSONSchemaProps{
								Description: "ValidationErrors is a slice of all validation errors (if applicable).",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"version": apiextensionsv1.JSONSchemaProps{
								Description: "Version is the backup format major version. Deprecated: Please see FormatVersion",
								Type:        "integer",
							},
							"volumeSnapshotsAttempted": apiextensionsv1.JSONSchemaProps{
								Description: "VolumeSnapshotsAttempted is the total number of attempted volume snapshots for this backup.",
								Type:        "integer",
							},
							"volumeSnapshotsCompleted": apiextensionsv1.JSONSchemaProps{
								Description: "VolumeSnapshotsCompleted is the total number of successfully completed volume snapshots for this backup.",
								Type:        "integer",
							},
							"warnings": apiextensionsv1.JSONSchemaProps{
								Description: "Warnings is a count of all warning messages that were generated during execution of the backup. The actual warnings are in the backup's log file in object storage.",
								Type:        "integer",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var BackupstoragelocationsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "backupstoragelocations.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:       "BackupStorageLocation",
			ListKind:   "BackupStorageLocationList",
			Plural:     "backupstoragelocations",
			ShortNames: []string{"bsl"},
			Singular:   "backupstoragelocation",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Backup Storage Location status such as Available/Unavailable",
				JSONPath:    ".status.phase",
				Name:        "Phase",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "LastValidationTime is the last time the backup store location was validated",
				JSONPath:    ".status.lastValidationTime",
				Name:        "Last Validated",
				Type:        "date",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".metadata.creationTimestamp",
				Name:     "Age",
				Type:     "date",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Default backup storage location",
				JSONPath:    ".spec.default",
				Name:        "Default",
				Type:        "boolean",
			}},
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "BackupStorageLocation is a location where Velero stores backup objects",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "BackupStorageLocationSpec defines the desired state of a Velero BackupStorageLocation",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"accessMode": apiextensionsv1.JSONSchemaProps{
								Description: "AccessMode defines the permissions for the backup storage location.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"ReadOnly\"")}, apiextensionsv1.JSON{Raw: []byte("\"ReadWrite\"")}},
								Type:        "string",
							},
							"backupSyncPeriod": apiextensionsv1.JSONSchemaProps{
								Description: "BackupSyncPeriod defines how frequently to sync backup API objects from object storage. A value of 0 disables sync.",
								Nullable:    true,
								Type:        "string",
							},
							"config": apiextensionsv1.JSONSchemaProps{
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "Config is for provider-specific configuration fields.",
								Type:        "object",
							},
							"credential": apiextensionsv1.JSONSchemaProps{
								Description: "Credential contains the credential information intended to be used with this location",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"key": apiextensionsv1.JSONSchemaProps{
										Description: "The key of the secret to select from.  Must be a valid secret key.",
										Type:        "string",
									},
									"name": apiextensionsv1.JSONSchemaProps{
										Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?",
										Type:        "string",
									},
									"optional": apiextensionsv1.JSONSchemaProps{
										Description: "Specify whether the Secret or its key must be defined",
										Type:        "boolean",
									},
								},
								Required: []string{"key"},
								Type:     "object",
							},
							"default": apiextensionsv1.JSONSchemaProps{
								Description: "Default indicates this location is the default backup storage location.",
								Type:        "boolean",
							},
							"objectStorage": apiextensionsv1.JSONSchemaProps{
								Description: "ObjectStorageLocation specifies the settings necessary to connect to a provider's object storage.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"bucket": apiextensionsv1.JSONSchemaProps{
										Description: "Bucket is the bucket to use for object storage.",
										Type:        "string",
									},
									"caCert": apiextensionsv1.JSONSchemaProps{
										Description: "CACert defines a CA bundle to use when verifying TLS connections to the provider.",
										Format:      "byte",
										Type:        "string",
									},
									"prefix": apiextensionsv1.JSONSchemaProps{
										Description: "Prefix is the path inside a bucket to use for Velero storage. Optional.",
										Type:        "string",
									},
								},
								Required: []string{"bucket"},
								Type:     "object",
							},
							"provider": apiextensionsv1.JSONSchemaProps{
								Description: "Provider is the provider of the backup storage.",
								Type:        "string",
							},
							"validationFrequency": apiextensionsv1.JSONSchemaProps{
								Description: "ValidationFrequency defines how frequently to validate the corresponding object storage. A value of 0 disables validation.",
								Nullable:    true,
								Type:        "string",
							},
						},
						Required: []string{"objectStorage", "provider"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "BackupStorageLocationStatus defines the observed state of BackupStorageLocation",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"accessMode": apiextensionsv1.JSONSchemaProps{
								Description: `AccessMode is an unused field. 
 Deprecated: there is now an AccessMode field on the Spec and this field will be removed entirely as of v2.0.`,
								Enum: []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"ReadOnly\"")}, apiextensionsv1.JSON{Raw: []byte("\"ReadWrite\"")}},
								Type: "string",
							},
							"lastSyncedRevision": apiextensionsv1.JSONSchemaProps{
								Description: "LastSyncedRevision is the value of the `metadata/revision` file in the backup storage location the last time the BSL's contents were synced into the cluster. \n Deprecated: this field is no longer updated or used for detecting changes to the location's contents and will be removed entirely in v2.0.",
								Type:        "string",
							},
							"lastSyncedTime": apiextensionsv1.JSONSchemaProps{
								Description: "LastSyncedTime is the last time the contents of the location were synced into the cluster.",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"lastValidationTime": apiextensionsv1.JSONSchemaProps{
								Description: "LastValidationTime is the last time the backup store location was validated the cluster.",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"message": apiextensionsv1.JSONSchemaProps{
								Description: "Message is a message about the backup storage location's status.",
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the BackupStorageLocation.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Available\"")}, apiextensionsv1.JSON{Raw: []byte("\"Unavailable\"")}},
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var DeletebackuprequestsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "deletebackuprequests.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "DeleteBackupRequest",
			ListKind: "DeleteBackupRequestList",
			Plural:   "deletebackuprequests",
			Singular: "deletebackuprequest",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{apiextensionsv1.CustomResourceColumnDefinition{
				Description: "The name of the backup to be deleted",
				JSONPath:    ".spec.backupName",
				Name:        "BackupName",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "The status of the deletion request",
				JSONPath:    ".status.phase",
				Name:        "Status",
				Type:        "string",
			}},
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "DeleteBackupRequest is a request to delete one or more backups.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "DeleteBackupRequestSpec is the specification for which backups to delete.",
						Properties:  map[string]apiextensionsv1.JSONSchemaProps{"backupName": apiextensionsv1.JSONSchemaProps{Type: "string"}},
						Required:    []string{"backupName"},
						Type:        "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "DeleteBackupRequestStatus is the current status of a DeleteBackupRequest.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"errors": apiextensionsv1.JSONSchemaProps{
								Description: "Errors contains any errors that were encountered during the deletion process.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the DeleteBackupRequest.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"InProgress\"")}, apiextensionsv1.JSON{Raw: []byte("\"Processed\"")}},
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var DownloadrequestsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "downloadrequests.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "DownloadRequest",
			ListKind: "DownloadRequestList",
			Plural:   "downloadrequests",
			Singular: "downloadrequest",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "DownloadRequest is a request to download an artifact from backup object storage, such as a backup log file.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "DownloadRequestSpec is the specification for a download request.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{"target": apiextensionsv1.JSONSchemaProps{
							Description: "Target is what to download (e.g. logs for a backup).",
							Properties: map[string]apiextensionsv1.JSONSchemaProps{
								"kind": apiextensionsv1.JSONSchemaProps{
									Description: "Kind is the type of file to download.",
									Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"BackupLog\"")}, apiextensionsv1.JSON{Raw: []byte("\"BackupContents\"")}, apiextensionsv1.JSON{Raw: []byte("\"BackupVolumeSnapshots\"")}, apiextensionsv1.JSON{Raw: []byte("\"BackupItemOperations\"")}, apiextensionsv1.JSON{Raw: []byte("\"BackupResourceList\"")}, apiextensionsv1.JSON{Raw: []byte("\"BackupResults\"")}, apiextensionsv1.JSON{Raw: []byte("\"RestoreLog\"")}, apiextensionsv1.JSON{Raw: []byte("\"RestoreResults\"")}, apiextensionsv1.JSON{Raw: []byte("\"RestoreResourceList\"")}, apiextensionsv1.JSON{Raw: []byte("\"RestoreItemOperations\"")}, apiextensionsv1.JSON{Raw: []byte("\"CSIBackupVolumeSnapshots\"")}, apiextensionsv1.JSON{Raw: []byte("\"CSIBackupVolumeSnapshotContents\"")}},
									Type:        "string",
								},
								"name": apiextensionsv1.JSONSchemaProps{
									Description: "Name is the name of the kubernetes resource with which the file is associated.",
									Type:        "string",
								},
							},
							Required: []string{"kind", "name"},
							Type:     "object",
						}},
						Required: []string{"target"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "DownloadRequestStatus is the current status of a DownloadRequest.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"downloadURL": apiextensionsv1.JSONSchemaProps{
								Description: "DownloadURL contains the pre-signed URL for the target file.",
								Type:        "string",
							},
							"expiration": apiextensionsv1.JSONSchemaProps{
								Description: "Expiration is when this DownloadRequest expires and can be deleted by the system.",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the DownloadRequest.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"Processed\"")}},
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var PodvolumebackupsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "podvolumebackups.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "PodVolumeBackup",
			ListKind: "PodVolumeBackupList",
			Plural:   "podvolumebackups",
			Singular: "podvolumebackup",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Pod Volume Backup status such as New/InProgress",
				JSONPath:    ".status.phase",
				Name:        "Status",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Time when this backup was started",
				JSONPath:    ".status.startTimestamp",
				Name:        "Created",
				Type:        "date",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Namespace of the pod containing the volume to be backed up",
				JSONPath:    ".spec.pod.namespace",
				Name:        "Namespace",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Name of the pod containing the volume to be backed up",
				JSONPath:    ".spec.pod.name",
				Name:        "Pod",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Name of the volume to be backed up",
				JSONPath:    ".spec.volume",
				Name:        "Volume",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Backup repository identifier for this backup",
				JSONPath:    ".spec.repoIdentifier",
				Name:        "Repository ID",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "The type of the uploader to handle data transfer",
				JSONPath:    ".spec.uploaderType",
				Name:        "Uploader Type",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Name of the Backup Storage Location where this backup should be stored",
				JSONPath:    ".spec.backupStorageLocation",
				Name:        "Storage Location",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".metadata.creationTimestamp",
				Name:     "Age",
				Type:     "date",
			}},
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "PodVolumeBackupSpec is the specification for a PodVolumeBackup.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"backupStorageLocation": apiextensionsv1.JSONSchemaProps{
								Description: "BackupStorageLocation is the name of the backup storage location where the backup repository is stored.",
								Type:        "string",
							},
							"node": apiextensionsv1.JSONSchemaProps{
								Description: "Node is the name of the node that the Pod is running on.",
								Type:        "string",
							},
							"pod": apiextensionsv1.JSONSchemaProps{
								Description: "Pod is a reference to the pod containing the volume to be backed up.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"apiVersion": apiextensionsv1.JSONSchemaProps{
										Description: "API version of the referent.",
										Type:        "string",
									},
									"fieldPath": apiextensionsv1.JSONSchemaProps{
										Description: `If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.`,
										Type:        "string",
									},
									"kind": apiextensionsv1.JSONSchemaProps{
										Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
										Type:        "string",
									},
									"name": apiextensionsv1.JSONSchemaProps{
										Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
										Type:        "string",
									},
									"namespace": apiextensionsv1.JSONSchemaProps{
										Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
										Type:        "string",
									},
									"resourceVersion": apiextensionsv1.JSONSchemaProps{
										Description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
										Type:        "string",
									},
									"uid": apiextensionsv1.JSONSchemaProps{
										Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
										Type:        "string",
									},
								},
								Type: "object",
							},
							"repoIdentifier": apiextensionsv1.JSONSchemaProps{
								Description: "RepoIdentifier is the backup repository identifier.",
								Type:        "string",
							},
							"tags": apiextensionsv1.JSONSchemaProps{
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "Tags are a map of key-value pairs that should be applied to the volume backup as tags.",
								Type:        "object",
							},
							"uploaderType": apiextensionsv1.JSONSchemaProps{
								Description: "UploaderType is the type of the uploader to handle the data transfer.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"kopia\"")}, apiextensionsv1.JSON{Raw: []byte("\"restic\"")}, apiextensionsv1.JSON{Raw: []byte("\"\"")}},
								Type:        "string",
							},
							"volume": apiextensionsv1.JSONSchemaProps{
								Description: "Volume is the name of the volume within the Pod to be backed up.",
								Type:        "string",
							},
						},
						Required: []string{"backupStorageLocation", "node", "pod", "repoIdentifier", "volume"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "PodVolumeBackupStatus is the current status of a PodVolumeBackup.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"completionTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "CompletionTimestamp records the time a backup was completed. Completion time is recorded even on failed backups. Completion time is recorded before uploading the backup object. The server's time is used for CompletionTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"message": apiextensionsv1.JSONSchemaProps{
								Description: "Message is a message about the pod volume backup's status.",
								Type:        "string",
							},
							"path": apiextensionsv1.JSONSchemaProps{
								Description: "Path is the full path within the controller pod being backed up.",
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the PodVolumeBackup.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"InProgress\"")}, apiextensionsv1.JSON{Raw: []byte("\"Completed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Failed\"")}},
								Type:        "string",
							},
							"progress": apiextensionsv1.JSONSchemaProps{
								Description: "Progress holds the total number of bytes of the volume and the current number of backed up bytes. This can be used to display progress information about the backup operation.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"bytesDone": apiextensionsv1.JSONSchemaProps{
										Format: "int64",
										Type:   "integer",
									},
									"totalBytes": apiextensionsv1.JSONSchemaProps{
										Format: "int64",
										Type:   "integer",
									},
								},
								Type: "object",
							},
							"snapshotID": apiextensionsv1.JSONSchemaProps{
								Description: "SnapshotID is the identifier for the snapshot of the pod volume.",
								Type:        "string",
							},
							"startTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "StartTimestamp records the time a backup was started. Separate from CreationTimestamp, since that value changes on restores. The server's time is used for StartTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var PodvolumerestoresIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "podvolumerestores.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "PodVolumeRestore",
			ListKind: "PodVolumeRestoreList",
			Plural:   "podvolumerestores",
			Singular: "podvolumerestore",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Namespace of the pod containing the volume to be restored",
				JSONPath:    ".spec.pod.namespace",
				Name:        "Namespace",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Name of the pod containing the volume to be restored",
				JSONPath:    ".spec.pod.name",
				Name:        "Pod",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "The type of the uploader to handle data transfer",
				JSONPath:    ".spec.uploaderType",
				Name:        "Uploader Type",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Name of the volume to be restored",
				JSONPath:    ".spec.volume",
				Name:        "Volume",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Pod Volume Restore status such as New/InProgress",
				JSONPath:    ".status.phase",
				Name:        "Status",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Pod Volume Restore status such as New/InProgress",
				Format:      "int64",
				JSONPath:    ".status.progress.totalBytes",
				Name:        "TotalBytes",
				Type:        "integer",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Pod Volume Restore status such as New/InProgress",
				Format:      "int64",
				JSONPath:    ".status.progress.bytesDone",
				Name:        "BytesDone",
				Type:        "integer",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".metadata.creationTimestamp",
				Name:     "Age",
				Type:     "date",
			}},
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "PodVolumeRestoreSpec is the specification for a PodVolumeRestore.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"backupStorageLocation": apiextensionsv1.JSONSchemaProps{
								Description: "BackupStorageLocation is the name of the backup storage location where the backup repository is stored.",
								Type:        "string",
							},
							"pod": apiextensionsv1.JSONSchemaProps{
								Description: "Pod is a reference to the pod containing the volume to be restored.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"apiVersion": apiextensionsv1.JSONSchemaProps{
										Description: "API version of the referent.",
										Type:        "string",
									},
									"fieldPath": apiextensionsv1.JSONSchemaProps{
										Description: `If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.`,
										Type:        "string",
									},
									"kind": apiextensionsv1.JSONSchemaProps{
										Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
										Type:        "string",
									},
									"name": apiextensionsv1.JSONSchemaProps{
										Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
										Type:        "string",
									},
									"namespace": apiextensionsv1.JSONSchemaProps{
										Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
										Type:        "string",
									},
									"resourceVersion": apiextensionsv1.JSONSchemaProps{
										Description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
										Type:        "string",
									},
									"uid": apiextensionsv1.JSONSchemaProps{
										Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
										Type:        "string",
									},
								},
								Type: "object",
							},
							"repoIdentifier": apiextensionsv1.JSONSchemaProps{
								Description: "RepoIdentifier is the backup repository identifier.",
								Type:        "string",
							},
							"snapshotID": apiextensionsv1.JSONSchemaProps{
								Description: "SnapshotID is the ID of the volume snapshot to be restored.",
								Type:        "string",
							},
							"sourceNamespace": apiextensionsv1.JSONSchemaProps{
								Description: "SourceNamespace is the original namespace for namaspace mapping.",
								Type:        "string",
							},
							"uploaderType": apiextensionsv1.JSONSchemaProps{
								Description: "UploaderType is the type of the uploader to handle the data transfer.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"kopia\"")}, apiextensionsv1.JSON{Raw: []byte("\"restic\"")}, apiextensionsv1.JSON{Raw: []byte("\"\"")}},
								Type:        "string",
							},
							"volume": apiextensionsv1.JSONSchemaProps{
								Description: "Volume is the name of the volume within the Pod to be restored.",
								Type:        "string",
							},
						},
						Required: []string{"backupStorageLocation", "pod", "repoIdentifier", "snapshotID", "sourceNamespace", "volume"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "PodVolumeRestoreStatus is the current status of a PodVolumeRestore.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"completionTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "CompletionTimestamp records the time a restore was completed. Completion time is recorded even on failed restores. The server's time is used for CompletionTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"message": apiextensionsv1.JSONSchemaProps{
								Description: "Message is a message about the pod volume restore's status.",
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the PodVolumeRestore.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"InProgress\"")}, apiextensionsv1.JSON{Raw: []byte("\"Completed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Failed\"")}},
								Type:        "string",
							},
							"progress": apiextensionsv1.JSONSchemaProps{
								Description: "Progress holds the total number of bytes of the snapshot and the current number of restored bytes. This can be used to display progress information about the restore operation.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"bytesDone": apiextensionsv1.JSONSchemaProps{
										Format: "int64",
										Type:   "integer",
									},
									"totalBytes": apiextensionsv1.JSONSchemaProps{
										Format: "int64",
										Type:   "integer",
									},
								},
								Type: "object",
							},
							"startTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "StartTimestamp records the time a restore was started. The server's time is used for StartTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var RestoresIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "restores.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "Restore",
			ListKind: "RestoreList",
			Plural:   "restores",
			Singular: "restore",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "Restore is a Velero resource that represents the application of resources from a Velero backup to a target Kubernetes cluster.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "RestoreSpec defines the specification for a Velero restore.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"backupName": apiextensionsv1.JSONSchemaProps{
								Description: "BackupName is the unique name of the Velero backup to restore from.",
								Type:        "string",
							},
							"excludedNamespaces": apiextensionsv1.JSONSchemaProps{
								Description: "ExcludedNamespaces contains a list of namespaces that are not included in the restore.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"excludedResources": apiextensionsv1.JSONSchemaProps{
								Description: "ExcludedResources is a slice of resource names that are not included in the restore.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"existingResourcePolicy": apiextensionsv1.JSONSchemaProps{
								Description: "ExistingResourcePolicy specifies the restore behavior for the kubernetes resource to be restored",
								Nullable:    true,
								Type:        "string",
							},
							"hooks": apiextensionsv1.JSONSchemaProps{
								Description: "Hooks represent custom behaviors that should be executed during or post restore.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{"resources": apiextensionsv1.JSONSchemaProps{
									Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
										Description: "RestoreResourceHookSpec defines one or more RestoreResrouceHooks that should be executed based on the rules defined for namespaces, resources, and label selector.",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"excludedNamespaces": apiextensionsv1.JSONSchemaProps{
												Description: "ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"excludedResources": apiextensionsv1.JSONSchemaProps{
												Description: "ExcludedResources specifies the resources to which this hook spec does not apply.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"includedNamespaces": apiextensionsv1.JSONSchemaProps{
												Description: "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies to all namespaces.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"includedResources": apiextensionsv1.JSONSchemaProps{
												Description: "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies to all resources.",
												Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Nullable:    true,
												Type:        "array",
											},
											"labelSelector": apiextensionsv1.JSONSchemaProps{
												Description: "LabelSelector, if specified, filters the resources to which this hook spec applies.",
												Nullable:    true,
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"matchExpressions": apiextensionsv1.JSONSchemaProps{
														Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
														Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
															Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"key": apiextensionsv1.JSONSchemaProps{
																	Description: "key is the label key that the selector applies to.",
																	Type:        "string",
																},
																"operator": apiextensionsv1.JSONSchemaProps{
																	Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
																	Type:        "string",
																},
																"values": apiextensionsv1.JSONSchemaProps{
																	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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																	Type:        "array",
																},
															},
															Required: []string{"key", "operator"},
															Type:     "object",
														}},
														Type: "array",
													},
													"matchLabels": apiextensionsv1.JSONSchemaProps{
														AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
															Allows: true,
															Schema: &apiextensionsv1.JSONSchemaProps{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",
													},
												},
												Type: "object",
											},
											"name": apiextensionsv1.JSONSchemaProps{
												Description: "Name is the name of this hook.",
												Type:        "string",
											},
											"postHooks": apiextensionsv1.JSONSchemaProps{
												Description: "PostHooks is a list of RestoreResourceHooks to execute during and after restoring a resource.",
												Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
													Description: "RestoreResourceHook defines a restore hook for a resource.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"exec": apiextensionsv1.JSONSchemaProps{
															Description: "Exec defines an exec restore hook.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"command": apiextensionsv1.JSONSchemaProps{
																	Description: "Command is the command and arguments to execute from within a container after a pod has been restored.",
																	Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																	MinItems:    P(int64(1)),
																	Type:        "array",
																},
																"container": apiextensionsv1.JSONSchemaProps{
																	Description: "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.",
																	Type:        "string",
																},
																"execTimeout": apiextensionsv1.JSONSchemaProps{
																	Description: "ExecTimeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.",
																	Type:        "string",
																},
																"onError": apiextensionsv1.JSONSchemaProps{
																	Description: "OnError specifies how Velero should behave if it encounters an error executing this hook.",
																	Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Continue\"")}, apiextensionsv1.JSON{Raw: []byte("\"Fail\"")}},
																	Type:        "string",
																},
																"waitTimeout": apiextensionsv1.JSONSchemaProps{
																	Description: "WaitTimeout defines the maximum amount of time Velero should wait for the container to be Ready before attempting to run the command.",
																	Type:        "string",
																},
															},
															Required: []string{"command"},
															Type:     "object",
														},
														"init": apiextensionsv1.JSONSchemaProps{
															Description: "Init defines an init restore hook.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{
																"initContainers": apiextensionsv1.JSONSchemaProps{
																	Description:            "InitContainers is list of init containers to be added to a pod during its restore.",
																	Items:                  &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "object"}},
																	Type:                   "array",
																	XPreserveUnknownFields: P(true),
																},
																"timeout": apiextensionsv1.JSONSchemaProps{
																	Description: "Timeout defines the maximum amount of time Velero should wait for the initContainers to complete.",
																	Type:        "string",
																},
															},
															Type: "object",
														},
													},
													Type: "object",
												}},
												Type: "array",
											},
										},
										Required: []string{"name"},
										Type:     "object",
									}},
									Type: "array",
								}},
								Type: "object",
							},
							"includeClusterResources": apiextensionsv1.JSONSchemaProps{
								Description: "IncludeClusterResources specifies whether cluster-scoped resources should be included for consideration in the restore. If null, defaults to true.",
								Nullable:    true,
								Type:        "boolean",
							},
							"includedNamespaces": apiextensionsv1.JSONSchemaProps{
								Description: "IncludedNamespaces is a slice of namespace names to include objects from. If empty, all namespaces are included.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"includedResources": apiextensionsv1.JSONSchemaProps{
								Description: "IncludedResources is a slice of resource names to include in the restore. If empty, all resources in the backup are included.",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"itemOperationTimeout": apiextensionsv1.JSONSchemaProps{
								Description: "ItemOperationTimeout specifies the time used to wait for RestoreItemAction operations The default value is 1 hour.",
								Type:        "string",
							},
							"labelSelector": apiextensionsv1.JSONSchemaProps{
								Description: "LabelSelector is a metav1.LabelSelector to filter with when restoring individual objects from the backup. If empty or nil, all objects are included. Optional.",
								Nullable:    true,
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"matchExpressions": apiextensionsv1.JSONSchemaProps{
										Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
											Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"key": apiextensionsv1.JSONSchemaProps{
													Description: "key is the label key that the selector applies to.",
													Type:        "string",
												},
												"operator": apiextensionsv1.JSONSchemaProps{
													Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
													Type:        "string",
												},
												"values": apiextensionsv1.JSONSchemaProps{
													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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
													Type:        "array",
												},
											},
											Required: []string{"key", "operator"},
											Type:     "object",
										}},
										Type: "array",
									},
									"matchLabels": apiextensionsv1.JSONSchemaProps{
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{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",
									},
								},
								Type: "object",
							},
							"namespaceMapping": apiextensionsv1.JSONSchemaProps{
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "NamespaceMapping is a map of source namespace names to target namespace names to restore into. Any source namespaces not included in the map will be restored into namespaces of the same name.",
								Type:        "object",
							},
							"orLabelSelectors": apiextensionsv1.JSONSchemaProps{
								Description: "OrLabelSelectors is list of metav1.LabelSelector to filter with when restoring individual objects from the backup. If multiple provided they will be joined by the OR operator. LabelSelector as well as OrLabelSelectors cannot co-exist in restore request, only one of them can be used",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"matchExpressions": apiextensionsv1.JSONSchemaProps{
											Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"key": apiextensionsv1.JSONSchemaProps{
														Description: "key is the label key that the selector applies to.",
														Type:        "string",
													},
													"operator": apiextensionsv1.JSONSchemaProps{
														Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
														Type:        "string",
													},
													"values": apiextensionsv1.JSONSchemaProps{
														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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Type:        "array",
													},
												},
												Required: []string{"key", "operator"},
												Type:     "object",
											}},
											Type: "array",
										},
										"matchLabels": apiextensionsv1.JSONSchemaProps{
											AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
												Allows: true,
												Schema: &apiextensionsv1.JSONSchemaProps{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",
										},
									},
									Type: "object",
								}},
								Nullable: true,
								Type:     "array",
							},
							"preserveNodePorts": apiextensionsv1.JSONSchemaProps{
								Description: "PreserveNodePorts specifies whether to restore old nodePorts from backup.",
								Nullable:    true,
								Type:        "boolean",
							},
							"restorePVs": apiextensionsv1.JSONSchemaProps{
								Description: "RestorePVs specifies whether to restore all included PVs from snapshot",
								Nullable:    true,
								Type:        "boolean",
							},
							"restoreStatus": apiextensionsv1.JSONSchemaProps{
								Description: "RestoreStatus specifies which resources we should restore the status field. If nil, no objects are included. Optional.",
								Nullable:    true,
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"excludedResources": apiextensionsv1.JSONSchemaProps{
										Description: "ExcludedResources specifies the resources to which will not restore the status.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"includedResources": apiextensionsv1.JSONSchemaProps{
										Description: "IncludedResources specifies the resources to which will restore the status. If empty, it applies to all resources.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
								},
								Type: "object",
							},
							"scheduleName": apiextensionsv1.JSONSchemaProps{
								Description: "ScheduleName is the unique name of the Velero schedule to restore from. If specified, and BackupName is empty, Velero will restore from the most recent successful backup created from this schedule.",
								Type:        "string",
							},
						},
						Required: []string{"backupName"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "RestoreStatus captures the current status of a Velero restore",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"completionTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "CompletionTimestamp records the time the restore operation was completed. Completion time is recorded even on failed restore. The server's time is used for StartTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"errors": apiextensionsv1.JSONSchemaProps{
								Description: "Errors is a count of all error messages that were generated during execution of the restore. The actual errors are stored in object storage.",
								Type:        "integer",
							},
							"failureReason": apiextensionsv1.JSONSchemaProps{
								Description: "FailureReason is an error that caused the entire restore to fail.",
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current state of the Restore",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"FailedValidation\"")}, apiextensionsv1.JSON{Raw: []byte("\"InProgress\"")}, apiextensionsv1.JSON{Raw: []byte("\"WaitingForPluginOperations\"")}, apiextensionsv1.JSON{Raw: []byte("\"WaitingForPluginOperationsPartiallyFailed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Completed\"")}, apiextensionsv1.JSON{Raw: []byte("\"PartiallyFailed\"")}, apiextensionsv1.JSON{Raw: []byte("\"Failed\"")}},
								Type:        "string",
							},
							"progress": apiextensionsv1.JSONSchemaProps{
								Description: "Progress contains information about the restore's execution progress. Note that this information is best-effort only -- if Velero fails to update it during a restore for any reason, it may be inaccurate/stale.",
								Nullable:    true,
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"itemsRestored": apiextensionsv1.JSONSchemaProps{
										Description: "ItemsRestored is the number of items that have actually been restored so far",
										Type:        "integer",
									},
									"totalItems": apiextensionsv1.JSONSchemaProps{
										Description: "TotalItems is the total number of items to be restored. This number may change throughout the execution of the restore due to plugins that return additional related items to restore",
										Type:        "integer",
									},
								},
								Type: "object",
							},
							"restoreItemOperationsAttempted": apiextensionsv1.JSONSchemaProps{
								Description: "RestoreItemOperationsAttempted is the total number of attempted async RestoreItemAction operations for this restore.",
								Type:        "integer",
							},
							"restoreItemOperationsCompleted": apiextensionsv1.JSONSchemaProps{
								Description: "RestoreItemOperationsCompleted is the total number of successfully completed async RestoreItemAction operations for this restore.",
								Type:        "integer",
							},
							"restoreItemOperationsFailed": apiextensionsv1.JSONSchemaProps{
								Description: "RestoreItemOperationsFailed is the total number of async RestoreItemAction operations for this restore which ended with an error.",
								Type:        "integer",
							},
							"startTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "StartTimestamp records the time the restore operation was started. The server's time is used for StartTimestamps",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"validationErrors": apiextensionsv1.JSONSchemaProps{
								Description: "ValidationErrors is a slice of all validation errors (if applicable)",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Nullable:    true,
								Type:        "array",
							},
							"warnings": apiextensionsv1.JSONSchemaProps{
								Description: "Warnings is a count of all warning messages that were generated during execution of the restore. The actual warnings are stored in object storage.",
								Type:        "integer",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var SchedulesIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "schedules.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "Schedule",
			ListKind: "ScheduleList",
			Plural:   "schedules",
			Singular: "schedule",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{apiextensionsv1.CustomResourceColumnDefinition{
				Description: "Status of the schedule",
				JSONPath:    ".status.phase",
				Name:        "Status",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "A Cron expression defining when to run the Backup",
				JSONPath:    ".spec.schedule",
				Name:        "Schedule",
				Type:        "string",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				Description: "The last time a Backup was run for this schedule",
				JSONPath:    ".status.lastBackup",
				Name:        "LastBackup",
				Type:        "date",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".metadata.creationTimestamp",
				Name:     "Age",
				Type:     "date",
			}, apiextensionsv1.CustomResourceColumnDefinition{
				JSONPath: ".spec.paused",
				Name:     "Paused",
				Type:     "boolean",
			}},
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "Schedule is a Velero resource that represents a pre-scheduled or periodic Backup that should be run.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "ScheduleSpec defines the specification for a Velero schedule",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"paused": apiextensionsv1.JSONSchemaProps{
								Description: "Paused specifies whether the schedule is paused or not",
								Type:        "boolean",
							},
							"schedule": apiextensionsv1.JSONSchemaProps{
								Description: "Schedule is a Cron expression defining when to run the Backup.",
								Type:        "string",
							},
							"template": apiextensionsv1.JSONSchemaProps{
								Description: "Template is the definition of the Backup to be run on the provided schedule",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"csiSnapshotTimeout": apiextensionsv1.JSONSchemaProps{
										Description: "CSISnapshotTimeout specifies the time used to wait for CSI VolumeSnapshot status turns to ReadyToUse during creation, before returning error as timeout. The default value is 10 minute.",
										Type:        "string",
									},
									"defaultVolumesToFsBackup": apiextensionsv1.JSONSchemaProps{
										Description: "DefaultVolumesToFsBackup specifies whether pod volume file system backup should be used for all volumes by default.",
										Nullable:    true,
										Type:        "boolean",
									},
									"defaultVolumesToRestic": apiextensionsv1.JSONSchemaProps{
										Description: `DefaultVolumesToRestic specifies whether restic should be used to take a backup of all pod volumes by default. 
 Deprecated: this field is no longer used and will be removed entirely in future. Use DefaultVolumesToFsBackup instead.`,
										Nullable: true,
										Type:     "boolean",
									},
									"excludedClusterScopedResources": apiextensionsv1.JSONSchemaProps{
										Description: `ExcludedClusterScopedResources is a slice of cluster-scoped resource type names to exclude from the backup. If set to "*", all cluster-scoped resource types are excluded. The default value is empty.`,
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"excludedNamespaceScopedResources": apiextensionsv1.JSONSchemaProps{
										Description: `ExcludedNamespaceScopedResources is a slice of namespace-scoped resource type names to exclude from the backup. If set to "*", all namespace-scoped resource types are excluded. The default value is empty.`,
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"excludedNamespaces": apiextensionsv1.JSONSchemaProps{
										Description: "ExcludedNamespaces contains a list of namespaces that are not included in the backup.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"excludedResources": apiextensionsv1.JSONSchemaProps{
										Description: "ExcludedResources is a slice of resource names that are not included in the backup.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"hooks": apiextensionsv1.JSONSchemaProps{
										Description: "Hooks represent custom behaviors that should be executed at different phases of the backup.",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{"resources": apiextensionsv1.JSONSchemaProps{
											Description: "Resources are hooks that should be executed when backing up individual instances of a resource.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on the rules defined for namespaces, resources, and label selector.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"excludedNamespaces": apiextensionsv1.JSONSchemaProps{
														Description: "ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.",
														Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Nullable:    true,
														Type:        "array",
													},
													"excludedResources": apiextensionsv1.JSONSchemaProps{
														Description: "ExcludedResources specifies the resources to which this hook spec does not apply.",
														Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Nullable:    true,
														Type:        "array",
													},
													"includedNamespaces": apiextensionsv1.JSONSchemaProps{
														Description: "IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies to all namespaces.",
														Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Nullable:    true,
														Type:        "array",
													},
													"includedResources": apiextensionsv1.JSONSchemaProps{
														Description: "IncludedResources specifies the resources to which this hook spec applies. If empty, it applies to all resources.",
														Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
														Nullable:    true,
														Type:        "array",
													},
													"labelSelector": apiextensionsv1.JSONSchemaProps{
														Description: "LabelSelector, if specified, filters the resources to which this hook spec applies.",
														Nullable:    true,
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"matchExpressions": apiextensionsv1.JSONSchemaProps{
																Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
																Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
																	Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
																	Properties: map[string]apiextensionsv1.JSONSchemaProps{
																		"key": apiextensionsv1.JSONSchemaProps{
																			Description: "key is the label key that the selector applies to.",
																			Type:        "string",
																		},
																		"operator": apiextensionsv1.JSONSchemaProps{
																			Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
																			Type:        "string",
																		},
																		"values": apiextensionsv1.JSONSchemaProps{
																			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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																			Type:        "array",
																		},
																	},
																	Required: []string{"key", "operator"},
																	Type:     "object",
																}},
																Type: "array",
															},
															"matchLabels": apiextensionsv1.JSONSchemaProps{
																AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
																	Allows: true,
																	Schema: &apiextensionsv1.JSONSchemaProps{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",
															},
														},
														Type: "object",
													},
													"name": apiextensionsv1.JSONSchemaProps{
														Description: "Name is the name of this hook.",
														Type:        "string",
													},
													"post": apiextensionsv1.JSONSchemaProps{
														Description: `PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup. These are executed after all "additional items" from item actions are processed.`,
														Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
															Description: "BackupResourceHook defines a hook for a resource.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{"exec": apiextensionsv1.JSONSchemaProps{
																Description: "Exec defines an exec hook.",
																Properties: map[string]apiextensionsv1.JSONSchemaProps{
																	"command": apiextensionsv1.JSONSchemaProps{
																		Description: "Command is the command and arguments to execute.",
																		Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																		MinItems:    P(int64(1)),
																		Type:        "array",
																	},
																	"container": apiextensionsv1.JSONSchemaProps{
																		Description: "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.",
																		Type:        "string",
																	},
																	"onError": apiextensionsv1.JSONSchemaProps{
																		Description: "OnError specifies how Velero should behave if it encounters an error executing this hook.",
																		Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Continue\"")}, apiextensionsv1.JSON{Raw: []byte("\"Fail\"")}},
																		Type:        "string",
																	},
																	"timeout": apiextensionsv1.JSONSchemaProps{
																		Description: "Timeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.",
																		Type:        "string",
																	},
																},
																Required: []string{"command"},
																Type:     "object",
															}},
															Required: []string{"exec"},
															Type:     "object",
														}},
														Type: "array",
													},
													"pre": apiextensionsv1.JSONSchemaProps{
														Description: `PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup. These are executed before any "additional items" from item actions are processed.`,
														Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
															Description: "BackupResourceHook defines a hook for a resource.",
															Properties: map[string]apiextensionsv1.JSONSchemaProps{"exec": apiextensionsv1.JSONSchemaProps{
																Description: "Exec defines an exec hook.",
																Properties: map[string]apiextensionsv1.JSONSchemaProps{
																	"command": apiextensionsv1.JSONSchemaProps{
																		Description: "Command is the command and arguments to execute.",
																		Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																		MinItems:    P(int64(1)),
																		Type:        "array",
																	},
																	"container": apiextensionsv1.JSONSchemaProps{
																		Description: "Container is the container in the pod where the command should be executed. If not specified, the pod's first container is used.",
																		Type:        "string",
																	},
																	"onError": apiextensionsv1.JSONSchemaProps{
																		Description: "OnError specifies how Velero should behave if it encounters an error executing this hook.",
																		Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Continue\"")}, apiextensionsv1.JSON{Raw: []byte("\"Fail\"")}},
																		Type:        "string",
																	},
																	"timeout": apiextensionsv1.JSONSchemaProps{
																		Description: "Timeout defines the maximum amount of time Velero should wait for the hook to complete before considering the execution a failure.",
																		Type:        "string",
																	},
																},
																Required: []string{"command"},
																Type:     "object",
															}},
															Required: []string{"exec"},
															Type:     "object",
														}},
														Type: "array",
													},
												},
												Required: []string{"name"},
												Type:     "object",
											}},
											Nullable: true,
											Type:     "array",
										}},
										Type: "object",
									},
									"includeClusterResources": apiextensionsv1.JSONSchemaProps{
										Description: "IncludeClusterResources specifies whether cluster-scoped resources should be included for consideration in the backup.",
										Nullable:    true,
										Type:        "boolean",
									},
									"includedClusterScopedResources": apiextensionsv1.JSONSchemaProps{
										Description: `IncludedClusterScopedResources is a slice of cluster-scoped resource type names to include in the backup. If set to "*", all cluster-scoped resource types are included. The default value is empty, which means only related cluster-scoped resources are included.`,
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"includedNamespaceScopedResources": apiextensionsv1.JSONSchemaProps{
										Description: `IncludedNamespaceScopedResources is a slice of namespace-scoped resource type names to include in the backup. The default value is "*".`,
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"includedNamespaces": apiextensionsv1.JSONSchemaProps{
										Description: "IncludedNamespaces is a slice of namespace names to include objects from. If empty, all namespaces are included.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"includedResources": apiextensionsv1.JSONSchemaProps{
										Description: "IncludedResources is a slice of resource names to include in the backup. If empty, all resources are included.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Nullable:    true,
										Type:        "array",
									},
									"itemOperationTimeout": apiextensionsv1.JSONSchemaProps{
										Description: "ItemOperationTimeout specifies the time used to wait for asynchronous BackupItemAction operations The default value is 1 hour.",
										Type:        "string",
									},
									"labelSelector": apiextensionsv1.JSONSchemaProps{
										Description: "LabelSelector is a metav1.LabelSelector to filter with when adding individual objects to the backup. If empty or nil, all objects are included. Optional.",
										Nullable:    true,
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"matchExpressions": apiextensionsv1.JSONSchemaProps{
												Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
												Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
													Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
													Properties: map[string]apiextensionsv1.JSONSchemaProps{
														"key": apiextensionsv1.JSONSchemaProps{
															Description: "key is the label key that the selector applies to.",
															Type:        "string",
														},
														"operator": apiextensionsv1.JSONSchemaProps{
															Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
															Type:        "string",
														},
														"values": apiextensionsv1.JSONSchemaProps{
															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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
															Type:        "array",
														},
													},
													Required: []string{"key", "operator"},
													Type:     "object",
												}},
												Type: "array",
											},
											"matchLabels": apiextensionsv1.JSONSchemaProps{
												AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
													Allows: true,
													Schema: &apiextensionsv1.JSONSchemaProps{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",
											},
										},
										Type: "object",
									},
									"metadata": apiextensionsv1.JSONSchemaProps{
										Properties: map[string]apiextensionsv1.JSONSchemaProps{"labels": apiextensionsv1.JSONSchemaProps{
											AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
												Allows: true,
												Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
											},
											Type: "object",
										}},
										Type: "object",
									},
									"orLabelSelectors": apiextensionsv1.JSONSchemaProps{
										Description: "OrLabelSelectors is list of metav1.LabelSelector to filter with when adding individual objects to the backup. If multiple provided they will be joined by the OR operator. LabelSelector as well as OrLabelSelectors cannot co-exist in backup request, only one of them can be used.",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
											Description: "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"matchExpressions": apiextensionsv1.JSONSchemaProps{
													Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
													Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
														Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"key": apiextensionsv1.JSONSchemaProps{
																Description: "key is the label key that the selector applies to.",
																Type:        "string",
															},
															"operator": apiextensionsv1.JSONSchemaProps{
																Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
																Type:        "string",
															},
															"values": apiextensionsv1.JSONSchemaProps{
																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:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																Type:        "array",
															},
														},
														Required: []string{"key", "operator"},
														Type:     "object",
													}},
													Type: "array",
												},
												"matchLabels": apiextensionsv1.JSONSchemaProps{
													AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
														Allows: true,
														Schema: &apiextensionsv1.JSONSchemaProps{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",
												},
											},
											Type: "object",
										}},
										Nullable: true,
										Type:     "array",
									},
									"orderedResources": apiextensionsv1.JSONSchemaProps{
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										Description: `OrderedResources specifies the backup order of resources of specific Kind. The map key is the resource name and value is a list of object names separated by commas. Each resource name has format "namespace/objectname".  For cluster resources, simply use "objectname".`,
										Nullable:    true,
										Type:        "object",
									},
									"resourcePolicy": apiextensionsv1.JSONSchemaProps{
										Description: "ResourcePolicy specifies the referenced resource policies that backup should follow",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"apiGroup": apiextensionsv1.JSONSchemaProps{
												Description: "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.",
												Type:        "string",
											},
											"kind": apiextensionsv1.JSONSchemaProps{
												Description: "Kind is the type of resource being referenced",
												Type:        "string",
											},
											"name": apiextensionsv1.JSONSchemaProps{
												Description: "Name is the name of resource being referenced",
												Type:        "string",
											},
										},
										Required: []string{"kind", "name"},
										Type:     "object",
									},
									"snapshotVolumes": apiextensionsv1.JSONSchemaProps{
										Description: "SnapshotVolumes specifies whether to take snapshots of any PV's referenced in the set of objects included in the Backup.",
										Nullable:    true,
										Type:        "boolean",
									},
									"storageLocation": apiextensionsv1.JSONSchemaProps{
										Description: "StorageLocation is a string containing the name of a BackupStorageLocation where the backup should be stored.",
										Type:        "string",
									},
									"ttl": apiextensionsv1.JSONSchemaProps{
										Description: "TTL is a time.Duration-parseable string describing how long the Backup should be retained for.",
										Type:        "string",
									},
									"volumeSnapshotLocations": apiextensionsv1.JSONSchemaProps{
										Description: "VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup.",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
								},
								Type: "object",
							},
							"useOwnerReferencesInBackup": apiextensionsv1.JSONSchemaProps{
								Description: "UseOwnerReferencesBackup specifies whether to use OwnerReferences on backups created by this Schedule.",
								Nullable:    true,
								Type:        "boolean",
							},
						},
						Required: []string{"schedule", "template"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "ScheduleStatus captures the current state of a Velero schedule",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"lastBackup": apiextensionsv1.JSONSchemaProps{
								Description: "LastBackup is the last time a Backup was run for this Schedule schedule",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current phase of the Schedule",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"Enabled\"")}, apiextensionsv1.JSON{Raw: []byte("\"FailedValidation\"")}},
								Type:        "string",
							},
							"validationErrors": apiextensionsv1.JSONSchemaProps{
								Description: "ValidationErrors is a slice of all validation errors (if applicable)",
								Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
								Type:        "array",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var ServerstatusrequestsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "serverstatusrequests.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:       "ServerStatusRequest",
			ListKind:   "ServerStatusRequestList",
			Plural:     "serverstatusrequests",
			ShortNames: []string{"ssr"},
			Singular:   "serverstatusrequest",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "ServerStatusRequest is a request to access current status information about the Velero server.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "ServerStatusRequestSpec is the specification for a ServerStatusRequest.",
						Type:        "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "ServerStatusRequestStatus is the current status of a ServerStatusRequest.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"phase": apiextensionsv1.JSONSchemaProps{
								Description: "Phase is the current lifecycle phase of the ServerStatusRequest.",
								Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"New\"")}, apiextensionsv1.JSON{Raw: []byte("\"Processed\"")}},
								Type:        "string",
							},
							"plugins": apiextensionsv1.JSONSchemaProps{
								Description: "Plugins list information about the plugins running on the Velero server",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "PluginInfo contains attributes of a Velero plugin",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"kind": apiextensionsv1.JSONSchemaProps{Type: "string"},
										"name": apiextensionsv1.JSONSchemaProps{Type: "string"},
									},
									Required: []string{"kind", "name"},
									Type:     "object",
								}},
								Nullable: true,
								Type:     "array",
							},
							"processedTimestamp": apiextensionsv1.JSONSchemaProps{
								Description: "ProcessedTimestamp is when the ServerStatusRequest was processed by the ServerStatusRequestController.",
								Format:      "date-time",
								Nullable:    true,
								Type:        "string",
							},
							"serverVersion": apiextensionsv1.JSONSchemaProps{
								Description: "ServerVersion is the Velero server version.",
								Type:        "string",
							},
						},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}

var VolumesnapshotlocationsIoCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.7.0"},
		Labels:      map[string]string{"component": "velero"},
		Name:        "volumesnapshotlocations.velero.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "velero.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:       "VolumeSnapshotLocation",
			ListKind:   "VolumeSnapshotLocationList",
			Plural:     "volumesnapshotlocations",
			ShortNames: []string{"vsl"},
			Singular:   "volumesnapshotlocation",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{apiextensionsv1.CustomResourceDefinitionVersion{
			Name: "v1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "VolumeSnapshotLocation is a location where Velero stores volume snapshots.",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"apiVersion": apiextensionsv1.JSONSchemaProps{
						Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
						Type:        "string",
					},
					"kind": apiextensionsv1.JSONSchemaProps{
						Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
						Type:        "string",
					},
					"metadata": apiextensionsv1.JSONSchemaProps{Type: "object"},
					"spec": apiextensionsv1.JSONSchemaProps{
						Description: "VolumeSnapshotLocationSpec defines the specification for a Velero VolumeSnapshotLocation.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"config": apiextensionsv1.JSONSchemaProps{
								AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
									Allows: true,
									Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
								},
								Description: "Config is for provider-specific configuration fields.",
								Type:        "object",
							},
							"credential": apiextensionsv1.JSONSchemaProps{
								Description: "Credential contains the credential information intended to be used with this location",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"key": apiextensionsv1.JSONSchemaProps{
										Description: "The key of the secret to select from.  Must be a valid secret key.",
										Type:        "string",
									},
									"name": apiextensionsv1.JSONSchemaProps{
										Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?",
										Type:        "string",
									},
									"optional": apiextensionsv1.JSONSchemaProps{
										Description: "Specify whether the Secret or its key must be defined",
										Type:        "boolean",
									},
								},
								Required: []string{"key"},
								Type:     "object",
							},
							"provider": apiextensionsv1.JSONSchemaProps{
								Description: "Provider is the provider of the volume storage.",
								Type:        "string",
							},
						},
						Required: []string{"provider"},
						Type:     "object",
					},
					"status": apiextensionsv1.JSONSchemaProps{
						Description: "VolumeSnapshotLocationStatus describes the current status of a Velero VolumeSnapshotLocation.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{"phase": apiextensionsv1.JSONSchemaProps{
							Description: "VolumeSnapshotLocationPhase is the lifecycle phase of a Velero VolumeSnapshotLocation.",
							Enum:        []apiextensionsv1.JSON{apiextensionsv1.JSON{Raw: []byte("\"Available\"")}, apiextensionsv1.JSON{Raw: []byte("\"Unavailable\"")}},
							Type:        "string",
						}},
						Type: "object",
					},
				},
				Type: "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
-- out/import/velero/deployment.go --
// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package velero

import (
	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	resource "k8s.io/apimachinery/pkg/api/resource"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var Deploy = &appsv1.Deployment{
	ObjectMeta: metav1.ObjectMeta{
		Labels:    map[string]string{"component": "velero"},
		Name:      "velero",
		Namespace: "velero",
	},
	Spec: appsv1.DeploymentSpec{
		Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"deploy": "velero"}},
		Template: corev1.PodTemplateSpec{
			ObjectMeta: metav1.ObjectMeta{
				Annotations: map[string]string{
					"prometheus.io/path":   "/metrics",
					"prometheus.io/port":   "8085",
					"prometheus.io/scrape": "true",
				},
				Labels: map[string]string{
					"component": "velero",
					"deploy":    "velero",
				},
			},
			Spec: corev1.PodSpec{
				Containers: []corev1.Container{corev1.Container{
					Args:    []string{"server", "--features=", "--uploader-type=restic"},
					Command: []string{"/velero"},
					Env: []corev1.EnvVar{corev1.EnvVar{
						Name:  "VELERO_SCRATCH_DIR",
						Value: "/scratch",
					}, corev1.EnvVar{
						Name:      "VELERO_NAMESPACE",
						ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.namespace"}},
					}, corev1.EnvVar{
						Name:  "LD_LIBRARY_PATH",
						Value: "/plugins",
					}},
					Image:           "velero/velero:v1.11.0",
					ImagePullPolicy: corev1.PullPolicy("IfNotPresent"),
					Name:            "velero",
					Ports: []corev1.ContainerPort{corev1.ContainerPort{
						ContainerPort: int32(8085),
						Name:          "metrics",
					}},
					Resources: corev1.ResourceRequirements{
						Limits: map[corev1.ResourceName]resource.Quantity{
							corev1.ResourceName("cpu"):    resource.MustParse("1"),
							corev1.ResourceName("memory"): resource.MustParse("512Mi"),
						},
						Requests: map[corev1.ResourceName]resource.Quantity{
							corev1.ResourceName("cpu"):    resource.MustParse("500m"),
							corev1.ResourceName("memory"): resource.MustParse("128Mi"),
						},
					},
					VolumeMounts: []corev1.VolumeMount{corev1.VolumeMount{
						MountPath: "/plugins",
						Name:      "plugins",
					}, corev1.VolumeMount{
						MountPath: "/scratch",
						Name:      "scratch",
					}},
				}},
				InitContainers: []corev1.Container{corev1.Container{
					Image:           "velero/velero-plugin-for-aws:v1.0.0",
					ImagePullPolicy: corev1.PullPolicy("IfNotPresent"),
					Name:            "velero-velero-plugin-for-aws",
					VolumeMounts: []corev1.VolumeMount{corev1.VolumeMount{
						MountPath: "/target",
						Name:      "plugins",
					}},
				}},
				RestartPolicy:      corev1.RestartPolicy("Always"),
				ServiceAccountName: "velero",
				Volumes: []corev1.Volume{corev1.Volume{
					Name:         "plugins",
					VolumeSource: corev1.VolumeSource{EmptyDir: &corev1.EmptyDirVolumeSource{}},
				}, corev1.Volume{
					Name:         "scratch",
					VolumeSource: corev1.VolumeSource{EmptyDir: &corev1.EmptyDirVolumeSource{}},
				}},
			},
		},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apps/v1",
		Kind:       "Deployment",
	},
}
-- out/import/velero/namespace.go --
// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package velero

import (
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var NS = &corev1.Namespace{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"component":                                  "velero",
			"pod-security.kubernetes.io/enforce":         "privileged",
			"pod-security.kubernetes.io/enforce-version": "latest",
		},
		Name: "velero",
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "v1",
		Kind:       "Namespace",
	},
}
-- out/import/velero/service-account.go --
// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package velero

import (
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var SA = &corev1.ServiceAccount{
	ObjectMeta: metav1.ObjectMeta{
		Labels:    map[string]string{"component": "velero"},
		Name:      "velero",
		Namespace: "velero",
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "v1",
		Kind:       "ServiceAccount",
	},
}
-- out/import/velero/app.go --
// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package velero

import (
	"context"
	"errors"
	kube "github.com/golingon/lingon/pkg/kube"
	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	rbacv1 "k8s.io/api/rbac/v1"
	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	"os"
	"os/exec"
)

// validate the struct implements the interface
var _ kube.Exporter = (*Velero)(nil)

// Velero contains kubernetes manifests
type Velero struct {
	kube.App

	BackuprepositoriesIoCRD      *apiextensionsv1.CustomResourceDefinition
	BackupsIoCRD                 *apiextensionsv1.CustomResourceDefinition
	BackupstoragelocationsIoCRD  *apiextensionsv1.CustomResourceDefinition
	CRB                          *rbacv1.ClusterRoleBinding
	DeletebackuprequestsIoCRD    *apiextensionsv1.CustomResourceDefinition
	Deploy                       *appsv1.Deployment
	DownloadrequestsIoCRD        *apiextensionsv1.CustomResourceDefinition
	NS                           *corev1.Namespace
	PodvolumebackupsIoCRD        *apiextensionsv1.CustomResourceDefinition
	PodvolumerestoresIoCRD       *apiextensionsv1.CustomResourceDefinition
	RestoresIoCRD                *apiextensionsv1.CustomResourceDefinition
	SA                           *corev1.ServiceAccount
	SchedulesIoCRD               *apiextensionsv1.CustomResourceDefinition
	ServerstatusrequestsIoCRD    *apiextensionsv1.CustomResourceDefinition
	VolumesnapshotlocationsIoCRD *apiextensionsv1.CustomResourceDefinition
}

// New creates a new Velero
func New() *Velero {
	return &Velero{
		BackuprepositoriesIoCRD:      BackuprepositoriesIoCRD,
		BackupsIoCRD:                 BackupsIoCRD,
		BackupstoragelocationsIoCRD:  BackupstoragelocationsIoCRD,
		CRB:                          CRB,
		DeletebackuprequestsIoCRD:    DeletebackuprequestsIoCRD,
		Deploy:                       Deploy,
		DownloadrequestsIoCRD:        DownloadrequestsIoCRD,
		NS:                           NS,
		PodvolumebackupsIoCRD:        PodvolumebackupsIoCRD,
		PodvolumerestoresIoCRD:       PodvolumerestoresIoCRD,
		RestoresIoCRD:                RestoresIoCRD,
		SA:                           SA,
		SchedulesIoCRD:               SchedulesIoCRD,
		ServerstatusrequestsIoCRD:    ServerstatusrequestsIoCRD,
		VolumesnapshotlocationsIoCRD: VolumesnapshotlocationsIoCRD}
}

// Apply applies the kubernetes objects to the cluster
func (a *Velero) Apply(ctx context.Context) error {
	return Apply(ctx, a)
}

// Export exports the kubernetes objects to YAML files in the given directory
func (a *Velero) Export(dir string) error {
	return kube.Export(a, kube.WithExportOutputDirectory(dir))
}

// Apply applies the kubernetes objects contained in Exporter to the cluster
func Apply(ctx context.Context, km kube.Exporter) error {
	cmd := exec.CommandContext(ctx, "kubectl", "apply", "-f", "-")
	cmd.Env = os.Environ()        // inherit environment in case we need to use kubectl from a container
	stdin, err := cmd.StdinPipe() // pipe to pass data to kubectl
	if err != nil {
		return err
	}

	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr

	go func() {
		defer func() {
			err = errors.Join(err, stdin.Close())
		}()
		if errEW := kube.Export(km, kube.WithExportWriter(stdin), kube.WithExportAsSingleFile("stdin")); errEW != nil {
			err = errors.Join(err, errEW)
		}
	}()

	if errS := cmd.Start(); errS != nil {
		return errors.Join(err, errS)
	}

	// waits for the command to exit and waits for any copying
	// to stdin or copying from stdout or stderr to complete
	return errors.Join(err, cmd.Wait())
}

// P converts T to *T, useful for basic types
func P[T any](t T) *T {
	return &t
}
