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 v1 22 23import ( 24 unsafe "unsafe" 25 26 v1 "k8s.io/api/authentication/v1" 27 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 28 conversion "k8s.io/apimachinery/pkg/conversion" 29 runtime "k8s.io/apimachinery/pkg/runtime" 30 types "k8s.io/apimachinery/pkg/types" 31 authentication "k8s.io/kubernetes/pkg/apis/authentication" 32) 33 34func init() { 35 localSchemeBuilder.Register(RegisterConversions) 36} 37 38// RegisterConversions adds conversion functions to the given scheme. 39// Public to allow building arbitrary schemes. 40func RegisterConversions(s *runtime.Scheme) error { 41 if err := s.AddGeneratedConversionFunc((*v1.BoundObjectReference)(nil), (*authentication.BoundObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { 42 return Convert_v1_BoundObjectReference_To_authentication_BoundObjectReference(a.(*v1.BoundObjectReference), b.(*authentication.BoundObjectReference), scope) 43 }); err != nil { 44 return err 45 } 46 if err := s.AddGeneratedConversionFunc((*authentication.BoundObjectReference)(nil), (*v1.BoundObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { 47 return Convert_authentication_BoundObjectReference_To_v1_BoundObjectReference(a.(*authentication.BoundObjectReference), b.(*v1.BoundObjectReference), scope) 48 }); err != nil { 49 return err 50 } 51 if err := s.AddGeneratedConversionFunc((*v1.TokenRequest)(nil), (*authentication.TokenRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { 52 return Convert_v1_TokenRequest_To_authentication_TokenRequest(a.(*v1.TokenRequest), b.(*authentication.TokenRequest), scope) 53 }); err != nil { 54 return err 55 } 56 if err := s.AddGeneratedConversionFunc((*authentication.TokenRequest)(nil), (*v1.TokenRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { 57 return Convert_authentication_TokenRequest_To_v1_TokenRequest(a.(*authentication.TokenRequest), b.(*v1.TokenRequest), scope) 58 }); err != nil { 59 return err 60 } 61 if err := s.AddGeneratedConversionFunc((*v1.TokenRequestSpec)(nil), (*authentication.TokenRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { 62 return Convert_v1_TokenRequestSpec_To_authentication_TokenRequestSpec(a.(*v1.TokenRequestSpec), b.(*authentication.TokenRequestSpec), scope) 63 }); err != nil { 64 return err 65 } 66 if err := s.AddGeneratedConversionFunc((*authentication.TokenRequestSpec)(nil), (*v1.TokenRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { 67 return Convert_authentication_TokenRequestSpec_To_v1_TokenRequestSpec(a.(*authentication.TokenRequestSpec), b.(*v1.TokenRequestSpec), scope) 68 }); err != nil { 69 return err 70 } 71 if err := s.AddGeneratedConversionFunc((*v1.TokenRequestStatus)(nil), (*authentication.TokenRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { 72 return Convert_v1_TokenRequestStatus_To_authentication_TokenRequestStatus(a.(*v1.TokenRequestStatus), b.(*authentication.TokenRequestStatus), scope) 73 }); err != nil { 74 return err 75 } 76 if err := s.AddGeneratedConversionFunc((*authentication.TokenRequestStatus)(nil), (*v1.TokenRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { 77 return Convert_authentication_TokenRequestStatus_To_v1_TokenRequestStatus(a.(*authentication.TokenRequestStatus), b.(*v1.TokenRequestStatus), scope) 78 }); err != nil { 79 return err 80 } 81 if err := s.AddGeneratedConversionFunc((*v1.TokenReview)(nil), (*authentication.TokenReview)(nil), func(a, b interface{}, scope conversion.Scope) error { 82 return Convert_v1_TokenReview_To_authentication_TokenReview(a.(*v1.TokenReview), b.(*authentication.TokenReview), scope) 83 }); err != nil { 84 return err 85 } 86 if err := s.AddGeneratedConversionFunc((*authentication.TokenReview)(nil), (*v1.TokenReview)(nil), func(a, b interface{}, scope conversion.Scope) error { 87 return Convert_authentication_TokenReview_To_v1_TokenReview(a.(*authentication.TokenReview), b.(*v1.TokenReview), scope) 88 }); err != nil { 89 return err 90 } 91 if err := s.AddGeneratedConversionFunc((*v1.TokenReviewSpec)(nil), (*authentication.TokenReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { 92 return Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(a.(*v1.TokenReviewSpec), b.(*authentication.TokenReviewSpec), scope) 93 }); err != nil { 94 return err 95 } 96 if err := s.AddGeneratedConversionFunc((*authentication.TokenReviewSpec)(nil), (*v1.TokenReviewSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { 97 return Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(a.(*authentication.TokenReviewSpec), b.(*v1.TokenReviewSpec), scope) 98 }); err != nil { 99 return err 100 } 101 if err := s.AddGeneratedConversionFunc((*v1.TokenReviewStatus)(nil), (*authentication.TokenReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { 102 return Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(a.(*v1.TokenReviewStatus), b.(*authentication.TokenReviewStatus), scope) 103 }); err != nil { 104 return err 105 } 106 if err := s.AddGeneratedConversionFunc((*authentication.TokenReviewStatus)(nil), (*v1.TokenReviewStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { 107 return Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(a.(*authentication.TokenReviewStatus), b.(*v1.TokenReviewStatus), scope) 108 }); err != nil { 109 return err 110 } 111 if err := s.AddConversionFunc((*authentication.UserInfo)(nil), (*v1.UserInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { 112 return Convert_authentication_UserInfo_To_v1_UserInfo(a.(*authentication.UserInfo), b.(*v1.UserInfo), scope) 113 }); err != nil { 114 return err 115 } 116 if err := s.AddConversionFunc((*v1.UserInfo)(nil), (*authentication.UserInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { 117 return Convert_v1_UserInfo_To_authentication_UserInfo(a.(*v1.UserInfo), b.(*authentication.UserInfo), scope) 118 }); err != nil { 119 return err 120 } 121 return nil 122} 123 124func autoConvert_v1_BoundObjectReference_To_authentication_BoundObjectReference(in *v1.BoundObjectReference, out *authentication.BoundObjectReference, s conversion.Scope) error { 125 out.Kind = in.Kind 126 out.APIVersion = in.APIVersion 127 out.Name = in.Name 128 out.UID = types.UID(in.UID) 129 return nil 130} 131 132// Convert_v1_BoundObjectReference_To_authentication_BoundObjectReference is an autogenerated conversion function. 133func Convert_v1_BoundObjectReference_To_authentication_BoundObjectReference(in *v1.BoundObjectReference, out *authentication.BoundObjectReference, s conversion.Scope) error { 134 return autoConvert_v1_BoundObjectReference_To_authentication_BoundObjectReference(in, out, s) 135} 136 137func autoConvert_authentication_BoundObjectReference_To_v1_BoundObjectReference(in *authentication.BoundObjectReference, out *v1.BoundObjectReference, s conversion.Scope) error { 138 out.Kind = in.Kind 139 out.APIVersion = in.APIVersion 140 out.Name = in.Name 141 out.UID = types.UID(in.UID) 142 return nil 143} 144 145// Convert_authentication_BoundObjectReference_To_v1_BoundObjectReference is an autogenerated conversion function. 146func Convert_authentication_BoundObjectReference_To_v1_BoundObjectReference(in *authentication.BoundObjectReference, out *v1.BoundObjectReference, s conversion.Scope) error { 147 return autoConvert_authentication_BoundObjectReference_To_v1_BoundObjectReference(in, out, s) 148} 149 150func autoConvert_v1_TokenRequest_To_authentication_TokenRequest(in *v1.TokenRequest, out *authentication.TokenRequest, s conversion.Scope) error { 151 out.ObjectMeta = in.ObjectMeta 152 if err := Convert_v1_TokenRequestSpec_To_authentication_TokenRequestSpec(&in.Spec, &out.Spec, s); err != nil { 153 return err 154 } 155 if err := Convert_v1_TokenRequestStatus_To_authentication_TokenRequestStatus(&in.Status, &out.Status, s); err != nil { 156 return err 157 } 158 return nil 159} 160 161// Convert_v1_TokenRequest_To_authentication_TokenRequest is an autogenerated conversion function. 162func Convert_v1_TokenRequest_To_authentication_TokenRequest(in *v1.TokenRequest, out *authentication.TokenRequest, s conversion.Scope) error { 163 return autoConvert_v1_TokenRequest_To_authentication_TokenRequest(in, out, s) 164} 165 166func autoConvert_authentication_TokenRequest_To_v1_TokenRequest(in *authentication.TokenRequest, out *v1.TokenRequest, s conversion.Scope) error { 167 out.ObjectMeta = in.ObjectMeta 168 if err := Convert_authentication_TokenRequestSpec_To_v1_TokenRequestSpec(&in.Spec, &out.Spec, s); err != nil { 169 return err 170 } 171 if err := Convert_authentication_TokenRequestStatus_To_v1_TokenRequestStatus(&in.Status, &out.Status, s); err != nil { 172 return err 173 } 174 return nil 175} 176 177// Convert_authentication_TokenRequest_To_v1_TokenRequest is an autogenerated conversion function. 178func Convert_authentication_TokenRequest_To_v1_TokenRequest(in *authentication.TokenRequest, out *v1.TokenRequest, s conversion.Scope) error { 179 return autoConvert_authentication_TokenRequest_To_v1_TokenRequest(in, out, s) 180} 181 182func autoConvert_v1_TokenRequestSpec_To_authentication_TokenRequestSpec(in *v1.TokenRequestSpec, out *authentication.TokenRequestSpec, s conversion.Scope) error { 183 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 184 if err := metav1.Convert_Pointer_int64_To_int64(&in.ExpirationSeconds, &out.ExpirationSeconds, s); err != nil { 185 return err 186 } 187 out.BoundObjectRef = (*authentication.BoundObjectReference)(unsafe.Pointer(in.BoundObjectRef)) 188 return nil 189} 190 191// Convert_v1_TokenRequestSpec_To_authentication_TokenRequestSpec is an autogenerated conversion function. 192func Convert_v1_TokenRequestSpec_To_authentication_TokenRequestSpec(in *v1.TokenRequestSpec, out *authentication.TokenRequestSpec, s conversion.Scope) error { 193 return autoConvert_v1_TokenRequestSpec_To_authentication_TokenRequestSpec(in, out, s) 194} 195 196func autoConvert_authentication_TokenRequestSpec_To_v1_TokenRequestSpec(in *authentication.TokenRequestSpec, out *v1.TokenRequestSpec, s conversion.Scope) error { 197 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 198 if err := metav1.Convert_int64_To_Pointer_int64(&in.ExpirationSeconds, &out.ExpirationSeconds, s); err != nil { 199 return err 200 } 201 out.BoundObjectRef = (*v1.BoundObjectReference)(unsafe.Pointer(in.BoundObjectRef)) 202 return nil 203} 204 205// Convert_authentication_TokenRequestSpec_To_v1_TokenRequestSpec is an autogenerated conversion function. 206func Convert_authentication_TokenRequestSpec_To_v1_TokenRequestSpec(in *authentication.TokenRequestSpec, out *v1.TokenRequestSpec, s conversion.Scope) error { 207 return autoConvert_authentication_TokenRequestSpec_To_v1_TokenRequestSpec(in, out, s) 208} 209 210func autoConvert_v1_TokenRequestStatus_To_authentication_TokenRequestStatus(in *v1.TokenRequestStatus, out *authentication.TokenRequestStatus, s conversion.Scope) error { 211 out.Token = in.Token 212 out.ExpirationTimestamp = in.ExpirationTimestamp 213 return nil 214} 215 216// Convert_v1_TokenRequestStatus_To_authentication_TokenRequestStatus is an autogenerated conversion function. 217func Convert_v1_TokenRequestStatus_To_authentication_TokenRequestStatus(in *v1.TokenRequestStatus, out *authentication.TokenRequestStatus, s conversion.Scope) error { 218 return autoConvert_v1_TokenRequestStatus_To_authentication_TokenRequestStatus(in, out, s) 219} 220 221func autoConvert_authentication_TokenRequestStatus_To_v1_TokenRequestStatus(in *authentication.TokenRequestStatus, out *v1.TokenRequestStatus, s conversion.Scope) error { 222 out.Token = in.Token 223 out.ExpirationTimestamp = in.ExpirationTimestamp 224 return nil 225} 226 227// Convert_authentication_TokenRequestStatus_To_v1_TokenRequestStatus is an autogenerated conversion function. 228func Convert_authentication_TokenRequestStatus_To_v1_TokenRequestStatus(in *authentication.TokenRequestStatus, out *v1.TokenRequestStatus, s conversion.Scope) error { 229 return autoConvert_authentication_TokenRequestStatus_To_v1_TokenRequestStatus(in, out, s) 230} 231 232func autoConvert_v1_TokenReview_To_authentication_TokenReview(in *v1.TokenReview, out *authentication.TokenReview, s conversion.Scope) error { 233 out.ObjectMeta = in.ObjectMeta 234 if err := Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { 235 return err 236 } 237 if err := Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil { 238 return err 239 } 240 return nil 241} 242 243// Convert_v1_TokenReview_To_authentication_TokenReview is an autogenerated conversion function. 244func Convert_v1_TokenReview_To_authentication_TokenReview(in *v1.TokenReview, out *authentication.TokenReview, s conversion.Scope) error { 245 return autoConvert_v1_TokenReview_To_authentication_TokenReview(in, out, s) 246} 247 248func autoConvert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *v1.TokenReview, s conversion.Scope) error { 249 out.ObjectMeta = in.ObjectMeta 250 if err := Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { 251 return err 252 } 253 if err := Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil { 254 return err 255 } 256 return nil 257} 258 259// Convert_authentication_TokenReview_To_v1_TokenReview is an autogenerated conversion function. 260func Convert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *v1.TokenReview, s conversion.Scope) error { 261 return autoConvert_authentication_TokenReview_To_v1_TokenReview(in, out, s) 262} 263 264func autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *v1.TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error { 265 out.Token = in.Token 266 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 267 return nil 268} 269 270// Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec is an autogenerated conversion function. 271func Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *v1.TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error { 272 return autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s) 273} 274 275func autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *v1.TokenReviewSpec, s conversion.Scope) error { 276 out.Token = in.Token 277 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 278 return nil 279} 280 281// Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec is an autogenerated conversion function. 282func Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *v1.TokenReviewSpec, s conversion.Scope) error { 283 return autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in, out, s) 284} 285 286func autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *v1.TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error { 287 out.Authenticated = in.Authenticated 288 if err := Convert_v1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil { 289 return err 290 } 291 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 292 out.Error = in.Error 293 return nil 294} 295 296// Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus is an autogenerated conversion function. 297func Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *v1.TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error { 298 return autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s) 299} 300 301func autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *v1.TokenReviewStatus, s conversion.Scope) error { 302 out.Authenticated = in.Authenticated 303 if err := Convert_authentication_UserInfo_To_v1_UserInfo(&in.User, &out.User, s); err != nil { 304 return err 305 } 306 out.Audiences = *(*[]string)(unsafe.Pointer(&in.Audiences)) 307 out.Error = in.Error 308 return nil 309} 310 311// Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus is an autogenerated conversion function. 312func Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *v1.TokenReviewStatus, s conversion.Scope) error { 313 return autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in, out, s) 314} 315 316func autoConvert_v1_UserInfo_To_authentication_UserInfo(in *v1.UserInfo, out *authentication.UserInfo, s conversion.Scope) error { 317 out.Username = in.Username 318 out.UID = in.UID 319 out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) 320 out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra)) 321 return nil 322} 323 324func autoConvert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *v1.UserInfo, s conversion.Scope) error { 325 out.Username = in.Username 326 out.UID = in.UID 327 out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) 328 out.Extra = *(*map[string]v1.ExtraValue)(unsafe.Pointer(&in.Extra)) 329 return nil 330} 331