...

Source file src/k8s.io/kubernetes/pkg/apis/node/v1alpha1/zz_generated.conversion.go

Documentation: k8s.io/kubernetes/pkg/apis/node/v1alpha1

     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 v1alpha1
    23  
    24  import (
    25  	unsafe "unsafe"
    26  
    27  	v1 "k8s.io/api/core/v1"
    28  	v1alpha1 "k8s.io/api/node/v1alpha1"
    29  	conversion "k8s.io/apimachinery/pkg/conversion"
    30  	runtime "k8s.io/apimachinery/pkg/runtime"
    31  	core "k8s.io/kubernetes/pkg/apis/core"
    32  	node "k8s.io/kubernetes/pkg/apis/node"
    33  )
    34  
    35  func init() {
    36  	localSchemeBuilder.Register(RegisterConversions)
    37  }
    38  
    39  // RegisterConversions adds conversion functions to the given scheme.
    40  // Public to allow building arbitrary schemes.
    41  func RegisterConversions(s *runtime.Scheme) error {
    42  	if err := s.AddGeneratedConversionFunc((*v1alpha1.Overhead)(nil), (*node.Overhead)(nil), func(a, b interface{}, scope conversion.Scope) error {
    43  		return Convert_v1alpha1_Overhead_To_node_Overhead(a.(*v1alpha1.Overhead), b.(*node.Overhead), scope)
    44  	}); err != nil {
    45  		return err
    46  	}
    47  	if err := s.AddGeneratedConversionFunc((*node.Overhead)(nil), (*v1alpha1.Overhead)(nil), func(a, b interface{}, scope conversion.Scope) error {
    48  		return Convert_node_Overhead_To_v1alpha1_Overhead(a.(*node.Overhead), b.(*v1alpha1.Overhead), scope)
    49  	}); err != nil {
    50  		return err
    51  	}
    52  	if err := s.AddGeneratedConversionFunc((*v1alpha1.RuntimeClassList)(nil), (*node.RuntimeClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
    53  		return Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(a.(*v1alpha1.RuntimeClassList), b.(*node.RuntimeClassList), scope)
    54  	}); err != nil {
    55  		return err
    56  	}
    57  	if err := s.AddGeneratedConversionFunc((*node.RuntimeClassList)(nil), (*v1alpha1.RuntimeClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
    58  		return Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(a.(*node.RuntimeClassList), b.(*v1alpha1.RuntimeClassList), scope)
    59  	}); err != nil {
    60  		return err
    61  	}
    62  	if err := s.AddGeneratedConversionFunc((*v1alpha1.Scheduling)(nil), (*node.Scheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
    63  		return Convert_v1alpha1_Scheduling_To_node_Scheduling(a.(*v1alpha1.Scheduling), b.(*node.Scheduling), scope)
    64  	}); err != nil {
    65  		return err
    66  	}
    67  	if err := s.AddGeneratedConversionFunc((*node.Scheduling)(nil), (*v1alpha1.Scheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
    68  		return Convert_node_Scheduling_To_v1alpha1_Scheduling(a.(*node.Scheduling), b.(*v1alpha1.Scheduling), scope)
    69  	}); err != nil {
    70  		return err
    71  	}
    72  	if err := s.AddConversionFunc((*node.RuntimeClass)(nil), (*v1alpha1.RuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
    73  		return Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(a.(*node.RuntimeClass), b.(*v1alpha1.RuntimeClass), scope)
    74  	}); err != nil {
    75  		return err
    76  	}
    77  	if err := s.AddConversionFunc((*v1alpha1.RuntimeClass)(nil), (*node.RuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
    78  		return Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(a.(*v1alpha1.RuntimeClass), b.(*node.RuntimeClass), scope)
    79  	}); err != nil {
    80  		return err
    81  	}
    82  	return nil
    83  }
    84  
    85  func autoConvert_v1alpha1_Overhead_To_node_Overhead(in *v1alpha1.Overhead, out *node.Overhead, s conversion.Scope) error {
    86  	out.PodFixed = *(*core.ResourceList)(unsafe.Pointer(&in.PodFixed))
    87  	return nil
    88  }
    89  
    90  // Convert_v1alpha1_Overhead_To_node_Overhead is an autogenerated conversion function.
    91  func Convert_v1alpha1_Overhead_To_node_Overhead(in *v1alpha1.Overhead, out *node.Overhead, s conversion.Scope) error {
    92  	return autoConvert_v1alpha1_Overhead_To_node_Overhead(in, out, s)
    93  }
    94  
    95  func autoConvert_node_Overhead_To_v1alpha1_Overhead(in *node.Overhead, out *v1alpha1.Overhead, s conversion.Scope) error {
    96  	out.PodFixed = *(*v1.ResourceList)(unsafe.Pointer(&in.PodFixed))
    97  	return nil
    98  }
    99  
   100  // Convert_node_Overhead_To_v1alpha1_Overhead is an autogenerated conversion function.
   101  func Convert_node_Overhead_To_v1alpha1_Overhead(in *node.Overhead, out *v1alpha1.Overhead, s conversion.Scope) error {
   102  	return autoConvert_node_Overhead_To_v1alpha1_Overhead(in, out, s)
   103  }
   104  
   105  func autoConvert_v1alpha1_RuntimeClass_To_node_RuntimeClass(in *v1alpha1.RuntimeClass, out *node.RuntimeClass, s conversion.Scope) error {
   106  	out.ObjectMeta = in.ObjectMeta
   107  	// WARNING: in.Spec requires manual conversion: does not exist in peer-type
   108  	return nil
   109  }
   110  
   111  func autoConvert_node_RuntimeClass_To_v1alpha1_RuntimeClass(in *node.RuntimeClass, out *v1alpha1.RuntimeClass, s conversion.Scope) error {
   112  	out.ObjectMeta = in.ObjectMeta
   113  	// WARNING: in.Handler requires manual conversion: does not exist in peer-type
   114  	// WARNING: in.Overhead requires manual conversion: does not exist in peer-type
   115  	// WARNING: in.Scheduling requires manual conversion: does not exist in peer-type
   116  	return nil
   117  }
   118  
   119  func autoConvert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in *v1alpha1.RuntimeClassList, out *node.RuntimeClassList, s conversion.Scope) error {
   120  	out.ListMeta = in.ListMeta
   121  	if in.Items != nil {
   122  		in, out := &in.Items, &out.Items
   123  		*out = make([]node.RuntimeClass, len(*in))
   124  		for i := range *in {
   125  			if err := Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(&(*in)[i], &(*out)[i], s); err != nil {
   126  				return err
   127  			}
   128  		}
   129  	} else {
   130  		out.Items = nil
   131  	}
   132  	return nil
   133  }
   134  
   135  // Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList is an autogenerated conversion function.
   136  func Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in *v1alpha1.RuntimeClassList, out *node.RuntimeClassList, s conversion.Scope) error {
   137  	return autoConvert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in, out, s)
   138  }
   139  
   140  func autoConvert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in *node.RuntimeClassList, out *v1alpha1.RuntimeClassList, s conversion.Scope) error {
   141  	out.ListMeta = in.ListMeta
   142  	if in.Items != nil {
   143  		in, out := &in.Items, &out.Items
   144  		*out = make([]v1alpha1.RuntimeClass, len(*in))
   145  		for i := range *in {
   146  			if err := Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(&(*in)[i], &(*out)[i], s); err != nil {
   147  				return err
   148  			}
   149  		}
   150  	} else {
   151  		out.Items = nil
   152  	}
   153  	return nil
   154  }
   155  
   156  // Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList is an autogenerated conversion function.
   157  func Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in *node.RuntimeClassList, out *v1alpha1.RuntimeClassList, s conversion.Scope) error {
   158  	return autoConvert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in, out, s)
   159  }
   160  
   161  func autoConvert_v1alpha1_Scheduling_To_node_Scheduling(in *v1alpha1.Scheduling, out *node.Scheduling, s conversion.Scope) error {
   162  	out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
   163  	out.Tolerations = *(*[]core.Toleration)(unsafe.Pointer(&in.Tolerations))
   164  	return nil
   165  }
   166  
   167  // Convert_v1alpha1_Scheduling_To_node_Scheduling is an autogenerated conversion function.
   168  func Convert_v1alpha1_Scheduling_To_node_Scheduling(in *v1alpha1.Scheduling, out *node.Scheduling, s conversion.Scope) error {
   169  	return autoConvert_v1alpha1_Scheduling_To_node_Scheduling(in, out, s)
   170  }
   171  
   172  func autoConvert_node_Scheduling_To_v1alpha1_Scheduling(in *node.Scheduling, out *v1alpha1.Scheduling, s conversion.Scope) error {
   173  	out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
   174  	out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations))
   175  	return nil
   176  }
   177  
   178  // Convert_node_Scheduling_To_v1alpha1_Scheduling is an autogenerated conversion function.
   179  func Convert_node_Scheduling_To_v1alpha1_Scheduling(in *node.Scheduling, out *v1alpha1.Scheduling, s conversion.Scope) error {
   180  	return autoConvert_node_Scheduling_To_v1alpha1_Scheduling(in, out, s)
   181  }
   182  

View as plain text