2 Copyright 2017 The Kubernetes Authors.
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
8 http://www.apache.org/licenses/LICENSE-2.0
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.
19 // TODO: Update this after a tag is created for interface fields in DeepCopy
20 func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
24 out := new(JSONSchemaProps)
28 in, out := &in.Ref, &out.Ref
37 if in.Maximum != nil {
38 in, out := &in.Maximum, &out.Maximum
47 if in.Minimum != nil {
48 in, out := &in.Minimum, &out.Minimum
57 if in.MaxLength != nil {
58 in, out := &in.MaxLength, &out.MaxLength
67 if in.MinLength != nil {
68 in, out := &in.MinLength, &out.MinLength
76 if in.MaxItems != nil {
77 in, out := &in.MaxItems, &out.MaxItems
86 if in.MinItems != nil {
87 in, out := &in.MinItems, &out.MinItems
96 if in.MultipleOf != nil {
97 in, out := &in.MultipleOf, &out.MultipleOf
106 if in.MaxProperties != nil {
107 in, out := &in.MaxProperties, &out.MaxProperties
116 if in.MinProperties != nil {
117 in, out := &in.MinProperties, &out.MinProperties
126 if in.Required != nil {
127 in, out := &in.Required, &out.Required
128 *out = make([]string, len(*in))
133 in, out := &in.Items, &out.Items
137 *out = new(JSONSchemaPropsOrArray)
138 (*in).DeepCopyInto(*out)
143 in, out := &in.AllOf, &out.AllOf
144 *out = make([]JSONSchemaProps, len(*in))
146 (*in)[i].DeepCopyInto(&(*out)[i])
151 in, out := &in.OneOf, &out.OneOf
152 *out = make([]JSONSchemaProps, len(*in))
154 (*in)[i].DeepCopyInto(&(*out)[i])
158 in, out := &in.AnyOf, &out.AnyOf
159 *out = make([]JSONSchemaProps, len(*in))
161 (*in)[i].DeepCopyInto(&(*out)[i])
166 in, out := &in.Not, &out.Not
170 *out = new(JSONSchemaProps)
171 (*in).DeepCopyInto(*out)
175 if in.Properties != nil {
176 in, out := &in.Properties, &out.Properties
177 *out = make(map[string]JSONSchemaProps, len(*in))
178 for key, val := range *in {
179 (*out)[key] = *val.DeepCopy()
183 if in.AdditionalProperties != nil {
184 in, out := &in.AdditionalProperties, &out.AdditionalProperties
188 *out = new(JSONSchemaPropsOrBool)
189 (*in).DeepCopyInto(*out)
193 if in.PatternProperties != nil {
194 in, out := &in.PatternProperties, &out.PatternProperties
195 *out = make(map[string]JSONSchemaProps, len(*in))
196 for key, val := range *in {
197 (*out)[key] = *val.DeepCopy()
201 if in.Dependencies != nil {
202 in, out := &in.Dependencies, &out.Dependencies
203 *out = make(JSONSchemaDependencies, len(*in))
204 for key, val := range *in {
205 (*out)[key] = *val.DeepCopy()
209 if in.AdditionalItems != nil {
210 in, out := &in.AdditionalItems, &out.AdditionalItems
214 *out = new(JSONSchemaPropsOrBool)
215 (*in).DeepCopyInto(*out)
219 if in.Definitions != nil {
220 in, out := &in.Definitions, &out.Definitions
221 *out = make(JSONSchemaDefinitions, len(*in))
222 for key, val := range *in {
223 (*out)[key] = *val.DeepCopy()
227 if in.ExternalDocs != nil {
228 in, out := &in.ExternalDocs, &out.ExternalDocs
232 *out = new(ExternalDocumentation)
233 (*in).DeepCopyInto(*out)