1// +build !ignore_autogenerated 2 3/* 4Copyright The Kubernetes Authors. 5 6Licensed under the Apache License, Version 2.0 (the "License"); 7you may not use this file except in compliance with the License. 8You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12Unless required by applicable law or agreed to in writing, software 13distributed under the License is distributed on an "AS IS" BASIS, 14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15See the License for the specific language governing permissions and 16limitations under the License. 17*/ 18 19// Code generated by conversion-gen. DO NOT EDIT. 20 21package v1beta1 22 23import ( 24 unsafe "unsafe" 25 26 v1beta1 "k8s.io/api/authentication/v1beta1" 27 conversion "k8s.io/apimachinery/pkg/conversion" 28 runtime "k8s.io/apimachinery/pkg/runtime" 29 authentication "k8s.io/kubernetes/pkg/apis/authentication" 30) 31 32func init() { 33 localSchemeBuilder.Register(RegisterConversions) 34} 35 36// RegisterConversions adds conversion functions to the given scheme. 37// Public to allow building arbitrary schemes. 38func RegisterConversions(s *runtime.Scheme) error { 39 if err := s.AddGeneratedConversionFunc((*v1beta1.TokenReview)(nil), (*authentication.TokenReview)(nil), func(a, b interface{}, scope conversion.Scope) error { 40 return Convert_v1beta1_TokenReview_To_authentication_TokenReview(a.(*v1beta1.TokenReview), b.(*authentication.TokenReview), scope) 41 }); err != nil { 42 return err 43 } 44 if err := s.AddGeneratedConversionFunc((*authentication.TokenReview)(nil), (*v1beta1.TokenReview)(nil), func(a, b interface{}, scope conversion.Scope) error { 45 return Convert_authentication_TokenReview_To_v1beta1_TokenReview(a.(*authentication.TokenReview), b.(*v1beta1.TokenReview), scope) 46 }); err != nil { 47 return err 48 } 49 if err := s.AddGeneratedConversionFunc((*v1beta1.TokenReviewSpec)(nil), (*authentication.TokenReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { 50 return Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(a.(*v1beta1.TokenReviewSpec), b.(*authentication.TokenReviewSpec), scope) 51 }); err != nil { 52 return err 53 } 54 if err := s.AddGeneratedConversionFunc((*authentication.TokenReviewSpec)(nil), (*v1beta1.TokenReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { 55 return Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(a.(*authentication.TokenReviewSpec), b.(*v1beta1.TokenReviewSpec), scope) 56 }); err != nil { 57 return err 58 } 59 if err := s.AddGeneratedConversionFunc((*v1beta1.TokenReviewStatus)(nil), (*authentication.TokenReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { 60 return Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(a.(*v1beta1.TokenReviewStatus), b.(*authentication.TokenReviewStatus), scope) 61 }); err != nil { 62 return err 63 } 64 if err := s.AddGeneratedConversionFunc((*authentication.TokenReviewStatus)(nil), (*v1beta1.TokenReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { 65 return Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(a.(*authentication.TokenReviewStatus), b.(*v1beta1.TokenReviewStatus), scope) 66 }); err != nil { 67 return err 68 } 69 if err := s.AddGeneratedConversionFunc((*v1beta1.UserInfo)(nil), (*authentication.UserInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { 70 return Convert_v1beta1_UserInfo_To_authentication_UserInfo(a.(*v1beta1.UserInfo), b.(*authentication.UserInfo), scope) 71 }); err != nil { 72 return err 73 } 74 if err := s.AddGeneratedConversionFunc((*authentication.UserInfo)(nil), (*v1beta1.UserInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { 75 return Convert_authentication_UserInfo_To_v1beta1_UserInfo(a.(*authentication.UserInfo), b.(*v1beta1.UserInfo), scope) 76 }); err != nil { 77 return err 78 } 79 return nil 80} 81 82func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *v1beta1.TokenReview, out *authentication.TokenReview, s conversion.Scope) error { 83 out.ObjectMeta = in.ObjectMeta 84 if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { 85 return err 86 } 87 if err := Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil { 88 return err 89 } 90 return nil 91} 92 93// Convert_v1beta1_TokenReview_To_authentication_TokenReview is an autogenerated conversion function. 94func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *v1beta1.TokenReview, out *authentication.TokenReview, s conversion.Scope) error { 95 return autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in, out, s) 96} 97 98func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *v1beta1.TokenReview, s conversion.Scope) error { 99 out.ObjectMeta = in.ObjectMeta 100 if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { 101 return err 102 } 103 if err := Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil { 104 return err 105 } 106 return nil 107} 108 109// Convert_authentication_TokenReview_To_v1beta1_TokenReview is an autogenerated conversion function. 110func Convert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *v1beta1.TokenReview, s conversion.Scope) error { 111 return autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in, out, s) 112} 113 114func autoConvert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *v1beta1.TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error { 115 out.Token = in.Token 116 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 117 return nil 118} 119 120// Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec is an autogenerated conversion function. 121func Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *v1beta1.TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error { 122 return autoConvert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s) 123} 124 125func autoConvert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *v1beta1.TokenReviewSpec, s conversion.Scope) error { 126 out.Token = in.Token 127 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 128 return nil 129} 130 131// Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec is an autogenerated conversion function. 132func Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *v1beta1.TokenReviewSpec, s conversion.Scope) error { 133 return autoConvert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in, out, s) 134} 135 136func autoConvert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *v1beta1.TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error { 137 out.Authenticated = in.Authenticated 138 if err := Convert_v1beta1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil { 139 return err 140 } 141 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 142 out.Error = in.Error 143 return nil 144} 145 146// Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus is an autogenerated conversion function. 147func Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *v1beta1.TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error { 148 return autoConvert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s) 149} 150 151func autoConvert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *v1beta1.TokenReviewStatus, s conversion.Scope) error { 152 out.Authenticated = in.Authenticated 153 if err := Convert_authentication_UserInfo_To_v1beta1_UserInfo(&in.User, &out.User, s); err != nil { 154 return err 155 } 156 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 157 out.Error = in.Error 158 return nil 159} 160 161// Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus is an autogenerated conversion function. 162func Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *v1beta1.TokenReviewStatus, s conversion.Scope) error { 163 return autoConvert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in, out, s) 164} 165 166func autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in *v1beta1.UserInfo, out *authentication.UserInfo, s conversion.Scope) error { 167 out.Username = in.Username 168 out.UID = in.UID 169 out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) 170 out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra)) 171 return nil 172} 173 174// Convert_v1beta1_UserInfo_To_authentication_UserInfo is an autogenerated conversion function. 175func Convert_v1beta1_UserInfo_To_authentication_UserInfo(in *v1beta1.UserInfo, out *authentication.UserInfo, s conversion.Scope) error { 176 return autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in, out, s) 177} 178 179func autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *v1beta1.UserInfo, s conversion.Scope) error { 180 out.Username = in.Username 181 out.UID = in.UID 182 out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) 183 out.Extra = *(*map[string]v1beta1.ExtraValue)(unsafe.Pointer(&in.Extra)) 184 return nil 185} 186 187// Convert_authentication_UserInfo_To_v1beta1_UserInfo is an autogenerated conversion function. 188func Convert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *v1beta1.UserInfo, s conversion.Scope) error { 189 return autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in, out, s) 190} 191