sigs.k8s.io/kueue@v0.6.2/apis/visibility/v1alpha1/zz_generated.conversion.go (about)

     1  //go:build !ignore_autogenerated
     2  // +build !ignore_autogenerated
     3  
     4  /*
     5  Copyright The Kubernetes Authors.
     6  
     7  Licensed under the Apache License, Version 2.0 (the "License");
     8  you may not use this file except in compliance with the License.
     9  You may obtain a copy of the License at
    10  
    11      http://www.apache.org/licenses/LICENSE-2.0
    12  
    13  Unless required by applicable law or agreed to in writing, software
    14  distributed under the License is distributed on an "AS IS" BASIS,
    15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  See the License for the specific language governing permissions and
    17  limitations under the License.
    18  */
    19  // Code generated by conversion-gen. DO NOT EDIT.
    20  
    21  package v1alpha1
    22  
    23  import (
    24  	url "net/url"
    25  
    26  	conversion "k8s.io/apimachinery/pkg/conversion"
    27  	runtime "k8s.io/apimachinery/pkg/runtime"
    28  )
    29  
    30  func init() {
    31  	localSchemeBuilder.Register(RegisterConversions)
    32  }
    33  
    34  // RegisterConversions adds conversion functions to the given scheme.
    35  // Public to allow building arbitrary schemes.
    36  func RegisterConversions(s *runtime.Scheme) error {
    37  	if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*PendingWorkloadOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
    38  		return Convert_url_Values_To_v1alpha1_PendingWorkloadOptions(a.(*url.Values), b.(*PendingWorkloadOptions), scope)
    39  	}); err != nil {
    40  		return err
    41  	}
    42  	return nil
    43  }
    44  
    45  func autoConvert_url_Values_To_v1alpha1_PendingWorkloadOptions(in *url.Values, out *PendingWorkloadOptions, s conversion.Scope) error {
    46  	// WARNING: Field TypeMeta does not have json tag, skipping.
    47  
    48  	if values, ok := map[string][]string(*in)["offset"]; ok && len(values) > 0 {
    49  		if err := runtime.Convert_Slice_string_To_int64(&values, &out.Offset, s); err != nil {
    50  			return err
    51  		}
    52  	} else {
    53  		out.Offset = 0
    54  	}
    55  	if values, ok := map[string][]string(*in)["limit"]; ok && len(values) > 0 {
    56  		if err := runtime.Convert_Slice_string_To_int64(&values, &out.Limit, s); err != nil {
    57  			return err
    58  		}
    59  	} else {
    60  		out.Limit = 0
    61  	}
    62  	return nil
    63  }
    64  
    65  // Convert_url_Values_To_v1alpha1_PendingWorkloadOptions is an autogenerated conversion function.
    66  func Convert_url_Values_To_v1alpha1_PendingWorkloadOptions(in *url.Values, out *PendingWorkloadOptions, s conversion.Scope) error {
    67  	return autoConvert_url_Values_To_v1alpha1_PendingWorkloadOptions(in, out, s)
    68  }