Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / vendor / k8s.io / apimachinery / pkg / apis / meta / internalversion / zz_generated.conversion.go
1 // +build !ignore_autogenerated
2
3 /*
4 Copyright The Kubernetes Authors.
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10     http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 */
18
19 // Code generated by conversion-gen. DO NOT EDIT.
20
21 package internalversion
22
23 import (
24         unsafe "unsafe"
25
26         v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27         conversion "k8s.io/apimachinery/pkg/conversion"
28         runtime "k8s.io/apimachinery/pkg/runtime"
29 )
30
31 func init() {
32         localSchemeBuilder.Register(RegisterConversions)
33 }
34
35 // RegisterConversions adds conversion functions to the given scheme.
36 // Public to allow building arbitrary schemes.
37 func RegisterConversions(s *runtime.Scheme) error {
38         if err := s.AddGeneratedConversionFunc((*List)(nil), (*v1.List)(nil), func(a, b interface{}, scope conversion.Scope) error {
39                 return Convert_internalversion_List_To_v1_List(a.(*List), b.(*v1.List), scope)
40         }); err != nil {
41                 return err
42         }
43         if err := s.AddGeneratedConversionFunc((*v1.List)(nil), (*List)(nil), func(a, b interface{}, scope conversion.Scope) error {
44                 return Convert_v1_List_To_internalversion_List(a.(*v1.List), b.(*List), scope)
45         }); err != nil {
46                 return err
47         }
48         if err := s.AddGeneratedConversionFunc((*ListOptions)(nil), (*v1.ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
49                 return Convert_internalversion_ListOptions_To_v1_ListOptions(a.(*ListOptions), b.(*v1.ListOptions), scope)
50         }); err != nil {
51                 return err
52         }
53         if err := s.AddGeneratedConversionFunc((*v1.ListOptions)(nil), (*ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
54                 return Convert_v1_ListOptions_To_internalversion_ListOptions(a.(*v1.ListOptions), b.(*ListOptions), scope)
55         }); err != nil {
56                 return err
57         }
58         if err := s.AddConversionFunc((*ListOptions)(nil), (*v1.ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
59                 return Convert_internalversion_ListOptions_To_v1_ListOptions(a.(*ListOptions), b.(*v1.ListOptions), scope)
60         }); err != nil {
61                 return err
62         }
63         if err := s.AddConversionFunc((*v1.ListOptions)(nil), (*ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
64                 return Convert_v1_ListOptions_To_internalversion_ListOptions(a.(*v1.ListOptions), b.(*ListOptions), scope)
65         }); err != nil {
66                 return err
67         }
68         return nil
69 }
70
71 func autoConvert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
72         out.ListMeta = in.ListMeta
73         if in.Items != nil {
74                 in, out := &in.Items, &out.Items
75                 *out = make([]runtime.RawExtension, len(*in))
76                 for i := range *in {
77                         if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&(*in)[i], &(*out)[i], s); err != nil {
78                                 return err
79                         }
80                 }
81         } else {
82                 out.Items = nil
83         }
84         return nil
85 }
86
87 // Convert_internalversion_List_To_v1_List is an autogenerated conversion function.
88 func Convert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
89         return autoConvert_internalversion_List_To_v1_List(in, out, s)
90 }
91
92 func autoConvert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
93         out.ListMeta = in.ListMeta
94         if in.Items != nil {
95                 in, out := &in.Items, &out.Items
96                 *out = make([]runtime.Object, len(*in))
97                 for i := range *in {
98                         if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
99                                 return err
100                         }
101                 }
102         } else {
103                 out.Items = nil
104         }
105         return nil
106 }
107
108 // Convert_v1_List_To_internalversion_List is an autogenerated conversion function.
109 func Convert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
110         return autoConvert_v1_List_To_internalversion_List(in, out, s)
111 }
112
113 func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *v1.ListOptions, s conversion.Scope) error {
114         if err := v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
115                 return err
116         }
117         if err := v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
118                 return err
119         }
120         out.IncludeUninitialized = in.IncludeUninitialized
121         out.Watch = in.Watch
122         out.ResourceVersion = in.ResourceVersion
123         out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
124         out.Limit = in.Limit
125         out.Continue = in.Continue
126         return nil
127 }
128
129 func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOptions, out *ListOptions, s conversion.Scope) error {
130         if err := v1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
131                 return err
132         }
133         if err := v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
134                 return err
135         }
136         out.IncludeUninitialized = in.IncludeUninitialized
137         out.Watch = in.Watch
138         out.ResourceVersion = in.ResourceVersion
139         out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
140         out.Limit = in.Limit
141         out.Continue = in.Continue
142         return nil
143 }