sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/kueue/v1beta1/localqueuestatus.go (about)

     1  /*
     2  Copyright The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  // Code generated by applyconfiguration-gen. DO NOT EDIT.
    17  
    18  package v1beta1
    19  
    20  import (
    21  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    22  )
    23  
    24  // LocalQueueStatusApplyConfiguration represents an declarative configuration of the LocalQueueStatus type for use
    25  // with apply.
    26  type LocalQueueStatusApplyConfiguration struct {
    27  	PendingWorkloads   *int32                                    `json:"pendingWorkloads,omitempty"`
    28  	ReservingWorkloads *int32                                    `json:"reservingWorkloads,omitempty"`
    29  	AdmittedWorkloads  *int32                                    `json:"admittedWorkloads,omitempty"`
    30  	Conditions         []v1.Condition                            `json:"conditions,omitempty"`
    31  	FlavorsReservation []LocalQueueFlavorUsageApplyConfiguration `json:"flavorsReservation,omitempty"`
    32  	FlavorUsage        []LocalQueueFlavorUsageApplyConfiguration `json:"flavorUsage,omitempty"`
    33  }
    34  
    35  // LocalQueueStatusApplyConfiguration constructs an declarative configuration of the LocalQueueStatus type for use with
    36  // apply.
    37  func LocalQueueStatus() *LocalQueueStatusApplyConfiguration {
    38  	return &LocalQueueStatusApplyConfiguration{}
    39  }
    40  
    41  // WithPendingWorkloads sets the PendingWorkloads field in the declarative configuration to the given value
    42  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    43  // If called multiple times, the PendingWorkloads field is set to the value of the last call.
    44  func (b *LocalQueueStatusApplyConfiguration) WithPendingWorkloads(value int32) *LocalQueueStatusApplyConfiguration {
    45  	b.PendingWorkloads = &value
    46  	return b
    47  }
    48  
    49  // WithReservingWorkloads sets the ReservingWorkloads field in the declarative configuration to the given value
    50  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    51  // If called multiple times, the ReservingWorkloads field is set to the value of the last call.
    52  func (b *LocalQueueStatusApplyConfiguration) WithReservingWorkloads(value int32) *LocalQueueStatusApplyConfiguration {
    53  	b.ReservingWorkloads = &value
    54  	return b
    55  }
    56  
    57  // WithAdmittedWorkloads sets the AdmittedWorkloads field in the declarative configuration to the given value
    58  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    59  // If called multiple times, the AdmittedWorkloads field is set to the value of the last call.
    60  func (b *LocalQueueStatusApplyConfiguration) WithAdmittedWorkloads(value int32) *LocalQueueStatusApplyConfiguration {
    61  	b.AdmittedWorkloads = &value
    62  	return b
    63  }
    64  
    65  // WithConditions adds the given value to the Conditions field in the declarative configuration
    66  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    67  // If called multiple times, values provided by each call will be appended to the Conditions field.
    68  func (b *LocalQueueStatusApplyConfiguration) WithConditions(values ...v1.Condition) *LocalQueueStatusApplyConfiguration {
    69  	for i := range values {
    70  		b.Conditions = append(b.Conditions, values[i])
    71  	}
    72  	return b
    73  }
    74  
    75  // WithFlavorsReservation adds the given value to the FlavorsReservation field in the declarative configuration
    76  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    77  // If called multiple times, values provided by each call will be appended to the FlavorsReservation field.
    78  func (b *LocalQueueStatusApplyConfiguration) WithFlavorsReservation(values ...*LocalQueueFlavorUsageApplyConfiguration) *LocalQueueStatusApplyConfiguration {
    79  	for i := range values {
    80  		if values[i] == nil {
    81  			panic("nil value passed to WithFlavorsReservation")
    82  		}
    83  		b.FlavorsReservation = append(b.FlavorsReservation, *values[i])
    84  	}
    85  	return b
    86  }
    87  
    88  // WithFlavorUsage adds the given value to the FlavorUsage field in the declarative configuration
    89  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    90  // If called multiple times, values provided by each call will be appended to the FlavorUsage field.
    91  func (b *LocalQueueStatusApplyConfiguration) WithFlavorUsage(values ...*LocalQueueFlavorUsageApplyConfiguration) *LocalQueueStatusApplyConfiguration {
    92  	for i := range values {
    93  		if values[i] == nil {
    94  			panic("nil value passed to WithFlavorUsage")
    95  		}
    96  		b.FlavorUsage = append(b.FlavorUsage, *values[i])
    97  	}
    98  	return b
    99  }