sigs.k8s.io/cluster-api@v1.7.1/internal/runtime/test/v1alpha1/zz_generated.conversion.go (about)

     1  //go:build !ignore_autogenerated_core_runtime
     2  // +build !ignore_autogenerated_core_runtime
     3  
     4  /*
     5  Copyright The Kubernetes Authors.
     6  
     7  Licensed under the Apache License, Version 2.0 (the "License");
     8  you may not use this file except in compliance with the License.
     9  You may obtain a copy of the License at
    10  
    11      http://www.apache.org/licenses/LICENSE-2.0
    12  
    13  Unless required by applicable law or agreed to in writing, software
    14  distributed under the License is distributed on an "AS IS" BASIS,
    15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  See the License for the specific language governing permissions and
    17  limitations under the License.
    18  */
    19  
    20  // Code generated by conversion-gen. DO NOT EDIT.
    21  
    22  package v1alpha1
    23  
    24  import (
    25  	conversion "k8s.io/apimachinery/pkg/conversion"
    26  	runtime "k8s.io/apimachinery/pkg/runtime"
    27  	v1alpha2 "sigs.k8s.io/cluster-api/internal/runtime/test/v1alpha2"
    28  )
    29  
    30  func init() {
    31  	localSchemeBuilder.Register(RegisterConversions)
    32  }
    33  
    34  // RegisterConversions adds conversion functions to the given scheme.
    35  // Public to allow building arbitrary schemes.
    36  func RegisterConversions(s *runtime.Scheme) error {
    37  	if err := s.AddGeneratedConversionFunc((*FakeRequest)(nil), (*v1alpha2.FakeRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
    38  		return Convert_v1alpha1_FakeRequest_To_v1alpha2_FakeRequest(a.(*FakeRequest), b.(*v1alpha2.FakeRequest), scope)
    39  	}); err != nil {
    40  		return err
    41  	}
    42  	if err := s.AddGeneratedConversionFunc((*v1alpha2.FakeRequest)(nil), (*FakeRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
    43  		return Convert_v1alpha2_FakeRequest_To_v1alpha1_FakeRequest(a.(*v1alpha2.FakeRequest), b.(*FakeRequest), scope)
    44  	}); err != nil {
    45  		return err
    46  	}
    47  	if err := s.AddGeneratedConversionFunc((*v1alpha2.FakeResponse)(nil), (*FakeResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
    48  		return Convert_v1alpha2_FakeResponse_To_v1alpha1_FakeResponse(a.(*v1alpha2.FakeResponse), b.(*FakeResponse), scope)
    49  	}); err != nil {
    50  		return err
    51  	}
    52  	if err := s.AddConversionFunc((*FakeResponse)(nil), (*v1alpha2.FakeResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
    53  		return Convert_v1alpha1_FakeResponse_To_v1alpha2_FakeResponse(a.(*FakeResponse), b.(*v1alpha2.FakeResponse), scope)
    54  	}); err != nil {
    55  		return err
    56  	}
    57  	return nil
    58  }
    59  
    60  func autoConvert_v1alpha1_FakeRequest_To_v1alpha2_FakeRequest(in *FakeRequest, out *v1alpha2.FakeRequest, s conversion.Scope) error {
    61  	out.CommonRequest = in.CommonRequest
    62  	out.Cluster = in.Cluster
    63  	out.Second = in.Second
    64  	out.First = in.First
    65  	return nil
    66  }
    67  
    68  // Convert_v1alpha1_FakeRequest_To_v1alpha2_FakeRequest is an autogenerated conversion function.
    69  func Convert_v1alpha1_FakeRequest_To_v1alpha2_FakeRequest(in *FakeRequest, out *v1alpha2.FakeRequest, s conversion.Scope) error {
    70  	return autoConvert_v1alpha1_FakeRequest_To_v1alpha2_FakeRequest(in, out, s)
    71  }
    72  
    73  func autoConvert_v1alpha2_FakeRequest_To_v1alpha1_FakeRequest(in *v1alpha2.FakeRequest, out *FakeRequest, s conversion.Scope) error {
    74  	out.CommonRequest = in.CommonRequest
    75  	out.Cluster = in.Cluster
    76  	out.Second = in.Second
    77  	out.First = in.First
    78  	return nil
    79  }
    80  
    81  // Convert_v1alpha2_FakeRequest_To_v1alpha1_FakeRequest is an autogenerated conversion function.
    82  func Convert_v1alpha2_FakeRequest_To_v1alpha1_FakeRequest(in *v1alpha2.FakeRequest, out *FakeRequest, s conversion.Scope) error {
    83  	return autoConvert_v1alpha2_FakeRequest_To_v1alpha1_FakeRequest(in, out, s)
    84  }
    85  
    86  func autoConvert_v1alpha1_FakeResponse_To_v1alpha2_FakeResponse(in *FakeResponse, out *v1alpha2.FakeResponse, s conversion.Scope) error {
    87  	out.CommonResponse = in.CommonResponse
    88  	out.Second = in.Second
    89  	out.First = in.First
    90  	return nil
    91  }
    92  
    93  func autoConvert_v1alpha2_FakeResponse_To_v1alpha1_FakeResponse(in *v1alpha2.FakeResponse, out *FakeResponse, s conversion.Scope) error {
    94  	out.CommonResponse = in.CommonResponse
    95  	out.Second = in.Second
    96  	out.First = in.First
    97  	return nil
    98  }
    99  
   100  // Convert_v1alpha2_FakeResponse_To_v1alpha1_FakeResponse is an autogenerated conversion function.
   101  func Convert_v1alpha2_FakeResponse_To_v1alpha1_FakeResponse(in *v1alpha2.FakeResponse, out *FakeResponse, s conversion.Scope) error {
   102  	return autoConvert_v1alpha2_FakeResponse_To_v1alpha1_FakeResponse(in, out, s)
   103  }