zz_generated.conversion.go 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. // +build !ignore_autogenerated
  2. /*
  3. Copyright The Kubernetes Authors.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. */
  14. // Code generated by conversion-gen. DO NOT EDIT.
  15. package v1alpha1
  16. import (
  17. unsafe "unsafe"
  18. v1 "k8s.io/api/core/v1"
  19. v1alpha1 "k8s.io/api/node/v1alpha1"
  20. conversion "k8s.io/apimachinery/pkg/conversion"
  21. runtime "k8s.io/apimachinery/pkg/runtime"
  22. core "k8s.io/kubernetes/pkg/apis/core"
  23. node "k8s.io/kubernetes/pkg/apis/node"
  24. )
  25. func init() {
  26. localSchemeBuilder.Register(RegisterConversions)
  27. }
  28. // RegisterConversions adds conversion functions to the given scheme.
  29. // Public to allow building arbitrary schemes.
  30. func RegisterConversions(s *runtime.Scheme) error {
  31. if err := s.AddGeneratedConversionFunc((*v1alpha1.Overhead)(nil), (*node.Overhead)(nil), func(a, b interface{}, scope conversion.Scope) error {
  32. return Convert_v1alpha1_Overhead_To_node_Overhead(a.(*v1alpha1.Overhead), b.(*node.Overhead), scope)
  33. }); err != nil {
  34. return err
  35. }
  36. if err := s.AddGeneratedConversionFunc((*node.Overhead)(nil), (*v1alpha1.Overhead)(nil), func(a, b interface{}, scope conversion.Scope) error {
  37. return Convert_node_Overhead_To_v1alpha1_Overhead(a.(*node.Overhead), b.(*v1alpha1.Overhead), scope)
  38. }); err != nil {
  39. return err
  40. }
  41. if err := s.AddGeneratedConversionFunc((*v1alpha1.RuntimeClassList)(nil), (*node.RuntimeClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
  42. return Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(a.(*v1alpha1.RuntimeClassList), b.(*node.RuntimeClassList), scope)
  43. }); err != nil {
  44. return err
  45. }
  46. if err := s.AddGeneratedConversionFunc((*node.RuntimeClassList)(nil), (*v1alpha1.RuntimeClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
  47. return Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(a.(*node.RuntimeClassList), b.(*v1alpha1.RuntimeClassList), scope)
  48. }); err != nil {
  49. return err
  50. }
  51. if err := s.AddGeneratedConversionFunc((*v1alpha1.Scheduling)(nil), (*node.Scheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
  52. return Convert_v1alpha1_Scheduling_To_node_Scheduling(a.(*v1alpha1.Scheduling), b.(*node.Scheduling), scope)
  53. }); err != nil {
  54. return err
  55. }
  56. if err := s.AddGeneratedConversionFunc((*node.Scheduling)(nil), (*v1alpha1.Scheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
  57. return Convert_node_Scheduling_To_v1alpha1_Scheduling(a.(*node.Scheduling), b.(*v1alpha1.Scheduling), scope)
  58. }); err != nil {
  59. return err
  60. }
  61. if err := s.AddConversionFunc((*node.RuntimeClass)(nil), (*v1alpha1.RuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
  62. return Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(a.(*node.RuntimeClass), b.(*v1alpha1.RuntimeClass), scope)
  63. }); err != nil {
  64. return err
  65. }
  66. if err := s.AddConversionFunc((*v1alpha1.RuntimeClass)(nil), (*node.RuntimeClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
  67. return Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(a.(*v1alpha1.RuntimeClass), b.(*node.RuntimeClass), scope)
  68. }); err != nil {
  69. return err
  70. }
  71. return nil
  72. }
  73. func autoConvert_v1alpha1_Overhead_To_node_Overhead(in *v1alpha1.Overhead, out *node.Overhead, s conversion.Scope) error {
  74. out.PodFixed = *(*core.ResourceList)(unsafe.Pointer(&in.PodFixed))
  75. return nil
  76. }
  77. // Convert_v1alpha1_Overhead_To_node_Overhead is an autogenerated conversion function.
  78. func Convert_v1alpha1_Overhead_To_node_Overhead(in *v1alpha1.Overhead, out *node.Overhead, s conversion.Scope) error {
  79. return autoConvert_v1alpha1_Overhead_To_node_Overhead(in, out, s)
  80. }
  81. func autoConvert_node_Overhead_To_v1alpha1_Overhead(in *node.Overhead, out *v1alpha1.Overhead, s conversion.Scope) error {
  82. out.PodFixed = *(*v1.ResourceList)(unsafe.Pointer(&in.PodFixed))
  83. return nil
  84. }
  85. // Convert_node_Overhead_To_v1alpha1_Overhead is an autogenerated conversion function.
  86. func Convert_node_Overhead_To_v1alpha1_Overhead(in *node.Overhead, out *v1alpha1.Overhead, s conversion.Scope) error {
  87. return autoConvert_node_Overhead_To_v1alpha1_Overhead(in, out, s)
  88. }
  89. func autoConvert_v1alpha1_RuntimeClass_To_node_RuntimeClass(in *v1alpha1.RuntimeClass, out *node.RuntimeClass, s conversion.Scope) error {
  90. out.ObjectMeta = in.ObjectMeta
  91. // WARNING: in.Spec requires manual conversion: does not exist in peer-type
  92. return nil
  93. }
  94. func autoConvert_node_RuntimeClass_To_v1alpha1_RuntimeClass(in *node.RuntimeClass, out *v1alpha1.RuntimeClass, s conversion.Scope) error {
  95. out.ObjectMeta = in.ObjectMeta
  96. // WARNING: in.Handler requires manual conversion: does not exist in peer-type
  97. // WARNING: in.Overhead requires manual conversion: does not exist in peer-type
  98. // WARNING: in.Scheduling requires manual conversion: does not exist in peer-type
  99. return nil
  100. }
  101. func autoConvert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in *v1alpha1.RuntimeClassList, out *node.RuntimeClassList, s conversion.Scope) error {
  102. out.ListMeta = in.ListMeta
  103. if in.Items != nil {
  104. in, out := &in.Items, &out.Items
  105. *out = make([]node.RuntimeClass, len(*in))
  106. for i := range *in {
  107. if err := Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(&(*in)[i], &(*out)[i], s); err != nil {
  108. return err
  109. }
  110. }
  111. } else {
  112. out.Items = nil
  113. }
  114. return nil
  115. }
  116. // Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList is an autogenerated conversion function.
  117. func Convert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in *v1alpha1.RuntimeClassList, out *node.RuntimeClassList, s conversion.Scope) error {
  118. return autoConvert_v1alpha1_RuntimeClassList_To_node_RuntimeClassList(in, out, s)
  119. }
  120. func autoConvert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in *node.RuntimeClassList, out *v1alpha1.RuntimeClassList, s conversion.Scope) error {
  121. out.ListMeta = in.ListMeta
  122. if in.Items != nil {
  123. in, out := &in.Items, &out.Items
  124. *out = make([]v1alpha1.RuntimeClass, len(*in))
  125. for i := range *in {
  126. if err := Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(&(*in)[i], &(*out)[i], s); err != nil {
  127. return err
  128. }
  129. }
  130. } else {
  131. out.Items = nil
  132. }
  133. return nil
  134. }
  135. // Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList is an autogenerated conversion function.
  136. func Convert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in *node.RuntimeClassList, out *v1alpha1.RuntimeClassList, s conversion.Scope) error {
  137. return autoConvert_node_RuntimeClassList_To_v1alpha1_RuntimeClassList(in, out, s)
  138. }
  139. func autoConvert_v1alpha1_Scheduling_To_node_Scheduling(in *v1alpha1.Scheduling, out *node.Scheduling, s conversion.Scope) error {
  140. out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
  141. out.Tolerations = *(*[]core.Toleration)(unsafe.Pointer(&in.Tolerations))
  142. return nil
  143. }
  144. // Convert_v1alpha1_Scheduling_To_node_Scheduling is an autogenerated conversion function.
  145. func Convert_v1alpha1_Scheduling_To_node_Scheduling(in *v1alpha1.Scheduling, out *node.Scheduling, s conversion.Scope) error {
  146. return autoConvert_v1alpha1_Scheduling_To_node_Scheduling(in, out, s)
  147. }
  148. func autoConvert_node_Scheduling_To_v1alpha1_Scheduling(in *node.Scheduling, out *v1alpha1.Scheduling, s conversion.Scope) error {
  149. out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
  150. out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations))
  151. return nil
  152. }
  153. // Convert_node_Scheduling_To_v1alpha1_Scheduling is an autogenerated conversion function.
  154. func Convert_node_Scheduling_To_v1alpha1_Scheduling(in *node.Scheduling, out *v1alpha1.Scheduling, s conversion.Scope) error {
  155. return autoConvert_node_Scheduling_To_v1alpha1_Scheduling(in, out, s)
  156. }