github.com/spotmaxtech/k8s-apimachinery-v0260@v0.0.1/pkg/apis/testapigroup/v1/zz_generated.conversion.go (about)

     1  //go:build !ignore_autogenerated
     2  // +build !ignore_autogenerated
     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 v1
    23  
    24  import (
    25  	unsafe "unsafe"
    26  
    27  	metav1 "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/apis/meta/v1"
    28  	testapigroup "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/apis/testapigroup"
    29  	conversion "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/conversion"
    30  	runtime "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/runtime"
    31  )
    32  
    33  func init() {
    34  	localSchemeBuilder.Register(RegisterConversions)
    35  }
    36  
    37  // RegisterConversions adds conversion functions to the given scheme.
    38  // Public to allow building arbitrary schemes.
    39  func RegisterConversions(s *runtime.Scheme) error {
    40  	if err := s.AddGeneratedConversionFunc((*Carp)(nil), (*testapigroup.Carp)(nil), func(a, b interface{}, scope conversion.Scope) error {
    41  		return Convert_v1_Carp_To_testapigroup_Carp(a.(*Carp), b.(*testapigroup.Carp), scope)
    42  	}); err != nil {
    43  		return err
    44  	}
    45  	if err := s.AddGeneratedConversionFunc((*testapigroup.Carp)(nil), (*Carp)(nil), func(a, b interface{}, scope conversion.Scope) error {
    46  		return Convert_testapigroup_Carp_To_v1_Carp(a.(*testapigroup.Carp), b.(*Carp), scope)
    47  	}); err != nil {
    48  		return err
    49  	}
    50  	if err := s.AddGeneratedConversionFunc((*CarpCondition)(nil), (*testapigroup.CarpCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
    51  		return Convert_v1_CarpCondition_To_testapigroup_CarpCondition(a.(*CarpCondition), b.(*testapigroup.CarpCondition), scope)
    52  	}); err != nil {
    53  		return err
    54  	}
    55  	if err := s.AddGeneratedConversionFunc((*testapigroup.CarpCondition)(nil), (*CarpCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
    56  		return Convert_testapigroup_CarpCondition_To_v1_CarpCondition(a.(*testapigroup.CarpCondition), b.(*CarpCondition), scope)
    57  	}); err != nil {
    58  		return err
    59  	}
    60  	if err := s.AddGeneratedConversionFunc((*CarpList)(nil), (*testapigroup.CarpList)(nil), func(a, b interface{}, scope conversion.Scope) error {
    61  		return Convert_v1_CarpList_To_testapigroup_CarpList(a.(*CarpList), b.(*testapigroup.CarpList), scope)
    62  	}); err != nil {
    63  		return err
    64  	}
    65  	if err := s.AddGeneratedConversionFunc((*testapigroup.CarpList)(nil), (*CarpList)(nil), func(a, b interface{}, scope conversion.Scope) error {
    66  		return Convert_testapigroup_CarpList_To_v1_CarpList(a.(*testapigroup.CarpList), b.(*CarpList), scope)
    67  	}); err != nil {
    68  		return err
    69  	}
    70  	if err := s.AddGeneratedConversionFunc((*CarpSpec)(nil), (*testapigroup.CarpSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
    71  		return Convert_v1_CarpSpec_To_testapigroup_CarpSpec(a.(*CarpSpec), b.(*testapigroup.CarpSpec), scope)
    72  	}); err != nil {
    73  		return err
    74  	}
    75  	if err := s.AddGeneratedConversionFunc((*testapigroup.CarpSpec)(nil), (*CarpSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
    76  		return Convert_testapigroup_CarpSpec_To_v1_CarpSpec(a.(*testapigroup.CarpSpec), b.(*CarpSpec), scope)
    77  	}); err != nil {
    78  		return err
    79  	}
    80  	if err := s.AddGeneratedConversionFunc((*CarpStatus)(nil), (*testapigroup.CarpStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
    81  		return Convert_v1_CarpStatus_To_testapigroup_CarpStatus(a.(*CarpStatus), b.(*testapigroup.CarpStatus), scope)
    82  	}); err != nil {
    83  		return err
    84  	}
    85  	if err := s.AddGeneratedConversionFunc((*testapigroup.CarpStatus)(nil), (*CarpStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
    86  		return Convert_testapigroup_CarpStatus_To_v1_CarpStatus(a.(*testapigroup.CarpStatus), b.(*CarpStatus), scope)
    87  	}); err != nil {
    88  		return err
    89  	}
    90  	return nil
    91  }
    92  
    93  func autoConvert_v1_Carp_To_testapigroup_Carp(in *Carp, out *testapigroup.Carp, s conversion.Scope) error {
    94  	out.ObjectMeta = in.ObjectMeta
    95  	if err := Convert_v1_CarpSpec_To_testapigroup_CarpSpec(&in.Spec, &out.Spec, s); err != nil {
    96  		return err
    97  	}
    98  	if err := Convert_v1_CarpStatus_To_testapigroup_CarpStatus(&in.Status, &out.Status, s); err != nil {
    99  		return err
   100  	}
   101  	return nil
   102  }
   103  
   104  // Convert_v1_Carp_To_testapigroup_Carp is an autogenerated conversion function.
   105  func Convert_v1_Carp_To_testapigroup_Carp(in *Carp, out *testapigroup.Carp, s conversion.Scope) error {
   106  	return autoConvert_v1_Carp_To_testapigroup_Carp(in, out, s)
   107  }
   108  
   109  func autoConvert_testapigroup_Carp_To_v1_Carp(in *testapigroup.Carp, out *Carp, s conversion.Scope) error {
   110  	out.ObjectMeta = in.ObjectMeta
   111  	if err := Convert_testapigroup_CarpSpec_To_v1_CarpSpec(&in.Spec, &out.Spec, s); err != nil {
   112  		return err
   113  	}
   114  	if err := Convert_testapigroup_CarpStatus_To_v1_CarpStatus(&in.Status, &out.Status, s); err != nil {
   115  		return err
   116  	}
   117  	return nil
   118  }
   119  
   120  // Convert_testapigroup_Carp_To_v1_Carp is an autogenerated conversion function.
   121  func Convert_testapigroup_Carp_To_v1_Carp(in *testapigroup.Carp, out *Carp, s conversion.Scope) error {
   122  	return autoConvert_testapigroup_Carp_To_v1_Carp(in, out, s)
   123  }
   124  
   125  func autoConvert_v1_CarpCondition_To_testapigroup_CarpCondition(in *CarpCondition, out *testapigroup.CarpCondition, s conversion.Scope) error {
   126  	out.Type = testapigroup.CarpConditionType(in.Type)
   127  	out.Status = testapigroup.ConditionStatus(in.Status)
   128  	out.LastProbeTime = in.LastProbeTime
   129  	out.LastTransitionTime = in.LastTransitionTime
   130  	out.Reason = in.Reason
   131  	out.Message = in.Message
   132  	return nil
   133  }
   134  
   135  // Convert_v1_CarpCondition_To_testapigroup_CarpCondition is an autogenerated conversion function.
   136  func Convert_v1_CarpCondition_To_testapigroup_CarpCondition(in *CarpCondition, out *testapigroup.CarpCondition, s conversion.Scope) error {
   137  	return autoConvert_v1_CarpCondition_To_testapigroup_CarpCondition(in, out, s)
   138  }
   139  
   140  func autoConvert_testapigroup_CarpCondition_To_v1_CarpCondition(in *testapigroup.CarpCondition, out *CarpCondition, s conversion.Scope) error {
   141  	out.Type = CarpConditionType(in.Type)
   142  	out.Status = ConditionStatus(in.Status)
   143  	out.LastProbeTime = in.LastProbeTime
   144  	out.LastTransitionTime = in.LastTransitionTime
   145  	out.Reason = in.Reason
   146  	out.Message = in.Message
   147  	return nil
   148  }
   149  
   150  // Convert_testapigroup_CarpCondition_To_v1_CarpCondition is an autogenerated conversion function.
   151  func Convert_testapigroup_CarpCondition_To_v1_CarpCondition(in *testapigroup.CarpCondition, out *CarpCondition, s conversion.Scope) error {
   152  	return autoConvert_testapigroup_CarpCondition_To_v1_CarpCondition(in, out, s)
   153  }
   154  
   155  func autoConvert_v1_CarpList_To_testapigroup_CarpList(in *CarpList, out *testapigroup.CarpList, s conversion.Scope) error {
   156  	out.ListMeta = in.ListMeta
   157  	if in.Items != nil {
   158  		in, out := &in.Items, &out.Items
   159  		*out = make([]testapigroup.Carp, len(*in))
   160  		for i := range *in {
   161  			if err := Convert_v1_Carp_To_testapigroup_Carp(&(*in)[i], &(*out)[i], s); err != nil {
   162  				return err
   163  			}
   164  		}
   165  	} else {
   166  		out.Items = nil
   167  	}
   168  	return nil
   169  }
   170  
   171  // Convert_v1_CarpList_To_testapigroup_CarpList is an autogenerated conversion function.
   172  func Convert_v1_CarpList_To_testapigroup_CarpList(in *CarpList, out *testapigroup.CarpList, s conversion.Scope) error {
   173  	return autoConvert_v1_CarpList_To_testapigroup_CarpList(in, out, s)
   174  }
   175  
   176  func autoConvert_testapigroup_CarpList_To_v1_CarpList(in *testapigroup.CarpList, out *CarpList, s conversion.Scope) error {
   177  	out.ListMeta = in.ListMeta
   178  	if in.Items != nil {
   179  		in, out := &in.Items, &out.Items
   180  		*out = make([]Carp, len(*in))
   181  		for i := range *in {
   182  			if err := Convert_testapigroup_Carp_To_v1_Carp(&(*in)[i], &(*out)[i], s); err != nil {
   183  				return err
   184  			}
   185  		}
   186  	} else {
   187  		out.Items = nil
   188  	}
   189  	return nil
   190  }
   191  
   192  // Convert_testapigroup_CarpList_To_v1_CarpList is an autogenerated conversion function.
   193  func Convert_testapigroup_CarpList_To_v1_CarpList(in *testapigroup.CarpList, out *CarpList, s conversion.Scope) error {
   194  	return autoConvert_testapigroup_CarpList_To_v1_CarpList(in, out, s)
   195  }
   196  
   197  func autoConvert_v1_CarpSpec_To_testapigroup_CarpSpec(in *CarpSpec, out *testapigroup.CarpSpec, s conversion.Scope) error {
   198  	out.RestartPolicy = testapigroup.RestartPolicy(in.RestartPolicy)
   199  	out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
   200  	out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
   201  	out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
   202  	out.ServiceAccountName = in.ServiceAccountName
   203  	// INFO: in.DeprecatedServiceAccount opted out of conversion generation
   204  	out.NodeName = in.NodeName
   205  	// INFO: in.HostNetwork opted out of conversion generation
   206  	// INFO: in.HostPID opted out of conversion generation
   207  	// INFO: in.HostIPC opted out of conversion generation
   208  	out.Hostname = in.Hostname
   209  	out.Subdomain = in.Subdomain
   210  	out.SchedulerName = in.SchedulerName
   211  	return nil
   212  }
   213  
   214  // Convert_v1_CarpSpec_To_testapigroup_CarpSpec is an autogenerated conversion function.
   215  func Convert_v1_CarpSpec_To_testapigroup_CarpSpec(in *CarpSpec, out *testapigroup.CarpSpec, s conversion.Scope) error {
   216  	return autoConvert_v1_CarpSpec_To_testapigroup_CarpSpec(in, out, s)
   217  }
   218  
   219  func autoConvert_testapigroup_CarpSpec_To_v1_CarpSpec(in *testapigroup.CarpSpec, out *CarpSpec, s conversion.Scope) error {
   220  	out.RestartPolicy = RestartPolicy(in.RestartPolicy)
   221  	out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
   222  	out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
   223  	out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
   224  	out.ServiceAccountName = in.ServiceAccountName
   225  	out.NodeName = in.NodeName
   226  	out.Hostname = in.Hostname
   227  	out.Subdomain = in.Subdomain
   228  	out.SchedulerName = in.SchedulerName
   229  	return nil
   230  }
   231  
   232  // Convert_testapigroup_CarpSpec_To_v1_CarpSpec is an autogenerated conversion function.
   233  func Convert_testapigroup_CarpSpec_To_v1_CarpSpec(in *testapigroup.CarpSpec, out *CarpSpec, s conversion.Scope) error {
   234  	return autoConvert_testapigroup_CarpSpec_To_v1_CarpSpec(in, out, s)
   235  }
   236  
   237  func autoConvert_v1_CarpStatus_To_testapigroup_CarpStatus(in *CarpStatus, out *testapigroup.CarpStatus, s conversion.Scope) error {
   238  	out.Phase = testapigroup.CarpPhase(in.Phase)
   239  	out.Conditions = *(*[]testapigroup.CarpCondition)(unsafe.Pointer(&in.Conditions))
   240  	out.Message = in.Message
   241  	out.Reason = in.Reason
   242  	out.HostIP = in.HostIP
   243  	out.CarpIP = in.CarpIP
   244  	out.StartTime = (*metav1.Time)(unsafe.Pointer(in.StartTime))
   245  	return nil
   246  }
   247  
   248  // Convert_v1_CarpStatus_To_testapigroup_CarpStatus is an autogenerated conversion function.
   249  func Convert_v1_CarpStatus_To_testapigroup_CarpStatus(in *CarpStatus, out *testapigroup.CarpStatus, s conversion.Scope) error {
   250  	return autoConvert_v1_CarpStatus_To_testapigroup_CarpStatus(in, out, s)
   251  }
   252  
   253  func autoConvert_testapigroup_CarpStatus_To_v1_CarpStatus(in *testapigroup.CarpStatus, out *CarpStatus, s conversion.Scope) error {
   254  	out.Phase = CarpPhase(in.Phase)
   255  	out.Conditions = *(*[]CarpCondition)(unsafe.Pointer(&in.Conditions))
   256  	out.Message = in.Message
   257  	out.Reason = in.Reason
   258  	out.HostIP = in.HostIP
   259  	out.CarpIP = in.CarpIP
   260  	out.StartTime = (*metav1.Time)(unsafe.Pointer(in.StartTime))
   261  	return nil
   262  }
   263  
   264  // Convert_testapigroup_CarpStatus_To_v1_CarpStatus is an autogenerated conversion function.
   265  func Convert_testapigroup_CarpStatus_To_v1_CarpStatus(in *testapigroup.CarpStatus, out *CarpStatus, s conversion.Scope) error {
   266  	return autoConvert_testapigroup_CarpStatus_To_v1_CarpStatus(in, out, s)
   267  }