Debian Codegraph @

examples/defaulter-gen/output_tests/slices/fake_deepcopy_conversion.go

raw
1 /*
2 Copyright 2023 The Kubernetes Authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17 package slices
18
19 import (
20 "k8s.io/apimachinery/pkg/runtime"
21 "k8s.io/apimachinery/pkg/runtime/schema"
22 )
23
24 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
25 func (in *Ttest) DeepCopyInto(out *Ttest) {
26 *out = *in
27 out.TypeMeta = in.TypeMeta
28 if in.BoolField != nil {
29 in, out := &in.BoolField, &out.BoolField
30 *out = new(bool)
31 **out = **in
32 }
33 return
34 }
35
36 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ttest.
37 func (in *Ttest) DeepCopy() *Ttest {
38 if in == nil {
39 return nil
40 }
41 out := new(Ttest)
42 in.DeepCopyInto(out)
43 return out
44 }
45
46 func (in *Ttest) DeepCopyObject() runtime.Object {
47 if c := in.DeepCopy(); c != nil {
48 return c
49 }
50 return nil
51 }
52
53 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
54 func (in *TtestList) DeepCopyInto(out *TtestList) {
55 *out = *in
56 out.TypeMeta = in.TypeMeta
57 if in.Items != nil {
58 in, out := &in.Items, &out.Items
59 *out = make([]Ttest, len(*in))
60 for i := range *in {
61 (*in)[i].DeepCopyInto(&(*out)[i])
62 }
63 }
64 return
65 }
66
67 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TtestList.
68 func (in *TtestList) DeepCopy() *TtestList {
69 if in == nil {
70 return nil
71 }
72 out := new(TtestList)
73 in.DeepCopyInto(out)
74 return out
75 }
76
77 func (in *TtestList) DeepCopyObject() runtime.Object {
78 if c := in.DeepCopy(); c != nil {
79 return c
80 }
81 return nil
82 }
83
84 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
85 func (in *TtestPointerList) DeepCopyInto(out *TtestPointerList) {
86 *out = *in
87 out.TypeMeta = in.TypeMeta
88 if in.Items != nil {
89 in, out := &in.Items, &out.Items
90 *out = make([]*Ttest, len(*in))
91 for i := range *in {
92 if (*in)[i] != nil {
93 in, out := &(*in)[i], &(*out)[i]
94 *out = new(Ttest)
95 (*in).DeepCopyInto(*out)
96 }
97 }
98 }
99 return
100 }
101
102 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TtestPointerList.
103 func (in *TtestPointerList) DeepCopy() *TtestPointerList {
104 if in == nil {
105 return nil
106 }
107 out := new(TtestPointerList)
108 in.DeepCopyInto(out)
109 return out
110 }
111
112 func (in *TtestPointerList) DeepCopyObject() runtime.Object {
113 if c := in.DeepCopy(); c != nil {
114 return c
115 }
116 return nil
117 }
118
119 func (obj *Ttest) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
120 func (obj *TtestList) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
121 func (obj *TtestPointerList) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }