Debian Codegraph @

examples/deepcopy-gen/output_tests/maps/zz_generated.go

raw
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 deepcopy-gen. DO NOT EDIT.
21
22 package maps
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 if in.Byte != nil {
28 in, out := &in.Byte, &out.Byte
29 *out = make(map[string]byte, len(*in))
30 for key, val := range *in {
31 (*out)[key] = val
32 }
33 }
34 if in.Int16 != nil {
35 in, out := &in.Int16, &out.Int16
36 *out = make(map[string]int16, len(*in))
37 for key, val := range *in {
38 (*out)[key] = val
39 }
40 }
41 if in.Int32 != nil {
42 in, out := &in.Int32, &out.Int32
43 *out = make(map[string]int32, len(*in))
44 for key, val := range *in {
45 (*out)[key] = val
46 }
47 }
48 if in.Int64 != nil {
49 in, out := &in.Int64, &out.Int64
50 *out = make(map[string]int64, len(*in))
51 for key, val := range *in {
52 (*out)[key] = val
53 }
54 }
55 if in.Uint8 != nil {
56 in, out := &in.Uint8, &out.Uint8
57 *out = make(map[string]byte, len(*in))
58 for key, val := range *in {
59 (*out)[key] = val
60 }
61 }
62 if in.Uint16 != nil {
63 in, out := &in.Uint16, &out.Uint16
64 *out = make(map[string]uint16, len(*in))
65 for key, val := range *in {
66 (*out)[key] = val
67 }
68 }
69 if in.Uint32 != nil {
70 in, out := &in.Uint32, &out.Uint32
71 *out = make(map[string]uint32, len(*in))
72 for key, val := range *in {
73 (*out)[key] = val
74 }
75 }
76 if in.Uint64 != nil {
77 in, out := &in.Uint64, &out.Uint64
78 *out = make(map[string]uint64, len(*in))
79 for key, val := range *in {
80 (*out)[key] = val
81 }
82 }
83 if in.Float32 != nil {
84 in, out := &in.Float32, &out.Float32
85 *out = make(map[string]float32, len(*in))
86 for key, val := range *in {
87 (*out)[key] = val
88 }
89 }
90 if in.Float64 != nil {
91 in, out := &in.Float64, &out.Float64
92 *out = make(map[string]float64, len(*in))
93 for key, val := range *in {
94 (*out)[key] = val
95 }
96 }
97 if in.String != nil {
98 in, out := &in.String, &out.String
99 *out = make(map[string]string, len(*in))
100 for key, val := range *in {
101 (*out)[key] = val
102 }
103 }
104 if in.StringPtr != nil {
105 in, out := &in.StringPtr, &out.StringPtr
106 *out = make(map[string]*string, len(*in))
107 for key, val := range *in {
108 var outVal *string
109 if val == nil {
110 (*out)[key] = nil
111 } else {
112 in, out := &val, &outVal
113 *out = new(string)
114 **out = **in
115 }
116 (*out)[key] = outVal
117 }
118 }
119 if in.StringPtrPtr != nil {
120 in, out := &in.StringPtrPtr, &out.StringPtrPtr
121 *out = make(map[string]**string, len(*in))
122 for key, val := range *in {
123 var outVal **string
124 if val == nil {
125 (*out)[key] = nil
126 } else {
127 in, out := &val, &outVal
128 *out = new(*string)
129 if **in != nil {
130 in, out := *in, *out
131 *out = new(string)
132 **out = **in
133 }
134 }
135 (*out)[key] = outVal
136 }
137 }
138 if in.Map != nil {
139 in, out := &in.Map, &out.Map
140 *out = make(map[string]map[string]string, len(*in))
141 for key, val := range *in {
142 var outVal map[string]string
143 if val == nil {
144 (*out)[key] = nil
145 } else {
146 in, out := &val, &outVal
147 *out = make(map[string]string, len(*in))
148 for key, val := range *in {
149 (*out)[key] = val
150 }
151 }
152 (*out)[key] = outVal
153 }
154 }
155 if in.MapPtr != nil {
156 in, out := &in.MapPtr, &out.MapPtr
157 *out = make(map[string]*map[string]string, len(*in))
158 for key, val := range *in {
159 var outVal *map[string]string
160 if val == nil {
161 (*out)[key] = nil
162 } else {
163 in, out := &val, &outVal
164 *out = new(map[string]string)
165 if **in != nil {
166 in, out := *in, *out
167 *out = make(map[string]string, len(*in))
168 for key, val := range *in {
169 (*out)[key] = val
170 }
171 }
172 }
173 (*out)[key] = outVal
174 }
175 }
176 if in.Slice != nil {
177 in, out := &in.Slice, &out.Slice
178 *out = make(map[string][]string, len(*in))
179 for key, val := range *in {
180 var outVal []string
181 if val == nil {
182 (*out)[key] = nil
183 } else {
184 in, out := &val, &outVal
185 *out = make([]string, len(*in))
186 copy(*out, *in)
187 }
188 (*out)[key] = outVal
189 }
190 }
191 if in.SlicePtr != nil {
192 in, out := &in.SlicePtr, &out.SlicePtr
193 *out = make(map[string]*[]string, len(*in))
194 for key, val := range *in {
195 var outVal *[]string
196 if val == nil {
197 (*out)[key] = nil
198 } else {
199 in, out := &val, &outVal
200 *out = new([]string)
201 if **in != nil {
202 in, out := *in, *out
203 *out = make([]string, len(*in))
204 copy(*out, *in)
205 }
206 }
207 (*out)[key] = outVal
208 }
209 }
210 if in.Struct != nil {
211 in, out := &in.Struct, &out.Struct
212 *out = make(map[string]Ttest, len(*in))
213 for key, val := range *in {
214 (*out)[key] = *val.DeepCopy()
215 }
216 }
217 if in.StructPtr != nil {
218 in, out := &in.StructPtr, &out.StructPtr
219 *out = make(map[string]*Ttest, len(*in))
220 for key, val := range *in {
221 var outVal *Ttest
222 if val == nil {
223 (*out)[key] = nil
224 } else {
225 in, out := &val, &outVal
226 *out = new(Ttest)
227 (*in).DeepCopyInto(*out)
228 }
229 (*out)[key] = outVal
230 }
231 }
232 return
233 }
234
235 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ttest.
236 func (in *Ttest) DeepCopy() *Ttest {
237 if in == nil {
238 return nil
239 }
240 out := new(Ttest)
241 in.DeepCopyInto(out)
242 return out
243 }