// +build !ignore_autogenerated_openshift

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

package v1

import (
	v1 "github.com/openshift/api/route/v1"
	runtime "k8s.io/apimachinery/pkg/runtime"
)

// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
	scheme.AddTypeDefaultingFunc(&v1.Route{}, func(obj interface{}) { SetObjectDefaults_Route(obj.(*v1.Route)) })
	scheme.AddTypeDefaultingFunc(&v1.RouteList{}, func(obj interface{}) { SetObjectDefaults_RouteList(obj.(*v1.RouteList)) })
	return nil
}

func SetObjectDefaults_Route(in *v1.Route) {
	SetDefaults_RouteSpec(&in.Spec)
	SetDefaults_RouteTargetReference(&in.Spec.To)
	for i := range in.Spec.AlternateBackends {
		a := &in.Spec.AlternateBackends[i]
		SetDefaults_RouteTargetReference(a)
	}
	if in.Spec.TLS != nil {
		SetDefaults_TLSConfig(in.Spec.TLS)
	}
	for i := range in.Status.Ingress {
		a := &in.Status.Ingress[i]
		SetDefaults_RouteIngress(a)
	}
}

func SetObjectDefaults_RouteList(in *v1.RouteList) {
	for i := range in.Items {
		a := &in.Items[i]
		SetObjectDefaults_Route(a)
	}
}
