| 1 |
//go:build !ignore_autogenerated |
| 2 |
// +build !ignore_autogenerated |
| 3 |
|
| 4 |
/* |
| 5 |
Copyright The Kubernetes Authors. |
| 6 |
|
| 7 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 |
you may not use this file except in compliance with the License. |
| 9 |
You may obtain a copy of the License at |
| 10 |
|
| 11 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 12 |
|
| 13 |
Unless required by applicable law or agreed to in writing, software |
| 14 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 15 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 |
See the License for the specific language governing permissions and |
| 17 |
limitations under the License. |
| 18 |
*/ |
| 19 |
|
| 20 |
// Code generated by defaulter-gen. DO NOT EDIT. |
| 21 |
|
| 22 |
package wholepkg |
| 23 |
|
| 24 |
import ( |
| 25 |
runtime "k8s.io/apimachinery/pkg/runtime" |
| 26 |
) |
| 27 |
|
| 28 |
// RegisterDefaults adds defaulters functions to the given scheme. |
| 29 |
// Public to allow building arbitrary schemes. |
| 30 |
// All generated defaulters are covering - they call all nested defaulters. |
| 31 |
func RegisterDefaults(scheme *runtime.Scheme) error { |
| 32 |
scheme.AddTypeDefaultingFunc(&Struct_Everything{}, func(obj interface{}) { SetObjectDefaults_Struct_Everything(obj.(*Struct_Everything)) }) |
| 33 |
scheme.AddTypeDefaultingFunc(&Struct_Pointer{}, func(obj interface{}) { SetObjectDefaults_Struct_Pointer(obj.(*Struct_Pointer)) }) |
| 34 |
scheme.AddTypeDefaultingFunc(&Struct_Primitives{}, func(obj interface{}) { SetObjectDefaults_Struct_Primitives(obj.(*Struct_Primitives)) }) |
| 35 |
scheme.AddTypeDefaultingFunc(&Struct_Slices{}, func(obj interface{}) { SetObjectDefaults_Struct_Slices(obj.(*Struct_Slices)) }) |
| 36 |
scheme.AddTypeDefaultingFunc(&Struct_Struct_Primitives{}, func(obj interface{}) { SetObjectDefaults_Struct_Struct_Primitives(obj.(*Struct_Struct_Primitives)) }) |
| 37 |
return nil |
| 38 |
} |
| 39 |
|
| 40 |
func SetObjectDefaults_Struct_Everything(in *Struct_Everything) { |
| 41 |
SetObjectDefaults_Struct_Pointer(&in.PointerStructField) |
| 42 |
SetObjectDefaults_Struct_Slices(&in.SlicesStructField) |
| 43 |
} |
| 44 |
|
| 45 |
func SetObjectDefaults_Struct_Pointer(in *Struct_Pointer) { |
| 46 |
SetObjectDefaults_Struct_Primitives(&in.PointerStructPrimitivesField) |
| 47 |
if in.PointerPointerStructPrimitivesField != nil { |
| 48 |
SetObjectDefaults_Struct_Primitives(in.PointerPointerStructPrimitivesField) |
| 49 |
} |
| 50 |
SetObjectDefaults_Struct_Struct_Primitives(&in.PointerStructStructPrimitives) |
| 51 |
if in.PointerPointerStructStructPrimitives != nil { |
| 52 |
SetObjectDefaults_Struct_Struct_Primitives(in.PointerPointerStructStructPrimitives) |
| 53 |
} |
| 54 |
} |
| 55 |
|
| 56 |
func SetObjectDefaults_Struct_Primitives(in *Struct_Primitives) { |
| 57 |
SetDefaults_Struct_Primitives(in) |
| 58 |
} |
| 59 |
|
| 60 |
func SetObjectDefaults_Struct_Slices(in *Struct_Slices) { |
| 61 |
for i := range in.SliceStructPrimitivesField { |
| 62 |
a := &in.SliceStructPrimitivesField[i] |
| 63 |
SetObjectDefaults_Struct_Primitives(a) |
| 64 |
} |
| 65 |
for i := range in.SlicePointerStructPrimitivesField { |
| 66 |
a := in.SlicePointerStructPrimitivesField[i] |
| 67 |
if a != nil { |
| 68 |
SetObjectDefaults_Struct_Primitives(a) |
| 69 |
} |
| 70 |
} |
| 71 |
for i := range in.SliceStructStructPrimitives { |
| 72 |
a := &in.SliceStructStructPrimitives[i] |
| 73 |
SetObjectDefaults_Struct_Struct_Primitives(a) |
| 74 |
} |
| 75 |
for i := range in.SlicePointerStructStructPrimitives { |
| 76 |
a := in.SlicePointerStructStructPrimitives[i] |
| 77 |
if a != nil { |
| 78 |
SetObjectDefaults_Struct_Struct_Primitives(a) |
| 79 |
} |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
func SetObjectDefaults_Struct_Struct_Primitives(in *Struct_Struct_Primitives) { |
| 84 |
SetObjectDefaults_Struct_Primitives(&in.StructField) |
| 85 |
} |