//go:build !ignore_autogenerated
// +build !ignore_autogenerated

/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by validation-gen. DO NOT EDIT.

package v1

import (
	context "context"

	corev1 "k8s.io/api/core/v1"
	equality "k8s.io/apimachinery/pkg/api/equality"
	operation "k8s.io/apimachinery/pkg/api/operation"
	resource "k8s.io/apimachinery/pkg/api/resource"
	safe "k8s.io/apimachinery/pkg/api/safe"
	validate "k8s.io/apimachinery/pkg/api/validate"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
	types "k8s.io/apimachinery/pkg/types"
	sets "k8s.io/apimachinery/pkg/util/sets"
	field "k8s.io/apimachinery/pkg/util/validation/field"
)

// Validate_AllocatedDeviceStatus validates an instance of AllocatedDeviceStatus according
// to declarative validation rules in the API schema.
func Validate_AllocatedDeviceStatus(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *AllocatedDeviceStatus) (errs field.ErrorList) {

	// field AllocatedDeviceStatus.Driver has no validation
	// field AllocatedDeviceStatus.Pool has no validation
	// field AllocatedDeviceStatus.Device has no validation

	{ // field AllocatedDeviceStatus.ShareID
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.UUID(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *AllocatedDeviceStatus) *string {
				return oldObj.ShareID
			})
		errs = append(errs, fn(fldPath.Child("shareID"), obj.ShareID, oldVal, oldObj != nil)...)
	}

	{ // field AllocatedDeviceStatus.Conditions
		fn := func(
			fldPath *field.Path,
			obj, oldObj []metav1.Condition,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkAlpha().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *metav1.Condition, b *metav1.Condition) bool { return a.Type == b.Type }).MarkAlpha(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *metav1.Condition, b *metav1.Condition) bool { return a.Type == b.Type }, validate.SemanticDeepEqual, validation.Validate_Condition); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *AllocatedDeviceStatus) []metav1.Condition {
				return oldObj.Conditions
			})
		errs = append(errs, fn(fldPath.Child("conditions"), obj.Conditions, oldVal, oldObj != nil)...)
	}

	// field AllocatedDeviceStatus.Data has no validation

	{ // field AllocatedDeviceStatus.NetworkData
		fn := func(
			fldPath *field.Path,
			obj, oldObj *NetworkDeviceData,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_NetworkDeviceData(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *AllocatedDeviceStatus) *NetworkDeviceData {
				return oldObj.NetworkData
			})
		errs = append(errs, fn(fldPath.Child("networkData"), obj.NetworkData, oldVal, oldObj != nil)...)
	}

	return errs
}

var symbolsForAllocationConfigSource = sets.New(AllocationConfigSourceClaim, AllocationConfigSourceClass)

// Validate_AllocationConfigSource validates an instance of AllocationConfigSource according
// to declarative validation rules in the API schema.
func Validate_AllocationConfigSource(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *AllocationConfigSource) (errs field.ErrorList) {

	if e := validate.Enum(ctx, op, fldPath, obj, oldObj, symbolsForAllocationConfigSource, nil).MarkBeta(); len(e) != 0 {
		errs = append(errs, e...)
	}

	return errs
}

// Validate_AllocationResult validates an instance of AllocationResult according
// to declarative validation rules in the API schema.
func Validate_AllocationResult(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *AllocationResult) (errs field.ErrorList) {

	{ // field AllocationResult.Devices
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceAllocationResult,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceAllocationResult(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *AllocationResult) *DeviceAllocationResult {
				return &oldObj.Devices
			})
		errs = append(errs, fn(fldPath.Child("devices"), &obj.Devices, oldVal, oldObj != nil)...)
	}

	// field AllocationResult.NodeSelector has no validation
	// field AllocationResult.AllocationTimestamp has no validation
	return errs
}

// Validate_CounterSet validates an instance of CounterSet according
// to declarative validation rules in the API schema.
func Validate_CounterSet(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *CounterSet) (errs field.ErrorList) {

	{ // field CounterSet.Name
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ShortName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *CounterSet) *string {
				return &oldObj.Name
			})
		errs = append(errs, fn(fldPath.Child("name"), &obj.Name, oldVal, oldObj != nil)...)
	}

	{ // field CounterSet.Counters
		fn := func(
			fldPath *field.Path,
			obj, oldObj map[string]Counter,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredMap(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.EachMapKey(ctx, op, fldPath, obj, oldObj, validate.ShortName).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *CounterSet) map[string]Counter {
				return oldObj.Counters
			})
		errs = append(errs, fn(fldPath.Child("counters"), obj.Counters, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_Device validates an instance of Device according
// to declarative validation rules in the API schema.
func Validate_Device(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *Device) (errs field.ErrorList) {

	// field Device.Name has no validation

	{ // field Device.Attributes
		fn := func(
			fldPath *field.Path,
			obj, oldObj map[QualifiedName]DeviceAttribute,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalMap(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the map and call the value type's validation function
			if e := validate.EachMapVal(ctx, op, fldPath, obj, oldObj, validate.SemanticDeepEqual, Validate_DeviceAttribute); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *Device) map[QualifiedName]DeviceAttribute {
				return oldObj.Attributes
			})
		errs = append(errs, fn(fldPath.Child("attributes"), obj.Attributes, oldVal, oldObj != nil)...)
	}

	// field Device.Capacity has no validation

	{ // field Device.ConsumesCounters
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceCounterConsumption,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 2).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *DeviceCounterConsumption, b *DeviceCounterConsumption) bool {
					return a.CounterSet == b.CounterSet
				}).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *DeviceCounterConsumption, b *DeviceCounterConsumption) bool {
					return a.CounterSet == b.CounterSet
				}, validate.SemanticDeepEqual, Validate_DeviceCounterConsumption); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *Device) []DeviceCounterConsumption {
				return oldObj.ConsumesCounters
			})
		errs = append(errs, fn(fldPath.Child("consumesCounters"), obj.ConsumesCounters, oldVal, oldObj != nil)...)
	}

	// field Device.NodeName has no validation
	// field Device.NodeSelector has no validation
	// field Device.AllNodes has no validation

	{ // field Device.Taints
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceTaint,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceTaint); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *Device) []DeviceTaint {
				return oldObj.Taints
			})
		errs = append(errs, fn(fldPath.Child("taints"), obj.Taints, oldVal, oldObj != nil)...)
	}

	// field Device.BindsToNode has no validation

	{ // field Device.BindingConditions
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 4).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *Device) []string {
				return oldObj.BindingConditions
			})
		errs = append(errs, fn(fldPath.Child("bindingConditions"), obj.BindingConditions, oldVal, oldObj != nil)...)
	}

	{ // field Device.BindingFailureConditions
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 4).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *Device) []string {
				return oldObj.BindingFailureConditions
			})
		errs = append(errs, fn(fldPath.Child("bindingFailureConditions"), obj.BindingFailureConditions, oldVal, oldObj != nil)...)
	}

	// field Device.AllowMultipleAllocations has no validation

	{ // field Device.NodeAllocatableResources
		fn := func(
			fldPath *field.Path,
			obj, oldObj map[corev1.ResourceName]NodeAllocatableResource,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalMap(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the map and call the value type's validation function
			if e := validate.EachMapVal(ctx, op, fldPath, obj, oldObj, validate.SemanticDeepEqual, Validate_NodeAllocatableResource); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *Device) map[corev1.ResourceName]NodeAllocatableResource {
				return oldObj.NodeAllocatableResources
			})
		errs = append(errs, fn(fldPath.Child("nodeAllocatableResources"), obj.NodeAllocatableResources, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceAllocationConfiguration validates an instance of DeviceAllocationConfiguration according
// to declarative validation rules in the API schema.
func Validate_DeviceAllocationConfiguration(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceAllocationConfiguration) (errs field.ErrorList) {

	{ // field DeviceAllocationConfiguration.Source
		fn := func(
			fldPath *field.Path,
			obj, oldObj *AllocationConfigSource,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_AllocationConfigSource(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAllocationConfiguration) *AllocationConfigSource {
				return &oldObj.Source
			})
		errs = append(errs, fn(fldPath.Child("source"), &obj.Source, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAllocationConfiguration.Requests
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAllocationConfiguration) []string {
				return oldObj.Requests
			})
		errs = append(errs, fn(fldPath.Child("requests"), obj.Requests, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAllocationConfiguration.DeviceConfiguration
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAllocationConfiguration) *DeviceConfiguration {
				return &oldObj.DeviceConfiguration
			})
		errs = append(errs, fn(safe.Value(fldPath, func() *field.Path { return fldPath.Child("DeviceConfiguration") }), &obj.DeviceConfiguration, oldVal, oldObj != nil)...)
	}

	return errs
}

var symbolsForDeviceAllocationMode = sets.New(DeviceAllocationModeAll, DeviceAllocationModeExactCount)

// Validate_DeviceAllocationMode validates an instance of DeviceAllocationMode according
// to declarative validation rules in the API schema.
func Validate_DeviceAllocationMode(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceAllocationMode) (errs field.ErrorList) {

	if e := validate.Enum(ctx, op, fldPath, obj, oldObj, symbolsForDeviceAllocationMode, nil).MarkBeta(); len(e) != 0 {
		errs = append(errs, e...)
	}

	return errs
}

// Validate_DeviceAllocationResult validates an instance of DeviceAllocationResult according
// to declarative validation rules in the API schema.
func Validate_DeviceAllocationResult(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceAllocationResult) (errs field.ErrorList) {

	{ // field DeviceAllocationResult.Results
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceRequestAllocationResult,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceRequestAllocationResult); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAllocationResult) []DeviceRequestAllocationResult {
				return oldObj.Results
			})
		errs = append(errs, fn(fldPath.Child("results"), obj.Results, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAllocationResult.Config
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceAllocationConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 64).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceAllocationConfiguration); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAllocationResult) []DeviceAllocationConfiguration {
				return oldObj.Config
			})
		errs = append(errs, fn(fldPath.Child("config"), obj.Config, oldVal, oldObj != nil)...)
	}

	return errs
}

var unionMembershipFor_k8s_io_api_resource_v1_DeviceAttribute_ = validate.NewUnionMembership(validate.NewUnionMember("int"), validate.NewUnionMember("bool"), validate.NewUnionMember("string"), validate.NewUnionMember("version"), validate.NewUnionMember("ints"), validate.NewUnionMember("bools"), validate.NewUnionMember("strings"), validate.NewUnionMember("versions"))

// Validate_DeviceAttribute validates an instance of DeviceAttribute according
// to declarative validation rules in the API schema.
func Validate_DeviceAttribute(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceAttribute) (errs field.ErrorList) {

	if e := validate.Union(ctx, op, fldPath, obj, oldObj, unionMembershipFor_k8s_io_api_resource_v1_DeviceAttribute_,
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return obj.IntValue != nil
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return obj.BoolValue != nil
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return obj.StringValue != nil
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return obj.VersionValue != nil
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return len(obj.IntValues) != 0
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return len(obj.BoolValues) != 0
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return len(obj.StringValues) != 0
		},
		func(obj *DeviceAttribute) bool {
			if obj == nil {
				return false
			}
			return len(obj.VersionValues) != 0
		}).MarkBeta(); len(e) != 0 {
		errs = append(errs, e...)
	}

	{ // field DeviceAttribute.IntValue
		fn := func(
			fldPath *field.Path,
			obj, oldObj *int64,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) *int64 {
				return oldObj.IntValue
			})
		errs = append(errs, fn(fldPath.Child("int"), obj.IntValue, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.BoolValue
		fn := func(
			fldPath *field.Path,
			obj, oldObj *bool,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) *bool {
				return oldObj.BoolValue
			})
		errs = append(errs, fn(fldPath.Child("bool"), obj.BoolValue, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.StringValue
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) *string {
				return oldObj.StringValue
			})
		errs = append(errs, fn(fldPath.Child("string"), obj.StringValue, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.VersionValue
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) *string {
				return oldObj.VersionValue
			})
		errs = append(errs, fn(fldPath.Child("version"), obj.VersionValue, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.IntValues
		fn := func(
			fldPath *field.Path,
			obj, oldObj []int64,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) []int64 {
				return oldObj.IntValues
			})
		errs = append(errs, fn(fldPath.Child("ints"), obj.IntValues, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.BoolValues
		fn := func(
			fldPath *field.Path,
			obj, oldObj []bool,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) []bool {
				return oldObj.BoolValues
			})
		errs = append(errs, fn(fldPath.Child("bools"), obj.BoolValues, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.StringValues
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil,
				func(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *string) field.ErrorList {
					return validate.MaxBytes(ctx, op, fldPath, obj, oldObj, 64)
				}).MarkAlpha(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) []string {
				return oldObj.StringValues
			})
		errs = append(errs, fn(fldPath.Child("strings"), obj.StringValues, oldVal, oldObj != nil)...)
	}

	{ // field DeviceAttribute.VersionValues
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceAttribute) []string {
				return oldObj.VersionValues
			})
		errs = append(errs, fn(fldPath.Child("versions"), obj.VersionValues, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceClaim validates an instance of DeviceClaim according
// to declarative validation rules in the API schema.
func Validate_DeviceClaim(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceClaim) (errs field.ErrorList) {

	{ // field DeviceClaim.Requests
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceRequest,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *DeviceRequest, b *DeviceRequest) bool { return a.Name == b.Name }).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *DeviceRequest, b *DeviceRequest) bool { return a.Name == b.Name }, validate.SemanticDeepEqual, Validate_DeviceRequest); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClaim) []DeviceRequest {
				return oldObj.Requests
			})
		errs = append(errs, fn(fldPath.Child("requests"), obj.Requests, oldVal, oldObj != nil)...)
	}

	{ // field DeviceClaim.Constraints
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceConstraint,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceConstraint); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClaim) []DeviceConstraint {
				return oldObj.Constraints
			})
		errs = append(errs, fn(fldPath.Child("constraints"), obj.Constraints, oldVal, oldObj != nil)...)
	}

	{ // field DeviceClaim.Config
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceClaimConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClaimConfiguration); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClaim) []DeviceClaimConfiguration {
				return oldObj.Config
			})
		errs = append(errs, fn(fldPath.Child("config"), obj.Config, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceClaimConfiguration validates an instance of DeviceClaimConfiguration according
// to declarative validation rules in the API schema.
func Validate_DeviceClaimConfiguration(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceClaimConfiguration) (errs field.ErrorList) {

	{ // field DeviceClaimConfiguration.Requests
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClaimConfiguration) []string {
				return oldObj.Requests
			})
		errs = append(errs, fn(fldPath.Child("requests"), obj.Requests, oldVal, oldObj != nil)...)
	}

	{ // field DeviceClaimConfiguration.DeviceConfiguration
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClaimConfiguration) *DeviceConfiguration {
				return &oldObj.DeviceConfiguration
			})
		errs = append(errs, fn(safe.Value(fldPath, func() *field.Path { return fldPath.Child("DeviceConfiguration") }), &obj.DeviceConfiguration, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceClassConfiguration validates an instance of DeviceClassConfiguration according
// to declarative validation rules in the API schema.
func Validate_DeviceClassConfiguration(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceClassConfiguration) (errs field.ErrorList) {

	{ // field DeviceClassConfiguration.DeviceConfiguration
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceConfiguration(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClassConfiguration) *DeviceConfiguration {
				return &oldObj.DeviceConfiguration
			})
		errs = append(errs, fn(safe.Value(fldPath, func() *field.Path { return fldPath.Child("DeviceConfiguration") }), &obj.DeviceConfiguration, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceClassSpec validates an instance of DeviceClassSpec according
// to declarative validation rules in the API schema.
func Validate_DeviceClassSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceClassSpec) (errs field.ErrorList) {

	{ // field DeviceClassSpec.Selectors
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceSelector,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClassSpec) []DeviceSelector {
				return oldObj.Selectors
			})
		errs = append(errs, fn(fldPath.Child("selectors"), obj.Selectors, oldVal, oldObj != nil)...)
	}

	{ // field DeviceClassSpec.Config
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceClassConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceClassConfiguration); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClassSpec) []DeviceClassConfiguration {
				return oldObj.Config
			})
		errs = append(errs, fn(fldPath.Child("config"), obj.Config, oldVal, oldObj != nil)...)
	}

	{ // field DeviceClassSpec.ExtendedResourceName
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ExtendedResourceName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceClassSpec) *string {
				return oldObj.ExtendedResourceName
			})
		errs = append(errs, fn(fldPath.Child("extendedResourceName"), obj.ExtendedResourceName, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceConfiguration validates an instance of DeviceConfiguration according
// to declarative validation rules in the API schema.
func Validate_DeviceConfiguration(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceConfiguration) (errs field.ErrorList) {

	{ // field DeviceConfiguration.Opaque
		fn := func(
			fldPath *field.Path,
			obj, oldObj *OpaqueDeviceConfiguration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_OpaqueDeviceConfiguration(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceConfiguration) *OpaqueDeviceConfiguration {
				return oldObj.Opaque
			})
		errs = append(errs, fn(fldPath.Child("opaque"), obj.Opaque, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceConstraint validates an instance of DeviceConstraint according
// to declarative validation rules in the API schema.
func Validate_DeviceConstraint(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceConstraint) (errs field.ErrorList) {

	{ // field DeviceConstraint.Requests
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceConstraint) []string {
				return oldObj.Requests
			})
		errs = append(errs, fn(fldPath.Child("requests"), obj.Requests, oldVal, oldObj != nil)...)
	}

	{ // field DeviceConstraint.MatchAttribute
		fn := func(
			fldPath *field.Path,
			obj, oldObj *FullyQualifiedName,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ResourceFullyQualifiedName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceConstraint) *FullyQualifiedName {
				return oldObj.MatchAttribute
			})
		errs = append(errs, fn(fldPath.Child("matchAttribute"), obj.MatchAttribute, oldVal, oldObj != nil)...)
	}

	{ // field DeviceConstraint.DistinctAttribute
		fn := func(
			fldPath *field.Path,
			obj, oldObj *FullyQualifiedName,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ResourceFullyQualifiedName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceConstraint) *FullyQualifiedName {
				return oldObj.DistinctAttribute
			})
		errs = append(errs, fn(fldPath.Child("distinctAttribute"), obj.DistinctAttribute, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceCounterConsumption validates an instance of DeviceCounterConsumption according
// to declarative validation rules in the API schema.
func Validate_DeviceCounterConsumption(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceCounterConsumption) (errs field.ErrorList) {

	{ // field DeviceCounterConsumption.CounterSet
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ShortName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceCounterConsumption) *string {
				return &oldObj.CounterSet
			})
		errs = append(errs, fn(fldPath.Child("counterSet"), &obj.CounterSet, oldVal, oldObj != nil)...)
	}

	{ // field DeviceCounterConsumption.Counters
		fn := func(
			fldPath *field.Path,
			obj, oldObj map[string]Counter,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredMap(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.EachMapKey(ctx, op, fldPath, obj, oldObj, validate.ShortName).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceCounterConsumption) map[string]Counter {
				return oldObj.Counters
			})
		errs = append(errs, fn(fldPath.Child("counters"), obj.Counters, oldVal, oldObj != nil)...)
	}

	{ // field DeviceCounterConsumption.CompatibilityGroups
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 2).MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, validate.DirectEqual, nil, validate.ShortName); len(e) != 0 {
				errs = append(errs, e...)
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceCounterConsumption) []string {
				return oldObj.CompatibilityGroups
			})
		errs = append(errs, fn(fldPath.Child("compatibilityGroups"), obj.CompatibilityGroups, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceDerivedAttribute validates an instance of DeviceDerivedAttribute according
// to declarative validation rules in the API schema.
func Validate_DeviceDerivedAttribute(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceDerivedAttribute) (errs field.ErrorList) {

	{ // field DeviceDerivedAttribute.Name
		fn := func(
			fldPath *field.Path,
			obj, oldObj *FullyQualifiedName,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ResourceFullyQualifiedName(ctx, op, fldPath, obj, oldObj); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceDerivedAttribute) *FullyQualifiedName {
				return &oldObj.Name
			})
		errs = append(errs, fn(fldPath.Child("name"), &obj.Name, oldVal, oldObj != nil)...)
	}

	{ // field DeviceDerivedAttribute.Expression
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceDerivedAttribute) *string {
				return &oldObj.Expression
			})
		errs = append(errs, fn(fldPath.Child("expression"), &obj.Expression, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceRequest validates an instance of DeviceRequest according
// to declarative validation rules in the API schema.
func Validate_DeviceRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceRequest) (errs field.ErrorList) {

	// field DeviceRequest.Name has no validation

	{ // field DeviceRequest.Exactly
		fn := func(
			fldPath *field.Path,
			obj, oldObj *ExactDeviceRequest,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_ExactDeviceRequest(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequest) *ExactDeviceRequest {
				return oldObj.Exactly
			})
		errs = append(errs, fn(fldPath.Child("exactly"), obj.Exactly, oldVal, oldObj != nil)...)
	}

	{ // field DeviceRequest.FirstAvailable
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceSubRequest,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 8).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *DeviceSubRequest, b *DeviceSubRequest) bool { return a.Name == b.Name }).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *DeviceSubRequest, b *DeviceSubRequest) bool { return a.Name == b.Name }, validate.SemanticDeepEqual, Validate_DeviceSubRequest); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequest) []DeviceSubRequest {
				return oldObj.FirstAvailable
			})
		errs = append(errs, fn(fldPath.Child("firstAvailable"), obj.FirstAvailable, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceRequestAllocationResult validates an instance of DeviceRequestAllocationResult according
// to declarative validation rules in the API schema.
func Validate_DeviceRequestAllocationResult(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceRequestAllocationResult) (errs field.ErrorList) {

	// field DeviceRequestAllocationResult.Request has no validation

	{ // field DeviceRequestAllocationResult.Driver
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.LongNameCaseless(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			if e := validate.MaxLength(ctx, op, fldPath, obj, oldObj, 63).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) *string {
				return &oldObj.Driver
			})
		errs = append(errs, fn(fldPath.Child("driver"), &obj.Driver, oldVal, oldObj != nil)...)
	}

	{ // field DeviceRequestAllocationResult.Pool
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.ResourcePoolName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) *string {
				return &oldObj.Pool
			})
		errs = append(errs, fn(fldPath.Child("pool"), &obj.Pool, oldVal, oldObj != nil)...)
	}

	// field DeviceRequestAllocationResult.Device has no validation
	// field DeviceRequestAllocationResult.AdminAccess has no validation

	{ // field DeviceRequestAllocationResult.Tolerations
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceToleration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) []DeviceToleration {
				return oldObj.Tolerations
			})
		errs = append(errs, fn(fldPath.Child("tolerations"), obj.Tolerations, oldVal, oldObj != nil)...)
	}

	{ // field DeviceRequestAllocationResult.BindingConditions
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 4).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) []string {
				return oldObj.BindingConditions
			})
		errs = append(errs, fn(fldPath.Child("bindingConditions"), obj.BindingConditions, oldVal, oldObj != nil)...)
	}

	{ // field DeviceRequestAllocationResult.BindingFailureConditions
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 4).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) []string {
				return oldObj.BindingFailureConditions
			})
		errs = append(errs, fn(fldPath.Child("bindingFailureConditions"), obj.BindingFailureConditions, oldVal, oldObj != nil)...)
	}

	{ // field DeviceRequestAllocationResult.ShareID
		fn := func(
			fldPath *field.Path,
			obj, oldObj *types.UID,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.UUID(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) *types.UID {
				return oldObj.ShareID
			})
		errs = append(errs, fn(fldPath.Child("shareID"), obj.ShareID, oldVal, oldObj != nil)...)
	}

	// field DeviceRequestAllocationResult.ConsumedCapacity has no validation

	{ // field DeviceRequestAllocationResult.SkipNodeOperations
		fn := func(
			fldPath *field.Path,
			obj, oldObj []SkipNodeOperation,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, validate.DirectEqual, nil, Validate_SkipNodeOperation); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceRequestAllocationResult) []SkipNodeOperation {
				return oldObj.SkipNodeOperations
			})
		errs = append(errs, fn(fldPath.Child("skipNodeOperations"), obj.SkipNodeOperations, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceSubRequest validates an instance of DeviceSubRequest according
// to declarative validation rules in the API schema.
func Validate_DeviceSubRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceSubRequest) (errs field.ErrorList) {

	// field DeviceSubRequest.Name has no validation

	{ // field DeviceSubRequest.DeviceClassName
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.LongName(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceSubRequest) *string {
				return &oldObj.DeviceClassName
			})
		errs = append(errs, fn(fldPath.Child("deviceClassName"), &obj.DeviceClassName, oldVal, oldObj != nil)...)
	}

	{ // field DeviceSubRequest.Selectors
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceSelector,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceSubRequest) []DeviceSelector {
				return oldObj.Selectors
			})
		errs = append(errs, fn(fldPath.Child("selectors"), obj.Selectors, oldVal, oldObj != nil)...)
	}

	{ // field DeviceSubRequest.AllocationMode
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceAllocationMode,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceAllocationMode(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceSubRequest) *DeviceAllocationMode {
				return &oldObj.AllocationMode
			})
		errs = append(errs, fn(fldPath.Child("allocationMode"), &obj.AllocationMode, oldVal, oldObj != nil)...)
	}

	// field DeviceSubRequest.Count has no validation

	{ // field DeviceSubRequest.Tolerations
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceToleration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceSubRequest) []DeviceToleration {
				return oldObj.Tolerations
			})
		errs = append(errs, fn(fldPath.Child("tolerations"), obj.Tolerations, oldVal, oldObj != nil)...)
	}

	// field DeviceSubRequest.Capacity has no validation

	{ // field DeviceSubRequest.DerivedAttributes
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceDerivedAttribute,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceDerivedAttribute); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceSubRequest) []DeviceDerivedAttribute {
				return oldObj.DerivedAttributes
			})
		errs = append(errs, fn(fldPath.Child("derivedAttributes"), obj.DerivedAttributes, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceTaint validates an instance of DeviceTaint according
// to declarative validation rules in the API schema.
func Validate_DeviceTaint(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceTaint) (errs field.ErrorList) {

	// field DeviceTaint.Key has no validation
	// field DeviceTaint.Value has no validation

	{ // field DeviceTaint.Effect
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceTaintEffect,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceTaintEffect(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceTaint) *DeviceTaintEffect {
				return &oldObj.Effect
			})
		errs = append(errs, fn(fldPath.Child("effect"), &obj.Effect, oldVal, oldObj != nil)...)
	}

	// field DeviceTaint.TimeAdded has no validation
	return errs
}

var symbolsForDeviceTaintEffect = sets.New(DeviceTaintEffectNoExecute, DeviceTaintEffectNoSchedule, DeviceTaintEffectNone)

// Validate_DeviceTaintEffect validates an instance of DeviceTaintEffect according
// to declarative validation rules in the API schema.
func Validate_DeviceTaintEffect(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceTaintEffect) (errs field.ErrorList) {

	if e := validate.Enum(ctx, op, fldPath, obj, oldObj, symbolsForDeviceTaintEffect, nil).MarkBeta(); len(e) != 0 {
		errs = append(errs, e...)
	}

	return errs
}

// Validate_DeviceTaintRuleSpec validates an instance of DeviceTaintRuleSpec according
// to declarative validation rules in the API schema.
func Validate_DeviceTaintRuleSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceTaintRuleSpec) (errs field.ErrorList) {

	// field DeviceTaintRuleSpec.DeviceSelector has no validation

	{ // field DeviceTaintRuleSpec.Taint
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceTaint,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceTaint(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceTaintRuleSpec) *DeviceTaint {
				return &oldObj.Taint
			})
		errs = append(errs, fn(fldPath.Child("taint"), &obj.Taint, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceTaintRuleStatus validates an instance of DeviceTaintRuleStatus according
// to declarative validation rules in the API schema.
func Validate_DeviceTaintRuleStatus(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceTaintRuleStatus) (errs field.ErrorList) {

	{ // field DeviceTaintRuleStatus.Conditions
		fn := func(
			fldPath *field.Path,
			obj, oldObj []metav1.Condition,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkAlpha().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *metav1.Condition, b *metav1.Condition) bool { return a.Type == b.Type }).MarkAlpha(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *metav1.Condition, b *metav1.Condition) bool { return a.Type == b.Type }, validate.SemanticDeepEqual, validation.Validate_Condition); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceTaintRuleStatus) []metav1.Condition {
				return oldObj.Conditions
			})
		errs = append(errs, fn(fldPath.Child("conditions"), obj.Conditions, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_DeviceToleration validates an instance of DeviceToleration according
// to declarative validation rules in the API schema.
func Validate_DeviceToleration(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceToleration) (errs field.ErrorList) {

	{ // field DeviceToleration.Key
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.LabelKey(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceToleration) *string {
				return &oldObj.Key
			})
		errs = append(errs, fn(fldPath.Child("key"), &obj.Key, oldVal, oldObj != nil)...)
	}

	{ // field DeviceToleration.Operator
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceTolerationOperator,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			// optional fields with default values are effectively required
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceTolerationOperator(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceToleration) *DeviceTolerationOperator {
				return &oldObj.Operator
			})
		errs = append(errs, fn(fldPath.Child("operator"), &obj.Operator, oldVal, oldObj != nil)...)
	}

	// field DeviceToleration.Value has no validation

	{ // field DeviceToleration.Effect
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceTaintEffect,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceTaintEffect(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *DeviceToleration) *DeviceTaintEffect {
				return &oldObj.Effect
			})
		errs = append(errs, fn(fldPath.Child("effect"), &obj.Effect, oldVal, oldObj != nil)...)
	}

	// field DeviceToleration.TolerationSeconds has no validation
	return errs
}

var symbolsForDeviceTolerationOperator = sets.New(DeviceTolerationOpEqual, DeviceTolerationOpExists)

// Validate_DeviceTolerationOperator validates an instance of DeviceTolerationOperator according
// to declarative validation rules in the API schema.
func Validate_DeviceTolerationOperator(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *DeviceTolerationOperator) (errs field.ErrorList) {

	if e := validate.Enum(ctx, op, fldPath, obj, oldObj, symbolsForDeviceTolerationOperator, nil).MarkBeta(); len(e) != 0 {
		errs = append(errs, e...)
	}

	return errs
}

// Validate_ExactDeviceRequest validates an instance of ExactDeviceRequest according
// to declarative validation rules in the API schema.
func Validate_ExactDeviceRequest(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ExactDeviceRequest) (errs field.ErrorList) {

	// field ExactDeviceRequest.DeviceClassName has no validation

	{ // field ExactDeviceRequest.Selectors
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceSelector,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ExactDeviceRequest) []DeviceSelector {
				return oldObj.Selectors
			})
		errs = append(errs, fn(fldPath.Child("selectors"), obj.Selectors, oldVal, oldObj != nil)...)
	}

	{ // field ExactDeviceRequest.AllocationMode
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceAllocationMode,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceAllocationMode(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ExactDeviceRequest) *DeviceAllocationMode {
				return &oldObj.AllocationMode
			})
		errs = append(errs, fn(fldPath.Child("allocationMode"), &obj.AllocationMode, oldVal, oldObj != nil)...)
	}

	// field ExactDeviceRequest.Count has no validation
	// field ExactDeviceRequest.AdminAccess has no validation

	{ // field ExactDeviceRequest.Tolerations
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceToleration,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceToleration); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ExactDeviceRequest) []DeviceToleration {
				return oldObj.Tolerations
			})
		errs = append(errs, fn(fldPath.Child("tolerations"), obj.Tolerations, oldVal, oldObj != nil)...)
	}

	// field ExactDeviceRequest.Capacity has no validation

	{ // field ExactDeviceRequest.DerivedAttributes
		fn := func(
			fldPath *field.Path,
			obj, oldObj []DeviceDerivedAttribute,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 32).MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_DeviceDerivedAttribute); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ExactDeviceRequest) []DeviceDerivedAttribute {
				return oldObj.DerivedAttributes
			})
		errs = append(errs, fn(fldPath.Child("derivedAttributes"), obj.DerivedAttributes, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_NetworkDeviceData validates an instance of NetworkDeviceData according
// to declarative validation rules in the API schema.
func Validate_NetworkDeviceData(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *NetworkDeviceData) (errs field.ErrorList) {

	{ // field NetworkDeviceData.InterfaceName
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.MaxBytes(ctx, op, fldPath, obj, oldObj, 256).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NetworkDeviceData) *string {
				return &oldObj.InterfaceName
			})
		errs = append(errs, fn(fldPath.Child("interfaceName"), &obj.InterfaceName, oldVal, oldObj != nil)...)
	}

	{ // field NetworkDeviceData.IPs
		fn := func(
			fldPath *field.Path,
			obj, oldObj []string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 16).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NetworkDeviceData) []string {
				return oldObj.IPs
			})
		errs = append(errs, fn(fldPath.Child("ips"), obj.IPs, oldVal, oldObj != nil)...)
	}

	{ // field NetworkDeviceData.HardwareAddress
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.MaxBytes(ctx, op, fldPath, obj, oldObj, 128).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NetworkDeviceData) *string {
				return &oldObj.HardwareAddress
			})
		errs = append(errs, fn(fldPath.Child("hardwareAddress"), &obj.HardwareAddress, oldVal, oldObj != nil)...)
	}

	return errs
}

var unionMembershipFor_k8s_io_api_resource_v1_NodeAllocatableMapping_ = validate.NewUnionMembership(validate.NewUnionMember("capacityKey"), validate.NewUnionMember("deviceMultiplier"))

// Validate_NodeAllocatableMapping validates an instance of NodeAllocatableMapping according
// to declarative validation rules in the API schema.
func Validate_NodeAllocatableMapping(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *NodeAllocatableMapping) (errs field.ErrorList) {

	if e := validate.DependentRequired(ctx, op, fldPath, obj, oldObj, "capacityKey",
		func(obj *NodeAllocatableMapping) bool {
			if obj == nil {
				return false
			}
			return obj.CapacityKey != nil
		}, "capacityMultiplier",
		func(obj *NodeAllocatableMapping) bool {
			if obj == nil {
				return false
			}
			return obj.CapacityMultiplier != nil
		}).MarkAlpha(); len(e) != 0 {
		errs = append(errs, e...)
	}
	if e := validate.Union(ctx, op, fldPath, obj, oldObj, unionMembershipFor_k8s_io_api_resource_v1_NodeAllocatableMapping_,
		func(obj *NodeAllocatableMapping) bool {
			if obj == nil {
				return false
			}
			return obj.CapacityKey != nil
		},
		func(obj *NodeAllocatableMapping) bool {
			if obj == nil {
				return false
			}
			return obj.DeviceMultiplier != nil
		}); len(e) != 0 {
		errs = append(errs, e...)
	}
	if e := validate.DependentRequired(ctx, op, fldPath, obj, oldObj, "capacityMultiplier",
		func(obj *NodeAllocatableMapping) bool {
			if obj == nil {
				return false
			}
			return obj.CapacityMultiplier != nil
		}, "capacityKey",
		func(obj *NodeAllocatableMapping) bool {
			if obj == nil {
				return false
			}
			return obj.CapacityKey != nil
		}).MarkAlpha(); len(e) != 0 {
		errs = append(errs, e...)
	}

	{ // field NodeAllocatableMapping.CapacityKey
		fn := func(
			fldPath *field.Path,
			obj, oldObj *QualifiedName,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableMapping) *QualifiedName {
				return oldObj.CapacityKey
			})
		errs = append(errs, fn(fldPath.Child("capacityKey"), obj.CapacityKey, oldVal, oldObj != nil)...)
	}

	{ // field NodeAllocatableMapping.CapacityMultiplier
		fn := func(
			fldPath *field.Path,
			obj, oldObj *resource.Quantity,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableMapping) *resource.Quantity {
				return oldObj.CapacityMultiplier
			})
		errs = append(errs, fn(fldPath.Child("capacityMultiplier"), obj.CapacityMultiplier, oldVal, oldObj != nil)...)
	}

	{ // field NodeAllocatableMapping.DeviceMultiplier
		fn := func(
			fldPath *field.Path,
			obj, oldObj *resource.Quantity,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableMapping) *resource.Quantity {
				return oldObj.DeviceMultiplier
			})
		errs = append(errs, fn(fldPath.Child("deviceMultiplier"), obj.DeviceMultiplier, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_NodeAllocatableOverhead validates an instance of NodeAllocatableOverhead according
// to declarative validation rules in the API schema.
func Validate_NodeAllocatableOverhead(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *NodeAllocatableOverhead) (errs field.ErrorList) {

	{ // field NodeAllocatableOverhead.PerPod
		fn := func(
			fldPath *field.Path,
			obj, oldObj *resource.Quantity,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableOverhead) *resource.Quantity {
				return oldObj.PerPod
			})
		errs = append(errs, fn(fldPath.Child("perPod"), obj.PerPod, oldVal, oldObj != nil)...)
	}

	{ // field NodeAllocatableOverhead.PerContainer
		fn := func(
			fldPath *field.Path,
			obj, oldObj *resource.Quantity,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableOverhead) *resource.Quantity {
				return oldObj.PerContainer
			})
		errs = append(errs, fn(fldPath.Child("perContainer"), obj.PerContainer, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_NodeAllocatableResource validates an instance of NodeAllocatableResource according
// to declarative validation rules in the API schema.
func Validate_NodeAllocatableResource(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *NodeAllocatableResource) (errs field.ErrorList) {

	{ // field NodeAllocatableResource.Mapping
		fn := func(
			fldPath *field.Path,
			obj, oldObj *NodeAllocatableMapping,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_NodeAllocatableMapping(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableResource) *NodeAllocatableMapping {
				return oldObj.Mapping
			})
		errs = append(errs, fn(fldPath.Child("mapping"), obj.Mapping, oldVal, oldObj != nil)...)
	}

	{ // field NodeAllocatableResource.Overhead
		fn := func(
			fldPath *field.Path,
			obj, oldObj *NodeAllocatableOverhead,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_NodeAllocatableOverhead(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *NodeAllocatableResource) *NodeAllocatableOverhead {
				return oldObj.Overhead
			})
		errs = append(errs, fn(fldPath.Child("overhead"), obj.Overhead, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_OpaqueDeviceConfiguration validates an instance of OpaqueDeviceConfiguration according
// to declarative validation rules in the API schema.
func Validate_OpaqueDeviceConfiguration(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *OpaqueDeviceConfiguration) (errs field.ErrorList) {

	{ // field OpaqueDeviceConfiguration.Driver
		fn := func(
			fldPath *field.Path,
			obj, oldObj *string,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.RequiredValue(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.LongNameCaseless(ctx, op, fldPath, obj, oldObj).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			if e := validate.MaxLength(ctx, op, fldPath, obj, oldObj, 63).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *OpaqueDeviceConfiguration) *string {
				return &oldObj.Driver
			})
		errs = append(errs, fn(fldPath.Child("driver"), &obj.Driver, oldVal, oldObj != nil)...)
	}

	// field OpaqueDeviceConfiguration.Parameters has no validation
	return errs
}

// Validate_ResourceClaimSpec validates an instance of ResourceClaimSpec according
// to declarative validation rules in the API schema.
func Validate_ResourceClaimSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ResourceClaimSpec) (errs field.ErrorList) {

	{ // field ResourceClaimSpec.Devices
		fn := func(
			fldPath *field.Path,
			obj, oldObj *DeviceClaim,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_DeviceClaim(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceClaimSpec) *DeviceClaim {
				return &oldObj.Devices
			})
		errs = append(errs, fn(fldPath.Child("devices"), &obj.Devices, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_ResourceClaimStatus validates an instance of ResourceClaimStatus according
// to declarative validation rules in the API schema.
func Validate_ResourceClaimStatus(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ResourceClaimStatus) (errs field.ErrorList) {

	{ // field ResourceClaimStatus.Allocation
		fn := func(
			fldPath *field.Path,
			obj, oldObj *AllocationResult,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalPointer(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.UpdatePointer(ctx, op, fldPath, obj, oldObj, validate.NoModify).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// call the type's validation function
			errs = append(errs, Validate_AllocationResult(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceClaimStatus) *AllocationResult {
				return oldObj.Allocation
			})
		errs = append(errs, fn(fldPath.Child("allocation"), obj.Allocation, oldVal, oldObj != nil)...)
	}

	{ // field ResourceClaimStatus.ReservedFor
		fn := func(
			fldPath *field.Path,
			obj, oldObj []ResourceClaimConsumerReference,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 256).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *ResourceClaimConsumerReference, b *ResourceClaimConsumerReference) bool { return a.UID == b.UID }).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceClaimStatus) []ResourceClaimConsumerReference {
				return oldObj.ReservedFor
			})
		errs = append(errs, fn(fldPath.Child("reservedFor"), obj.ReservedFor, oldVal, oldObj != nil)...)
	}

	{ // field ResourceClaimStatus.Devices
		fn := func(
			fldPath *field.Path,
			obj, oldObj []AllocatedDeviceStatus,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *AllocatedDeviceStatus, b *AllocatedDeviceStatus) bool {
					return a.Driver == b.Driver && a.Device == b.Device && a.Pool == b.Pool && ((a.ShareID == nil && b.ShareID == nil) || (a.ShareID != nil && b.ShareID != nil && *a.ShareID == *b.ShareID))
				}).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *AllocatedDeviceStatus, b *AllocatedDeviceStatus) bool {
					return a.Driver == b.Driver && a.Device == b.Device && a.Pool == b.Pool && ((a.ShareID == nil && b.ShareID == nil) || (a.ShareID != nil && b.ShareID != nil && *a.ShareID == *b.ShareID))
				}, validate.SemanticDeepEqual, Validate_AllocatedDeviceStatus); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceClaimStatus) []AllocatedDeviceStatus {
				return oldObj.Devices
			})
		errs = append(errs, fn(fldPath.Child("devices"), obj.Devices, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_ResourceClaimTemplateSpec validates an instance of ResourceClaimTemplateSpec according
// to declarative validation rules in the API schema.
func Validate_ResourceClaimTemplateSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ResourceClaimTemplateSpec) (errs field.ErrorList) {

	// field ResourceClaimTemplateSpec.ObjectMeta has no validation

	{ // field ResourceClaimTemplateSpec.Spec
		fn := func(
			fldPath *field.Path,
			obj, oldObj *ResourceClaimSpec,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call the type's validation function
			errs = append(errs, Validate_ResourceClaimSpec(ctx, op, fldPath, obj, oldObj)...)
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceClaimTemplateSpec) *ResourceClaimSpec {
				return &oldObj.Spec
			})
		errs = append(errs, fn(fldPath.Child("spec"), &obj.Spec, oldVal, oldObj != nil)...)
	}

	return errs
}

// Validate_ResourceSliceSpec validates an instance of ResourceSliceSpec according
// to declarative validation rules in the API schema.
func Validate_ResourceSliceSpec(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *ResourceSliceSpec) (errs field.ErrorList) {

	// field ResourceSliceSpec.Driver has no validation
	// field ResourceSliceSpec.Pool has no validation
	// field ResourceSliceSpec.NodeName has no validation
	// field ResourceSliceSpec.NodeSelector has no validation
	// field ResourceSliceSpec.AllNodes has no validation

	{ // field ResourceSliceSpec.Devices
		fn := func(
			fldPath *field.Path,
			obj, oldObj []Device,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, nil, nil, Validate_Device); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceSliceSpec) []Device {
				return oldObj.Devices
			})
		errs = append(errs, fn(fldPath.Child("devices"), obj.Devices, oldVal, oldObj != nil)...)
	}

	// field ResourceSliceSpec.PerDeviceNodeSelection has no validation

	{ // field ResourceSliceSpec.SharedCounters
		fn := func(
			fldPath *field.Path,
			obj, oldObj []CounterSet,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.MaxItems(ctx, op, fldPath, obj, oldObj, 8).MarkBeta().MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with map semantics require unique keys
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj,
				func(a *CounterSet, b *CounterSet) bool { return a.Name == b.Name }).MarkBeta(); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj,
				func(a *CounterSet, b *CounterSet) bool { return a.Name == b.Name }, validate.SemanticDeepEqual, Validate_CounterSet); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceSliceSpec) []CounterSet {
				return oldObj.SharedCounters
			})
		errs = append(errs, fn(fldPath.Child("sharedCounters"), obj.SharedCounters, oldVal, oldObj != nil)...)
	}

	{ // field ResourceSliceSpec.PartitionTypeAttribute
		fn := func(
			fldPath *field.Path,
			obj, oldObj *FullyQualifiedName,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if obj == oldObj || (obj != nil && oldObj != nil && *obj == *oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.IfOption(ctx, op, fldPath, obj, oldObj, "DRAPartitionableDevicesType", false, validate.ForbiddenPointer).MarkShortCircuit(); len(e) != 0 {
				errs = append(errs, e...)
				earlyReturn = true
			}
			if e := validate.IfOption(ctx, op, fldPath, obj, oldObj, "DRAPartitionableDevicesType", false, validate.OptionalPointer).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if e := validate.IfOption(ctx, op, fldPath, obj, oldObj, "DRAPartitionableDevicesType", true, validate.OptionalPointer).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			if e := validate.IfOption(ctx, op, fldPath, obj, oldObj, "DRAPartitionableDevicesType", true, validate.ResourceFullyQualifiedName); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceSliceSpec) *FullyQualifiedName {
				return oldObj.PartitionTypeAttribute
			})
		errs = append(errs, fn(fldPath.Child("partitionTypeAttribute"), obj.PartitionTypeAttribute, oldVal, oldObj != nil)...)
	}

	{ // field ResourceSliceSpec.SkipNodeOperations
		fn := func(
			fldPath *field.Path,
			obj, oldObj []SkipNodeOperation,
			oldValueCorrelated bool) (errs field.ErrorList) {
			// don't revalidate unchanged data
			if oldValueCorrelated && op.Type == operation.Update {
				if equality.Semantic.DeepEqual(obj, oldObj) {
					return nil
				}
			}
			// call field-attached validations
			earlyReturn := false
			if e := validate.OptionalSlice(ctx, op, fldPath, obj, oldObj).MarkShortCircuit(); len(e) != 0 {
				earlyReturn = true
			}
			if earlyReturn {
				return // do not proceed
			}
			// lists with set semantics require unique values
			if e := validate.ValSliceUnique(ctx, op, fldPath, obj, oldObj, validate.DirectEqual); len(e) != 0 {
				errs = append(errs, e...)
			}
			// iterate the list and call the type's validation function
			if e := validate.EachValSliceVal(ctx, op, fldPath, obj, oldObj, validate.DirectEqual, nil, Validate_SkipNodeOperation); len(e) != 0 {
				errs = append(errs, e...)
			}
			return
		}
		oldVal := safe.Field(oldObj,
			func(oldObj *ResourceSliceSpec) []SkipNodeOperation {
				return oldObj.SkipNodeOperations
			})
		errs = append(errs, fn(fldPath.Child("skipNodeOperations"), obj.SkipNodeOperations, oldVal, oldObj != nil)...)
	}

	return errs
}

var symbolsForSkipNodeOperation = sets.New(SkipNodeOperationAll, SkipNodeOperationNodePrepareResources, SkipNodeOperationNodeUnprepareResources)

// Validate_SkipNodeOperation validates an instance of SkipNodeOperation according
// to declarative validation rules in the API schema.
func Validate_SkipNodeOperation(
	ctx context.Context, op operation.Operation, fldPath *field.Path,
	obj, oldObj *SkipNodeOperation) (errs field.ErrorList) {

	if e := validate.Enum(ctx, op, fldPath, obj, oldObj, symbolsForSkipNodeOperation, nil); len(e) != 0 {
		errs = append(errs, e...)
	}

	return errs
}
