1 // +build !ignore_autogenerated
4 Copyright The Kubernetes Authors.
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
10 http://www.apache.org/licenses/LICENSE-2.0
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.
19 // Code generated by conversion-gen. DO NOT EDIT.
21 package internalversion
26 v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27 conversion "k8s.io/apimachinery/pkg/conversion"
28 runtime "k8s.io/apimachinery/pkg/runtime"
32 localSchemeBuilder.Register(RegisterConversions)
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)
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)
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)
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)
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)
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)
71 func autoConvert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
72 out.ListMeta = in.ListMeta
74 in, out := &in.Items, &out.Items
75 *out = make([]runtime.RawExtension, len(*in))
77 if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&(*in)[i], &(*out)[i], s); err != nil {
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)
92 func autoConvert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
93 out.ListMeta = in.ListMeta
95 in, out := &in.Items, &out.Items
96 *out = make([]runtime.Object, len(*in))
98 if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
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)
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 {
117 if err := v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
120 out.IncludeUninitialized = in.IncludeUninitialized
122 out.ResourceVersion = in.ResourceVersion
123 out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
125 out.Continue = in.Continue
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 {
133 if err := v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
136 out.IncludeUninitialized = in.IncludeUninitialized
138 out.ResourceVersion = in.ResourceVersion
139 out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
141 out.Continue = in.Continue