github.com/spotmaxtech/k8s-apimachinery-v0260@v0.0.1/pkg/apis/meta/internalversion/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 internalversion
    23  
    24  import (
    25  	unsafe "unsafe"
    26  
    27  	v1 "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/apis/meta/v1"
    28  	conversion "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/conversion"
    29  	runtime "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/runtime"
    30  )
    31  
    32  func init() {
    33  	localSchemeBuilder.Register(RegisterConversions)
    34  }
    35  
    36  // RegisterConversions adds conversion functions to the given scheme.
    37  // Public to allow building arbitrary schemes.
    38  func RegisterConversions(s *runtime.Scheme) error {
    39  	if err := s.AddGeneratedConversionFunc((*List)(nil), (*v1.List)(nil), func(a, b interface{}, scope conversion.Scope) error {
    40  		return Convert_internalversion_List_To_v1_List(a.(*List), b.(*v1.List), scope)
    41  	}); err != nil {
    42  		return err
    43  	}
    44  	if err := s.AddGeneratedConversionFunc((*v1.List)(nil), (*List)(nil), func(a, b interface{}, scope conversion.Scope) error {
    45  		return Convert_v1_List_To_internalversion_List(a.(*v1.List), b.(*List), scope)
    46  	}); err != nil {
    47  		return err
    48  	}
    49  	if err := s.AddGeneratedConversionFunc((*ListOptions)(nil), (*v1.ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
    50  		return Convert_internalversion_ListOptions_To_v1_ListOptions(a.(*ListOptions), b.(*v1.ListOptions), scope)
    51  	}); err != nil {
    52  		return err
    53  	}
    54  	if err := s.AddGeneratedConversionFunc((*v1.ListOptions)(nil), (*ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
    55  		return Convert_v1_ListOptions_To_internalversion_ListOptions(a.(*v1.ListOptions), b.(*ListOptions), scope)
    56  	}); err != nil {
    57  		return err
    58  	}
    59  	return nil
    60  }
    61  
    62  func autoConvert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
    63  	out.ListMeta = in.ListMeta
    64  	if in.Items != nil {
    65  		in, out := &in.Items, &out.Items
    66  		*out = make([]runtime.RawExtension, len(*in))
    67  		for i := range *in {
    68  			if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&(*in)[i], &(*out)[i], s); err != nil {
    69  				return err
    70  			}
    71  		}
    72  	} else {
    73  		out.Items = nil
    74  	}
    75  	return nil
    76  }
    77  
    78  // Convert_internalversion_List_To_v1_List is an autogenerated conversion function.
    79  func Convert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
    80  	return autoConvert_internalversion_List_To_v1_List(in, out, s)
    81  }
    82  
    83  func autoConvert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
    84  	out.ListMeta = in.ListMeta
    85  	if in.Items != nil {
    86  		in, out := &in.Items, &out.Items
    87  		*out = make([]runtime.Object, len(*in))
    88  		for i := range *in {
    89  			if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
    90  				return err
    91  			}
    92  		}
    93  	} else {
    94  		out.Items = nil
    95  	}
    96  	return nil
    97  }
    98  
    99  // Convert_v1_List_To_internalversion_List is an autogenerated conversion function.
   100  func Convert_v1_List_To_internalversion_List(in *v1.List, out *List, s conversion.Scope) error {
   101  	return autoConvert_v1_List_To_internalversion_List(in, out, s)
   102  }
   103  
   104  func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *v1.ListOptions, s conversion.Scope) error {
   105  	if err := v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
   106  		return err
   107  	}
   108  	if err := v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
   109  		return err
   110  	}
   111  	out.Watch = in.Watch
   112  	out.AllowWatchBookmarks = in.AllowWatchBookmarks
   113  	out.ResourceVersion = in.ResourceVersion
   114  	out.ResourceVersionMatch = v1.ResourceVersionMatch(in.ResourceVersionMatch)
   115  	out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
   116  	out.Limit = in.Limit
   117  	out.Continue = in.Continue
   118  	return nil
   119  }
   120  
   121  // Convert_internalversion_ListOptions_To_v1_ListOptions is an autogenerated conversion function.
   122  func Convert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *v1.ListOptions, s conversion.Scope) error {
   123  	return autoConvert_internalversion_ListOptions_To_v1_ListOptions(in, out, s)
   124  }
   125  
   126  func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOptions, out *ListOptions, s conversion.Scope) error {
   127  	if err := v1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
   128  		return err
   129  	}
   130  	if err := v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
   131  		return err
   132  	}
   133  	out.Watch = in.Watch
   134  	out.AllowWatchBookmarks = in.AllowWatchBookmarks
   135  	out.ResourceVersion = in.ResourceVersion
   136  	out.ResourceVersionMatch = v1.ResourceVersionMatch(in.ResourceVersionMatch)
   137  	out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
   138  	out.Limit = in.Limit
   139  	out.Continue = in.Continue
   140  	return nil
   141  }
   142  
   143  // Convert_v1_ListOptions_To_internalversion_ListOptions is an autogenerated conversion function.
   144  func Convert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOptions, out *ListOptions, s conversion.Scope) error {
   145  	return autoConvert_v1_ListOptions_To_internalversion_ListOptions(in, out, s)
   146  }