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

/*
Copyright The Clusternet 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 (
	url "net/url"

	proxies "github.com/clusternet/clusternet/pkg/apis/proxies"
	conversion "k8s.io/apimachinery/pkg/conversion"
	runtime "k8s.io/apimachinery/pkg/runtime"
)

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((*Socket)(nil), (*proxies.Socket)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_v1alpha1_Socket_To_proxies_Socket(a.(*Socket), b.(*proxies.Socket), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*proxies.Socket)(nil), (*Socket)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_proxies_Socket_To_v1alpha1_Socket(a.(*proxies.Socket), b.(*Socket), scope)
	}); err != nil {
		return err
	}
	if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*Socket)(nil), func(a, b interface{}, scope conversion.Scope) error {
		return Convert_url_Values_To_v1alpha1_Socket(a.(*url.Values), b.(*Socket), scope)
	}); err != nil {
		return err
	}
	return nil
}

func autoConvert_v1alpha1_Socket_To_proxies_Socket(in *Socket, out *proxies.Socket, s conversion.Scope) error {
	out.Path = in.Path
	return nil
}

// Convert_v1alpha1_Socket_To_proxies_Socket is an autogenerated conversion function.
func Convert_v1alpha1_Socket_To_proxies_Socket(in *Socket, out *proxies.Socket, s conversion.Scope) error {
	return autoConvert_v1alpha1_Socket_To_proxies_Socket(in, out, s)
}

func autoConvert_proxies_Socket_To_v1alpha1_Socket(in *proxies.Socket, out *Socket, s conversion.Scope) error {
	out.Path = in.Path
	return nil
}

// Convert_proxies_Socket_To_v1alpha1_Socket is an autogenerated conversion function.
func Convert_proxies_Socket_To_v1alpha1_Socket(in *proxies.Socket, out *Socket, s conversion.Scope) error {
	return autoConvert_proxies_Socket_To_v1alpha1_Socket(in, out, s)
}

func autoConvert_url_Values_To_v1alpha1_Socket(in *url.Values, out *Socket, s conversion.Scope) error {
	// WARNING: Field TypeMeta does not have json tag, skipping.

	if values, ok := map[string][]string(*in)["path"]; ok && len(values) > 0 {
		if err := runtime.Convert_Slice_string_To_string(&values, &out.Path, s); err != nil {
			return err
		}
	} else {
		out.Path = ""
	}
	return nil
}

// Convert_url_Values_To_v1alpha1_Socket is an autogenerated conversion function.
func Convert_url_Values_To_v1alpha1_Socket(in *url.Values, out *Socket, s conversion.Scope) error {
	return autoConvert_url_Values_To_v1alpha1_Socket(in, out, s)
}
