kubernetes zz_generated.conversion 源码

  • 2022-09-18
  • 浏览 (586)

kubernetes zz_generated.conversion 代码

文件路径:/pkg/apis/apiserverinternal/v1alpha1/zz_generated.conversion.go

//go:build !ignore_autogenerated
// +build !ignore_autogenerated

/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by conversion-gen. DO NOT EDIT.

package v1alpha1

import (
	unsafe "unsafe"

	v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
	conversion "k8s.io/apimachinery/pkg/conversion"
	runtime "k8s.io/apimachinery/pkg/runtime"
	apiserverinternal "k8s.io/kubernetes/pkg/apis/apiserverinternal"
)

func init() {
	localSchemeBuilder.Register(RegisterConversions)
}

// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
	if err := s.AddGeneratedConversionFunc((*v1alpha1.ServerStorageVersion)(nil), (*apiserverinternal.ServerStorageVersion)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_ServerStorageVersion_To_apiserverinternal_ServerStorageVersion(a.(*v1alpha1.ServerStorageVersion), b.(*apiserverinternal.ServerStorageVersion), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*apiserverinternal.ServerStorageVersion)(nil), (*v1alpha1.ServerStorageVersion)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_apiserverinternal_ServerStorageVersion_To_v1alpha1_ServerStorageVersion(a.(*apiserverinternal.ServerStorageVersion), b.(*v1alpha1.ServerStorageVersion), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*v1alpha1.StorageVersion)(nil), (*apiserverinternal.StorageVersion)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_StorageVersion_To_apiserverinternal_StorageVersion(a.(*v1alpha1.StorageVersion), b.(*apiserverinternal.StorageVersion), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*apiserverinternal.StorageVersion)(nil), (*v1alpha1.StorageVersion)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_apiserverinternal_StorageVersion_To_v1alpha1_StorageVersion(a.(*apiserverinternal.StorageVersion), b.(*v1alpha1.StorageVersion), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*v1alpha1.StorageVersionCondition)(nil), (*apiserverinternal.StorageVersionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_StorageVersionCondition_To_apiserverinternal_StorageVersionCondition(a.(*v1alpha1.StorageVersionCondition), b.(*apiserverinternal.StorageVersionCondition), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*apiserverinternal.StorageVersionCondition)(nil), (*v1alpha1.StorageVersionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_apiserverinternal_StorageVersionCondition_To_v1alpha1_StorageVersionCondition(a.(*apiserverinternal.StorageVersionCondition), b.(*v1alpha1.StorageVersionCondition), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*v1alpha1.StorageVersionList)(nil), (*apiserverinternal.StorageVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_StorageVersionList_To_apiserverinternal_StorageVersionList(a.(*v1alpha1.StorageVersionList), b.(*apiserverinternal.StorageVersionList), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*apiserverinternal.StorageVersionList)(nil), (*v1alpha1.StorageVersionList)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_apiserverinternal_StorageVersionList_To_v1alpha1_StorageVersionList(a.(*apiserverinternal.StorageVersionList), b.(*v1alpha1.StorageVersionList), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*v1alpha1.StorageVersionSpec)(nil), (*apiserverinternal.StorageVersionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_StorageVersionSpec_To_apiserverinternal_StorageVersionSpec(a.(*v1alpha1.StorageVersionSpec), b.(*apiserverinternal.StorageVersionSpec), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*apiserverinternal.StorageVersionSpec)(nil), (*v1alpha1.StorageVersionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_apiserverinternal_StorageVersionSpec_To_v1alpha1_StorageVersionSpec(a.(*apiserverinternal.StorageVersionSpec), b.(*v1alpha1.StorageVersionSpec), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*v1alpha1.StorageVersionStatus)(nil), (*apiserverinternal.StorageVersionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_StorageVersionStatus_To_apiserverinternal_StorageVersionStatus(a.(*v1alpha1.StorageVersionStatus), b.(*apiserverinternal.StorageVersionStatus), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*apiserverinternal.StorageVersionStatus)(nil), (*v1alpha1.StorageVersionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_apiserverinternal_StorageVersionStatus_To_v1alpha1_StorageVersionStatus(a.(*apiserverinternal.StorageVersionStatus), b.(*v1alpha1.StorageVersionStatus), scope)
	}); err != nil {
		return err
	}
	return nil
}

func autoConvert_v1alpha1_ServerStorageVersion_To_apiserverinternal_ServerStorageVersion(in *v1alpha1.ServerStorageVersion, out *apiserverinternal.ServerStorageVersion, s conversion.Scope) error {
	out.APIServerID = in.APIServerID
	out.EncodingVersion = in.EncodingVersion
	out.DecodableVersions = *(*[]string)(unsafe.Pointer(&in.DecodableVersions))
	return nil
}

// Convert_v1alpha1_ServerStorageVersion_To_apiserverinternal_ServerStorageVersion is an autogenerated conversion function.
func Convert_v1alpha1_ServerStorageVersion_To_apiserverinternal_ServerStorageVersion(in *v1alpha1.ServerStorageVersion, out *apiserverinternal.ServerStorageVersion, s conversion.Scope) error {
	return autoConvert_v1alpha1_ServerStorageVersion_To_apiserverinternal_ServerStorageVersion(in, out, s)
}

func autoConvert_apiserverinternal_ServerStorageVersion_To_v1alpha1_ServerStorageVersion(in *apiserverinternal.ServerStorageVersion, out *v1alpha1.ServerStorageVersion, s conversion.Scope) error {
	out.APIServerID = in.APIServerID
	out.EncodingVersion = in.EncodingVersion
	out.DecodableVersions = *(*[]string)(unsafe.Pointer(&in.DecodableVersions))
	return nil
}

// Convert_apiserverinternal_ServerStorageVersion_To_v1alpha1_ServerStorageVersion is an autogenerated conversion function.
func Convert_apiserverinternal_ServerStorageVersion_To_v1alpha1_ServerStorageVersion(in *apiserverinternal.ServerStorageVersion, out *v1alpha1.ServerStorageVersion, s conversion.Scope) error {
	return autoConvert_apiserverinternal_ServerStorageVersion_To_v1alpha1_ServerStorageVersion(in, out, s)
}

func autoConvert_v1alpha1_StorageVersion_To_apiserverinternal_StorageVersion(in *v1alpha1.StorageVersion, out *apiserverinternal.StorageVersion, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	if err := Convert_v1alpha1_StorageVersionSpec_To_apiserverinternal_StorageVersionSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_v1alpha1_StorageVersionStatus_To_apiserverinternal_StorageVersionStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}

// Convert_v1alpha1_StorageVersion_To_apiserverinternal_StorageVersion is an autogenerated conversion function.
func Convert_v1alpha1_StorageVersion_To_apiserverinternal_StorageVersion(in *v1alpha1.StorageVersion, out *apiserverinternal.StorageVersion, s conversion.Scope) error {
	return autoConvert_v1alpha1_StorageVersion_To_apiserverinternal_StorageVersion(in, out, s)
}

func autoConvert_apiserverinternal_StorageVersion_To_v1alpha1_StorageVersion(in *apiserverinternal.StorageVersion, out *v1alpha1.StorageVersion, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	if err := Convert_apiserverinternal_StorageVersionSpec_To_v1alpha1_StorageVersionSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_apiserverinternal_StorageVersionStatus_To_v1alpha1_StorageVersionStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}

// Convert_apiserverinternal_StorageVersion_To_v1alpha1_StorageVersion is an autogenerated conversion function.
func Convert_apiserverinternal_StorageVersion_To_v1alpha1_StorageVersion(in *apiserverinternal.StorageVersion, out *v1alpha1.StorageVersion, s conversion.Scope) error {
	return autoConvert_apiserverinternal_StorageVersion_To_v1alpha1_StorageVersion(in, out, s)
}

func autoConvert_v1alpha1_StorageVersionCondition_To_apiserverinternal_StorageVersionCondition(in *v1alpha1.StorageVersionCondition, out *apiserverinternal.StorageVersionCondition, s conversion.Scope) error {
	out.Type = apiserverinternal.StorageVersionConditionType(in.Type)
	out.Status = apiserverinternal.ConditionStatus(in.Status)
	out.ObservedGeneration = in.ObservedGeneration
	out.LastTransitionTime = in.LastTransitionTime
	out.Reason = in.Reason
	out.Message = in.Message
	return nil
}

// Convert_v1alpha1_StorageVersionCondition_To_apiserverinternal_StorageVersionCondition is an autogenerated conversion function.
func Convert_v1alpha1_StorageVersionCondition_To_apiserverinternal_StorageVersionCondition(in *v1alpha1.StorageVersionCondition, out *apiserverinternal.StorageVersionCondition, s conversion.Scope) error {
	return autoConvert_v1alpha1_StorageVersionCondition_To_apiserverinternal_StorageVersionCondition(in, out, s)
}

func autoConvert_apiserverinternal_StorageVersionCondition_To_v1alpha1_StorageVersionCondition(in *apiserverinternal.StorageVersionCondition, out *v1alpha1.StorageVersionCondition, s conversion.Scope) error {
	out.Type = v1alpha1.StorageVersionConditionType(in.Type)
	out.Status = v1alpha1.ConditionStatus(in.Status)
	out.ObservedGeneration = in.ObservedGeneration
	out.LastTransitionTime = in.LastTransitionTime
	out.Reason = in.Reason
	out.Message = in.Message
	return nil
}

// Convert_apiserverinternal_StorageVersionCondition_To_v1alpha1_StorageVersionCondition is an autogenerated conversion function.
func Convert_apiserverinternal_StorageVersionCondition_To_v1alpha1_StorageVersionCondition(in *apiserverinternal.StorageVersionCondition, out *v1alpha1.StorageVersionCondition, s conversion.Scope) error {
	return autoConvert_apiserverinternal_StorageVersionCondition_To_v1alpha1_StorageVersionCondition(in, out, s)
}

func autoConvert_v1alpha1_StorageVersionList_To_apiserverinternal_StorageVersionList(in *v1alpha1.StorageVersionList, out *apiserverinternal.StorageVersionList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	out.Items = *(*[]apiserverinternal.StorageVersion)(unsafe.Pointer(&in.Items))
	return nil
}

// Convert_v1alpha1_StorageVersionList_To_apiserverinternal_StorageVersionList is an autogenerated conversion function.
func Convert_v1alpha1_StorageVersionList_To_apiserverinternal_StorageVersionList(in *v1alpha1.StorageVersionList, out *apiserverinternal.StorageVersionList, s conversion.Scope) error {
	return autoConvert_v1alpha1_StorageVersionList_To_apiserverinternal_StorageVersionList(in, out, s)
}

func autoConvert_apiserverinternal_StorageVersionList_To_v1alpha1_StorageVersionList(in *apiserverinternal.StorageVersionList, out *v1alpha1.StorageVersionList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	out.Items = *(*[]v1alpha1.StorageVersion)(unsafe.Pointer(&in.Items))
	return nil
}

// Convert_apiserverinternal_StorageVersionList_To_v1alpha1_StorageVersionList is an autogenerated conversion function.
func Convert_apiserverinternal_StorageVersionList_To_v1alpha1_StorageVersionList(in *apiserverinternal.StorageVersionList, out *v1alpha1.StorageVersionList, s conversion.Scope) error {
	return autoConvert_apiserverinternal_StorageVersionList_To_v1alpha1_StorageVersionList(in, out, s)
}

func autoConvert_v1alpha1_StorageVersionSpec_To_apiserverinternal_StorageVersionSpec(in *v1alpha1.StorageVersionSpec, out *apiserverinternal.StorageVersionSpec, s conversion.Scope) error {
	return nil
}

// Convert_v1alpha1_StorageVersionSpec_To_apiserverinternal_StorageVersionSpec is an autogenerated conversion function.
func Convert_v1alpha1_StorageVersionSpec_To_apiserverinternal_StorageVersionSpec(in *v1alpha1.StorageVersionSpec, out *apiserverinternal.StorageVersionSpec, s conversion.Scope) error {
	return autoConvert_v1alpha1_StorageVersionSpec_To_apiserverinternal_StorageVersionSpec(in, out, s)
}

func autoConvert_apiserverinternal_StorageVersionSpec_To_v1alpha1_StorageVersionSpec(in *apiserverinternal.StorageVersionSpec, out *v1alpha1.StorageVersionSpec, s conversion.Scope) error {
	return nil
}

// Convert_apiserverinternal_StorageVersionSpec_To_v1alpha1_StorageVersionSpec is an autogenerated conversion function.
func Convert_apiserverinternal_StorageVersionSpec_To_v1alpha1_StorageVersionSpec(in *apiserverinternal.StorageVersionSpec, out *v1alpha1.StorageVersionSpec, s conversion.Scope) error {
	return autoConvert_apiserverinternal_StorageVersionSpec_To_v1alpha1_StorageVersionSpec(in, out, s)
}

func autoConvert_v1alpha1_StorageVersionStatus_To_apiserverinternal_StorageVersionStatus(in *v1alpha1.StorageVersionStatus, out *apiserverinternal.StorageVersionStatus, s conversion.Scope) error {
	out.StorageVersions = *(*[]apiserverinternal.ServerStorageVersion)(unsafe.Pointer(&in.StorageVersions))
	out.CommonEncodingVersion = (*string)(unsafe.Pointer(in.CommonEncodingVersion))
	out.Conditions = *(*[]apiserverinternal.StorageVersionCondition)(unsafe.Pointer(&in.Conditions))
	return nil
}

// Convert_v1alpha1_StorageVersionStatus_To_apiserverinternal_StorageVersionStatus is an autogenerated conversion function.
func Convert_v1alpha1_StorageVersionStatus_To_apiserverinternal_StorageVersionStatus(in *v1alpha1.StorageVersionStatus, out *apiserverinternal.StorageVersionStatus, s conversion.Scope) error {
	return autoConvert_v1alpha1_StorageVersionStatus_To_apiserverinternal_StorageVersionStatus(in, out, s)
}

func autoConvert_apiserverinternal_StorageVersionStatus_To_v1alpha1_StorageVersionStatus(in *apiserverinternal.StorageVersionStatus, out *v1alpha1.StorageVersionStatus, s conversion.Scope) error {
	out.StorageVersions = *(*[]v1alpha1.ServerStorageVersion)(unsafe.Pointer(&in.StorageVersions))
	out.CommonEncodingVersion = (*string)(unsafe.Pointer(in.CommonEncodingVersion))
	out.Conditions = *(*[]v1alpha1.StorageVersionCondition)(unsafe.Pointer(&in.Conditions))
	return nil
}

// Convert_apiserverinternal_StorageVersionStatus_To_v1alpha1_StorageVersionStatus is an autogenerated conversion function.
func Convert_apiserverinternal_StorageVersionStatus_To_v1alpha1_StorageVersionStatus(in *apiserverinternal.StorageVersionStatus, out *v1alpha1.StorageVersionStatus, s conversion.Scope) error {
	return autoConvert_apiserverinternal_StorageVersionStatus_To_v1alpha1_StorageVersionStatus(in, out, s)
}

相关信息

kubernetes 源码目录

相关文章

kubernetes doc 源码

kubernetes register 源码

kubernetes zz_generated.defaults 源码

0  赞