// +build !ignore_autogenerated_openshift

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

package v1

import (
	api "github.com/openshift/origin/pkg/sdn/api"
	api_v1 "k8s.io/kubernetes/pkg/api/v1"
	conversion "k8s.io/kubernetes/pkg/conversion"
	runtime "k8s.io/kubernetes/pkg/runtime"
	unsafe "unsafe"
)

func init() {
	SchemeBuilder.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_v1_ClusterNetwork_To_api_ClusterNetwork,
		Convert_api_ClusterNetwork_To_v1_ClusterNetwork,
		Convert_v1_ClusterNetworkList_To_api_ClusterNetworkList,
		Convert_api_ClusterNetworkList_To_v1_ClusterNetworkList,
		Convert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy,
		Convert_api_EgressNetworkPolicy_To_v1_EgressNetworkPolicy,
		Convert_v1_EgressNetworkPolicyList_To_api_EgressNetworkPolicyList,
		Convert_api_EgressNetworkPolicyList_To_v1_EgressNetworkPolicyList,
		Convert_v1_EgressNetworkPolicyPeer_To_api_EgressNetworkPolicyPeer,
		Convert_api_EgressNetworkPolicyPeer_To_v1_EgressNetworkPolicyPeer,
		Convert_v1_EgressNetworkPolicyRule_To_api_EgressNetworkPolicyRule,
		Convert_api_EgressNetworkPolicyRule_To_v1_EgressNetworkPolicyRule,
		Convert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec,
		Convert_api_EgressNetworkPolicySpec_To_v1_EgressNetworkPolicySpec,
		Convert_v1_HostSubnet_To_api_HostSubnet,
		Convert_api_HostSubnet_To_v1_HostSubnet,
		Convert_v1_HostSubnetList_To_api_HostSubnetList,
		Convert_api_HostSubnetList_To_v1_HostSubnetList,
		Convert_v1_NetNamespace_To_api_NetNamespace,
		Convert_api_NetNamespace_To_v1_NetNamespace,
		Convert_v1_NetNamespaceList_To_api_NetNamespaceList,
		Convert_api_NetNamespaceList_To_v1_NetNamespaceList,
	)
}

func autoConvert_v1_ClusterNetwork_To_api_ClusterNetwork(in *ClusterNetwork, out *api.ClusterNetwork, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Network = in.Network
	out.HostSubnetLength = in.HostSubnetLength
	out.ServiceNetwork = in.ServiceNetwork
	out.PluginName = in.PluginName
	return nil
}

func Convert_v1_ClusterNetwork_To_api_ClusterNetwork(in *ClusterNetwork, out *api.ClusterNetwork, s conversion.Scope) error {
	return autoConvert_v1_ClusterNetwork_To_api_ClusterNetwork(in, out, s)
}

func autoConvert_api_ClusterNetwork_To_v1_ClusterNetwork(in *api.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Network = in.Network
	out.HostSubnetLength = in.HostSubnetLength
	out.ServiceNetwork = in.ServiceNetwork
	out.PluginName = in.PluginName
	return nil
}

func Convert_api_ClusterNetwork_To_v1_ClusterNetwork(in *api.ClusterNetwork, out *ClusterNetwork, s conversion.Scope) error {
	return autoConvert_api_ClusterNetwork_To_v1_ClusterNetwork(in, out, s)
}

func autoConvert_v1_ClusterNetworkList_To_api_ClusterNetworkList(in *ClusterNetworkList, out *api.ClusterNetworkList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]api.ClusterNetwork, len(*in))
		for i := range *in {
			if err := Convert_v1_ClusterNetwork_To_api_ClusterNetwork(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_v1_ClusterNetworkList_To_api_ClusterNetworkList(in *ClusterNetworkList, out *api.ClusterNetworkList, s conversion.Scope) error {
	return autoConvert_v1_ClusterNetworkList_To_api_ClusterNetworkList(in, out, s)
}

func autoConvert_api_ClusterNetworkList_To_v1_ClusterNetworkList(in *api.ClusterNetworkList, out *ClusterNetworkList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]ClusterNetwork, len(*in))
		for i := range *in {
			if err := Convert_api_ClusterNetwork_To_v1_ClusterNetwork(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_api_ClusterNetworkList_To_v1_ClusterNetworkList(in *api.ClusterNetworkList, out *ClusterNetworkList, s conversion.Scope) error {
	return autoConvert_api_ClusterNetworkList_To_v1_ClusterNetworkList(in, out, s)
}

func autoConvert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy(in *EgressNetworkPolicy, out *api.EgressNetworkPolicy, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	return nil
}

func Convert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy(in *EgressNetworkPolicy, out *api.EgressNetworkPolicy, s conversion.Scope) error {
	return autoConvert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy(in, out, s)
}

func autoConvert_api_EgressNetworkPolicy_To_v1_EgressNetworkPolicy(in *api.EgressNetworkPolicy, out *EgressNetworkPolicy, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	if err := Convert_api_EgressNetworkPolicySpec_To_v1_EgressNetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
		return err
	}
	return nil
}

func Convert_api_EgressNetworkPolicy_To_v1_EgressNetworkPolicy(in *api.EgressNetworkPolicy, out *EgressNetworkPolicy, s conversion.Scope) error {
	return autoConvert_api_EgressNetworkPolicy_To_v1_EgressNetworkPolicy(in, out, s)
}

func autoConvert_v1_EgressNetworkPolicyList_To_api_EgressNetworkPolicyList(in *EgressNetworkPolicyList, out *api.EgressNetworkPolicyList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]api.EgressNetworkPolicy, len(*in))
		for i := range *in {
			if err := Convert_v1_EgressNetworkPolicy_To_api_EgressNetworkPolicy(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_v1_EgressNetworkPolicyList_To_api_EgressNetworkPolicyList(in *EgressNetworkPolicyList, out *api.EgressNetworkPolicyList, s conversion.Scope) error {
	return autoConvert_v1_EgressNetworkPolicyList_To_api_EgressNetworkPolicyList(in, out, s)
}

func autoConvert_api_EgressNetworkPolicyList_To_v1_EgressNetworkPolicyList(in *api.EgressNetworkPolicyList, out *EgressNetworkPolicyList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]EgressNetworkPolicy, len(*in))
		for i := range *in {
			if err := Convert_api_EgressNetworkPolicy_To_v1_EgressNetworkPolicy(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_api_EgressNetworkPolicyList_To_v1_EgressNetworkPolicyList(in *api.EgressNetworkPolicyList, out *EgressNetworkPolicyList, s conversion.Scope) error {
	return autoConvert_api_EgressNetworkPolicyList_To_v1_EgressNetworkPolicyList(in, out, s)
}

func autoConvert_v1_EgressNetworkPolicyPeer_To_api_EgressNetworkPolicyPeer(in *EgressNetworkPolicyPeer, out *api.EgressNetworkPolicyPeer, s conversion.Scope) error {
	out.CIDRSelector = in.CIDRSelector
	return nil
}

func Convert_v1_EgressNetworkPolicyPeer_To_api_EgressNetworkPolicyPeer(in *EgressNetworkPolicyPeer, out *api.EgressNetworkPolicyPeer, s conversion.Scope) error {
	return autoConvert_v1_EgressNetworkPolicyPeer_To_api_EgressNetworkPolicyPeer(in, out, s)
}

func autoConvert_api_EgressNetworkPolicyPeer_To_v1_EgressNetworkPolicyPeer(in *api.EgressNetworkPolicyPeer, out *EgressNetworkPolicyPeer, s conversion.Scope) error {
	out.CIDRSelector = in.CIDRSelector
	return nil
}

func Convert_api_EgressNetworkPolicyPeer_To_v1_EgressNetworkPolicyPeer(in *api.EgressNetworkPolicyPeer, out *EgressNetworkPolicyPeer, s conversion.Scope) error {
	return autoConvert_api_EgressNetworkPolicyPeer_To_v1_EgressNetworkPolicyPeer(in, out, s)
}

func autoConvert_v1_EgressNetworkPolicyRule_To_api_EgressNetworkPolicyRule(in *EgressNetworkPolicyRule, out *api.EgressNetworkPolicyRule, s conversion.Scope) error {
	out.Type = api.EgressNetworkPolicyRuleType(in.Type)
	if err := Convert_v1_EgressNetworkPolicyPeer_To_api_EgressNetworkPolicyPeer(&in.To, &out.To, s); err != nil {
		return err
	}
	return nil
}

func Convert_v1_EgressNetworkPolicyRule_To_api_EgressNetworkPolicyRule(in *EgressNetworkPolicyRule, out *api.EgressNetworkPolicyRule, s conversion.Scope) error {
	return autoConvert_v1_EgressNetworkPolicyRule_To_api_EgressNetworkPolicyRule(in, out, s)
}

func autoConvert_api_EgressNetworkPolicyRule_To_v1_EgressNetworkPolicyRule(in *api.EgressNetworkPolicyRule, out *EgressNetworkPolicyRule, s conversion.Scope) error {
	out.Type = EgressNetworkPolicyRuleType(in.Type)
	if err := Convert_api_EgressNetworkPolicyPeer_To_v1_EgressNetworkPolicyPeer(&in.To, &out.To, s); err != nil {
		return err
	}
	return nil
}

func Convert_api_EgressNetworkPolicyRule_To_v1_EgressNetworkPolicyRule(in *api.EgressNetworkPolicyRule, out *EgressNetworkPolicyRule, s conversion.Scope) error {
	return autoConvert_api_EgressNetworkPolicyRule_To_v1_EgressNetworkPolicyRule(in, out, s)
}

func autoConvert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(in *EgressNetworkPolicySpec, out *api.EgressNetworkPolicySpec, s conversion.Scope) error {
	out.Egress = *(*[]api.EgressNetworkPolicyRule)(unsafe.Pointer(&in.Egress))
	return nil
}

func Convert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(in *EgressNetworkPolicySpec, out *api.EgressNetworkPolicySpec, s conversion.Scope) error {
	return autoConvert_v1_EgressNetworkPolicySpec_To_api_EgressNetworkPolicySpec(in, out, s)
}

func autoConvert_api_EgressNetworkPolicySpec_To_v1_EgressNetworkPolicySpec(in *api.EgressNetworkPolicySpec, out *EgressNetworkPolicySpec, s conversion.Scope) error {
	out.Egress = *(*[]EgressNetworkPolicyRule)(unsafe.Pointer(&in.Egress))
	return nil
}

func Convert_api_EgressNetworkPolicySpec_To_v1_EgressNetworkPolicySpec(in *api.EgressNetworkPolicySpec, out *EgressNetworkPolicySpec, s conversion.Scope) error {
	return autoConvert_api_EgressNetworkPolicySpec_To_v1_EgressNetworkPolicySpec(in, out, s)
}

func autoConvert_v1_HostSubnet_To_api_HostSubnet(in *HostSubnet, out *api.HostSubnet, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Host = in.Host
	out.HostIP = in.HostIP
	out.Subnet = in.Subnet
	return nil
}

func Convert_v1_HostSubnet_To_api_HostSubnet(in *HostSubnet, out *api.HostSubnet, s conversion.Scope) error {
	return autoConvert_v1_HostSubnet_To_api_HostSubnet(in, out, s)
}

func autoConvert_api_HostSubnet_To_v1_HostSubnet(in *api.HostSubnet, out *HostSubnet, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.Host = in.Host
	out.HostIP = in.HostIP
	out.Subnet = in.Subnet
	return nil
}

func Convert_api_HostSubnet_To_v1_HostSubnet(in *api.HostSubnet, out *HostSubnet, s conversion.Scope) error {
	return autoConvert_api_HostSubnet_To_v1_HostSubnet(in, out, s)
}

func autoConvert_v1_HostSubnetList_To_api_HostSubnetList(in *HostSubnetList, out *api.HostSubnetList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]api.HostSubnet, len(*in))
		for i := range *in {
			if err := Convert_v1_HostSubnet_To_api_HostSubnet(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_v1_HostSubnetList_To_api_HostSubnetList(in *HostSubnetList, out *api.HostSubnetList, s conversion.Scope) error {
	return autoConvert_v1_HostSubnetList_To_api_HostSubnetList(in, out, s)
}

func autoConvert_api_HostSubnetList_To_v1_HostSubnetList(in *api.HostSubnetList, out *HostSubnetList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]HostSubnet, len(*in))
		for i := range *in {
			if err := Convert_api_HostSubnet_To_v1_HostSubnet(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_api_HostSubnetList_To_v1_HostSubnetList(in *api.HostSubnetList, out *HostSubnetList, s conversion.Scope) error {
	return autoConvert_api_HostSubnetList_To_v1_HostSubnetList(in, out, s)
}

func autoConvert_v1_NetNamespace_To_api_NetNamespace(in *NetNamespace, out *api.NetNamespace, s conversion.Scope) error {
	if err := api_v1.Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.NetName = in.NetName
	out.NetID = in.NetID
	return nil
}

func Convert_v1_NetNamespace_To_api_NetNamespace(in *NetNamespace, out *api.NetNamespace, s conversion.Scope) error {
	return autoConvert_v1_NetNamespace_To_api_NetNamespace(in, out, s)
}

func autoConvert_api_NetNamespace_To_v1_NetNamespace(in *api.NetNamespace, out *NetNamespace, s conversion.Scope) error {
	if err := api_v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
		return err
	}
	out.NetName = in.NetName
	out.NetID = in.NetID
	return nil
}

func Convert_api_NetNamespace_To_v1_NetNamespace(in *api.NetNamespace, out *NetNamespace, s conversion.Scope) error {
	return autoConvert_api_NetNamespace_To_v1_NetNamespace(in, out, s)
}

func autoConvert_v1_NetNamespaceList_To_api_NetNamespaceList(in *NetNamespaceList, out *api.NetNamespaceList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]api.NetNamespace, len(*in))
		for i := range *in {
			if err := Convert_v1_NetNamespace_To_api_NetNamespace(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_v1_NetNamespaceList_To_api_NetNamespaceList(in *NetNamespaceList, out *api.NetNamespaceList, s conversion.Scope) error {
	return autoConvert_v1_NetNamespaceList_To_api_NetNamespaceList(in, out, s)
}

func autoConvert_api_NetNamespaceList_To_v1_NetNamespaceList(in *api.NetNamespaceList, out *NetNamespaceList, s conversion.Scope) error {
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]NetNamespace, len(*in))
		for i := range *in {
			if err := Convert_api_NetNamespace_To_v1_NetNamespace(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Items = nil
	}
	return nil
}

func Convert_api_NetNamespaceList_To_v1_NetNamespaceList(in *api.NetNamespaceList, out *NetNamespaceList, s conversion.Scope) error {
	return autoConvert_api_NetNamespaceList_To_v1_NetNamespaceList(in, out, s)
}
