package v1alpha1

import (
	core "github.com/hawq-cn/apiserver-example/pkg/apis/core"
	conversion "k8s.io/apimachinery/pkg/conversion"
	runtime "k8s.io/apimachinery/pkg/runtime"
	unsafe "unsafe"
)

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

func RegisterConversions(scheme *runtime.Scheme) error {
	return scheme.AddGeneratedConversionFuncs(
		Convert_v1alpha1_MyResource_To_core_MyResource,
		Convert_core_MyResource_To_v1alpha1_MyResource,
		Convert_v1alpha1_MyResourceList_To_core_MyResourceList,
		Convert_core_MyResourceList_To_v1alpha1_MyResourceList,
		Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec,
		Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec,
		Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus,
		Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus,
		Convert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy,
		Convert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy,
		Convert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy,
		Convert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy,
	)
}

func autoConvert_v1alpha1_MyResource_To_core_MyResource(in *MyResource, out *core.MyResource, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	if err := Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}

func Convert_v1alpha1_MyResource_To_core_MyResource(in *MyResource, out *core.MyResource, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResource_To_core_MyResource(in, out, s)
}

func autoConvert_core_MyResource_To_v1alpha1_MyResource(in *core.MyResource, out *MyResource, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	if err := Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}

func Convert_core_MyResource_To_v1alpha1_MyResource(in *core.MyResource, out *MyResource, s conversion.Scope) error {
	return autoConvert_core_MyResource_To_v1alpha1_MyResource(in, out, s)
}

func autoConvert_v1alpha1_MyResourceList_To_core_MyResourceList(in *MyResourceList, out *core.MyResourceList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	out.Items = *(*[]core.MyResource)(unsafe.Pointer(&in.Items))
	return nil
}

func Convert_v1alpha1_MyResourceList_To_core_MyResourceList(in *MyResourceList, out *core.MyResourceList, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceList_To_core_MyResourceList(in, out, s)
}

func autoConvert_core_MyResourceList_To_v1alpha1_MyResourceList(in *core.MyResourceList, out *MyResourceList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	out.Items = *(*[]MyResource)(unsafe.Pointer(&in.Items))
	return nil
}

func Convert_core_MyResourceList_To_v1alpha1_MyResourceList(in *core.MyResourceList, out *MyResourceList, s conversion.Scope) error {
	return autoConvert_core_MyResourceList_To_v1alpha1_MyResourceList(in, out, s)
}

func autoConvert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(in *MyResourceSpec, out *core.MyResourceSpec, s conversion.Scope) error {
	out.Needs = in.Needs
	return nil
}

func Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(in *MyResourceSpec, out *core.MyResourceSpec, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(in, out, s)
}

func autoConvert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(in *core.MyResourceSpec, out *MyResourceSpec, s conversion.Scope) error {
	out.Needs = in.Needs
	return nil
}

func Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(in *core.MyResourceSpec, out *MyResourceSpec, s conversion.Scope) error {
	return autoConvert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(in, out, s)
}

func autoConvert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(in *MyResourceStatus, out *core.MyResourceStatus, s conversion.Scope) error {
	out.Alloc = in.Alloc
	return nil
}

func Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(in *MyResourceStatus, out *core.MyResourceStatus, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(in, out, s)
}

func autoConvert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(in *core.MyResourceStatus, out *MyResourceStatus, s conversion.Scope) error {
	out.Alloc = in.Alloc
	return nil
}

func Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(in *core.MyResourceStatus, out *MyResourceStatus, s conversion.Scope) error {
	return autoConvert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(in, out, s)
}

func autoConvert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy(in *MyResourceStatusStrategy, out *core.MyResourceStatusStrategy, s conversion.Scope) error {
	out.DefaultStatusStorageStrategy = in.DefaultStatusStorageStrategy
	return nil
}

func Convert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy(in *MyResourceStatusStrategy, out *core.MyResourceStatusStrategy, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy(in, out, s)
}

func autoConvert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy(in *core.MyResourceStatusStrategy, out *MyResourceStatusStrategy, s conversion.Scope) error {
	out.DefaultStatusStorageStrategy = in.DefaultStatusStorageStrategy
	return nil
}

func Convert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy(in *core.MyResourceStatusStrategy, out *MyResourceStatusStrategy, s conversion.Scope) error {
	return autoConvert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy(in, out, s)
}

func autoConvert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy(in *MyResourceStrategy, out *core.MyResourceStrategy, s conversion.Scope) error {
	out.DefaultStorageStrategy = in.DefaultStorageStrategy
	return nil
}

func Convert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy(in *MyResourceStrategy, out *core.MyResourceStrategy, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy(in, out, s)
}

func autoConvert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy(in *core.MyResourceStrategy, out *MyResourceStrategy, s conversion.Scope) error {
	out.DefaultStorageStrategy = in.DefaultStorageStrategy
	return nil
}

func Convert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy(in *core.MyResourceStrategy, out *MyResourceStrategy, s conversion.Scope) error {
	return autoConvert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy(in, out, s)
}
// +build !ignore_autogenerated

/*
   Copyright 2018 The HAWQ Team.
*/

// This file was autogenerated by conversion-gen. Do not edit it manually!

package v1alpha1

import (
	core "github.com/hawq-cn/apiserver-example/pkg/apis/core"
	conversion "k8s.io/apimachinery/pkg/conversion"
	runtime "k8s.io/apimachinery/pkg/runtime"
	unsafe "unsafe"
)

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

// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
	return scheme.AddGeneratedConversionFuncs(
		Convert_v1alpha1_MyResource_To_core_MyResource,
		Convert_core_MyResource_To_v1alpha1_MyResource,
		Convert_v1alpha1_MyResourceList_To_core_MyResourceList,
		Convert_core_MyResourceList_To_v1alpha1_MyResourceList,
		Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec,
		Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec,
		Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus,
		Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus,
		Convert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy,
		Convert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy,
		Convert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy,
		Convert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy,
	)
}

func autoConvert_v1alpha1_MyResource_To_core_MyResource(in *MyResource, out *core.MyResource, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	if err := Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}

// Convert_v1alpha1_MyResource_To_core_MyResource is an autogenerated conversion function.
func Convert_v1alpha1_MyResource_To_core_MyResource(in *MyResource, out *core.MyResource, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResource_To_core_MyResource(in, out, s)
}

func autoConvert_core_MyResource_To_v1alpha1_MyResource(in *core.MyResource, out *MyResource, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	if err := Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	if err := Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(&in.Status, &out.Status, s); err != nil {
		return err
	}
	return nil
}

// Convert_core_MyResource_To_v1alpha1_MyResource is an autogenerated conversion function.
func Convert_core_MyResource_To_v1alpha1_MyResource(in *core.MyResource, out *MyResource, s conversion.Scope) error {
	return autoConvert_core_MyResource_To_v1alpha1_MyResource(in, out, s)
}

func autoConvert_v1alpha1_MyResourceList_To_core_MyResourceList(in *MyResourceList, out *core.MyResourceList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	out.Items = *(*[]core.MyResource)(unsafe.Pointer(&in.Items))
	return nil
}

// Convert_v1alpha1_MyResourceList_To_core_MyResourceList is an autogenerated conversion function.
func Convert_v1alpha1_MyResourceList_To_core_MyResourceList(in *MyResourceList, out *core.MyResourceList, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceList_To_core_MyResourceList(in, out, s)
}

func autoConvert_core_MyResourceList_To_v1alpha1_MyResourceList(in *core.MyResourceList, out *MyResourceList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	out.Items = *(*[]MyResource)(unsafe.Pointer(&in.Items))
	return nil
}

// Convert_core_MyResourceList_To_v1alpha1_MyResourceList is an autogenerated conversion function.
func Convert_core_MyResourceList_To_v1alpha1_MyResourceList(in *core.MyResourceList, out *MyResourceList, s conversion.Scope) error {
	return autoConvert_core_MyResourceList_To_v1alpha1_MyResourceList(in, out, s)
}

func autoConvert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(in *MyResourceSpec, out *core.MyResourceSpec, s conversion.Scope) error {
	out.Needs = in.Needs
	return nil
}

// Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec is an autogenerated conversion function.
func Convert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(in *MyResourceSpec, out *core.MyResourceSpec, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceSpec_To_core_MyResourceSpec(in, out, s)
}

func autoConvert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(in *core.MyResourceSpec, out *MyResourceSpec, s conversion.Scope) error {
	out.Needs = in.Needs
	return nil
}

// Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec is an autogenerated conversion function.
func Convert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(in *core.MyResourceSpec, out *MyResourceSpec, s conversion.Scope) error {
	return autoConvert_core_MyResourceSpec_To_v1alpha1_MyResourceSpec(in, out, s)
}

func autoConvert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(in *MyResourceStatus, out *core.MyResourceStatus, s conversion.Scope) error {
	out.Alloc = in.Alloc
	return nil
}

// Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus is an autogenerated conversion function.
func Convert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(in *MyResourceStatus, out *core.MyResourceStatus, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceStatus_To_core_MyResourceStatus(in, out, s)
}

func autoConvert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(in *core.MyResourceStatus, out *MyResourceStatus, s conversion.Scope) error {
	out.Alloc = in.Alloc
	return nil
}

// Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus is an autogenerated conversion function.
func Convert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(in *core.MyResourceStatus, out *MyResourceStatus, s conversion.Scope) error {
	return autoConvert_core_MyResourceStatus_To_v1alpha1_MyResourceStatus(in, out, s)
}

func autoConvert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy(in *MyResourceStatusStrategy, out *core.MyResourceStatusStrategy, s conversion.Scope) error {
	out.DefaultStatusStorageStrategy = in.DefaultStatusStorageStrategy
	return nil
}

// Convert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy is an autogenerated conversion function.
func Convert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy(in *MyResourceStatusStrategy, out *core.MyResourceStatusStrategy, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceStatusStrategy_To_core_MyResourceStatusStrategy(in, out, s)
}

func autoConvert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy(in *core.MyResourceStatusStrategy, out *MyResourceStatusStrategy, s conversion.Scope) error {
	out.DefaultStatusStorageStrategy = in.DefaultStatusStorageStrategy
	return nil
}

// Convert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy is an autogenerated conversion function.
func Convert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy(in *core.MyResourceStatusStrategy, out *MyResourceStatusStrategy, s conversion.Scope) error {
	return autoConvert_core_MyResourceStatusStrategy_To_v1alpha1_MyResourceStatusStrategy(in, out, s)
}

func autoConvert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy(in *MyResourceStrategy, out *core.MyResourceStrategy, s conversion.Scope) error {
	out.DefaultStorageStrategy = in.DefaultStorageStrategy
	return nil
}

// Convert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy is an autogenerated conversion function.
func Convert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy(in *MyResourceStrategy, out *core.MyResourceStrategy, s conversion.Scope) error {
	return autoConvert_v1alpha1_MyResourceStrategy_To_core_MyResourceStrategy(in, out, s)
}

func autoConvert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy(in *core.MyResourceStrategy, out *MyResourceStrategy, s conversion.Scope) error {
	out.DefaultStorageStrategy = in.DefaultStorageStrategy
	return nil
}

// Convert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy is an autogenerated conversion function.
func Convert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy(in *core.MyResourceStrategy, out *MyResourceStrategy, s conversion.Scope) error {
	return autoConvert_core_MyResourceStrategy_To_v1alpha1_MyResourceStrategy(in, out, s)
}
