sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/kueue/v1beta1/clusterqueuestatus.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  // ClusterQueueStatusApplyConfiguration represents an declarative configuration of the ClusterQueueStatus type for use
    25  // with apply.
    26  type ClusterQueueStatusApplyConfiguration struct {
    27  	FlavorsReservation     []FlavorUsageApplyConfiguration                       `json:"flavorsReservation,omitempty"`
    28  	FlavorsUsage           []FlavorUsageApplyConfiguration                       `json:"flavorsUsage,omitempty"`
    29  	PendingWorkloads       *int32                                                `json:"pendingWorkloads,omitempty"`
    30  	ReservingWorkloads     *int32                                                `json:"reservingWorkloads,omitempty"`
    31  	AdmittedWorkloads      *int32                                                `json:"admittedWorkloads,omitempty"`
    32  	Conditions             []v1.Condition                                        `json:"conditions,omitempty"`
    33  	PendingWorkloadsStatus *ClusterQueuePendingWorkloadsStatusApplyConfiguration `json:"pendingWorkloadsStatus,omitempty"`
    34  }
    35  
    36  // ClusterQueueStatusApplyConfiguration constructs an declarative configuration of the ClusterQueueStatus type for use with
    37  // apply.
    38  func ClusterQueueStatus() *ClusterQueueStatusApplyConfiguration {
    39  	return &ClusterQueueStatusApplyConfiguration{}
    40  }
    41  
    42  // WithFlavorsReservation adds the given value to the FlavorsReservation field in the declarative configuration
    43  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    44  // If called multiple times, values provided by each call will be appended to the FlavorsReservation field.
    45  func (b *ClusterQueueStatusApplyConfiguration) WithFlavorsReservation(values ...*FlavorUsageApplyConfiguration) *ClusterQueueStatusApplyConfiguration {
    46  	for i := range values {
    47  		if values[i] == nil {
    48  			panic("nil value passed to WithFlavorsReservation")
    49  		}
    50  		b.FlavorsReservation = append(b.FlavorsReservation, *values[i])
    51  	}
    52  	return b
    53  }
    54  
    55  // WithFlavorsUsage adds the given value to the FlavorsUsage field in the declarative configuration
    56  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    57  // If called multiple times, values provided by each call will be appended to the FlavorsUsage field.
    58  func (b *ClusterQueueStatusApplyConfiguration) WithFlavorsUsage(values ...*FlavorUsageApplyConfiguration) *ClusterQueueStatusApplyConfiguration {
    59  	for i := range values {
    60  		if values[i] == nil {
    61  			panic("nil value passed to WithFlavorsUsage")
    62  		}
    63  		b.FlavorsUsage = append(b.FlavorsUsage, *values[i])
    64  	}
    65  	return b
    66  }
    67  
    68  // WithPendingWorkloads sets the PendingWorkloads field in the declarative configuration to the given value
    69  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    70  // If called multiple times, the PendingWorkloads field is set to the value of the last call.
    71  func (b *ClusterQueueStatusApplyConfiguration) WithPendingWorkloads(value int32) *ClusterQueueStatusApplyConfiguration {
    72  	b.PendingWorkloads = &value
    73  	return b
    74  }
    75  
    76  // WithReservingWorkloads sets the ReservingWorkloads field in the declarative configuration to the given value
    77  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    78  // If called multiple times, the ReservingWorkloads field is set to the value of the last call.
    79  func (b *ClusterQueueStatusApplyConfiguration) WithReservingWorkloads(value int32) *ClusterQueueStatusApplyConfiguration {
    80  	b.ReservingWorkloads = &value
    81  	return b
    82  }
    83  
    84  // WithAdmittedWorkloads sets the AdmittedWorkloads field in the declarative configuration to the given value
    85  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    86  // If called multiple times, the AdmittedWorkloads field is set to the value of the last call.
    87  func (b *ClusterQueueStatusApplyConfiguration) WithAdmittedWorkloads(value int32) *ClusterQueueStatusApplyConfiguration {
    88  	b.AdmittedWorkloads = &value
    89  	return b
    90  }
    91  
    92  // WithConditions adds the given value to the Conditions field in the declarative configuration
    93  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    94  // If called multiple times, values provided by each call will be appended to the Conditions field.
    95  func (b *ClusterQueueStatusApplyConfiguration) WithConditions(values ...v1.Condition) *ClusterQueueStatusApplyConfiguration {
    96  	for i := range values {
    97  		b.Conditions = append(b.Conditions, values[i])
    98  	}
    99  	return b
   100  }
   101  
   102  // WithPendingWorkloadsStatus sets the PendingWorkloadsStatus field in the declarative configuration to the given value
   103  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   104  // If called multiple times, the PendingWorkloadsStatus field is set to the value of the last call.
   105  func (b *ClusterQueueStatusApplyConfiguration) WithPendingWorkloadsStatus(value *ClusterQueuePendingWorkloadsStatusApplyConfiguration) *ClusterQueueStatusApplyConfiguration {
   106  	b.PendingWorkloadsStatus = value
   107  	return b
   108  }