sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/kueue/v1beta1/workloadstatus.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 // WorkloadStatusApplyConfiguration represents an declarative configuration of the WorkloadStatus type for use 25 // with apply. 26 type WorkloadStatusApplyConfiguration struct { 27 Admission *AdmissionApplyConfiguration `json:"admission,omitempty"` 28 RequeueState *RequeueStateApplyConfiguration `json:"requeueState,omitempty"` 29 Conditions []v1.Condition `json:"conditions,omitempty"` 30 ReclaimablePods []ReclaimablePodApplyConfiguration `json:"reclaimablePods,omitempty"` 31 AdmissionChecks []AdmissionCheckStateApplyConfiguration `json:"admissionChecks,omitempty"` 32 } 33 34 // WorkloadStatusApplyConfiguration constructs an declarative configuration of the WorkloadStatus type for use with 35 // apply. 36 func WorkloadStatus() *WorkloadStatusApplyConfiguration { 37 return &WorkloadStatusApplyConfiguration{} 38 } 39 40 // WithAdmission sets the Admission field in the declarative configuration to the given value 41 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 42 // If called multiple times, the Admission field is set to the value of the last call. 43 func (b *WorkloadStatusApplyConfiguration) WithAdmission(value *AdmissionApplyConfiguration) *WorkloadStatusApplyConfiguration { 44 b.Admission = value 45 return b 46 } 47 48 // WithRequeueState sets the RequeueState field in the declarative configuration to the given value 49 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 50 // If called multiple times, the RequeueState field is set to the value of the last call. 51 func (b *WorkloadStatusApplyConfiguration) WithRequeueState(value *RequeueStateApplyConfiguration) *WorkloadStatusApplyConfiguration { 52 b.RequeueState = value 53 return b 54 } 55 56 // WithConditions adds the given value to the Conditions field in the declarative configuration 57 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 58 // If called multiple times, values provided by each call will be appended to the Conditions field. 59 func (b *WorkloadStatusApplyConfiguration) WithConditions(values ...v1.Condition) *WorkloadStatusApplyConfiguration { 60 for i := range values { 61 b.Conditions = append(b.Conditions, values[i]) 62 } 63 return b 64 } 65 66 // WithReclaimablePods adds the given value to the ReclaimablePods field in the declarative configuration 67 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 68 // If called multiple times, values provided by each call will be appended to the ReclaimablePods field. 69 func (b *WorkloadStatusApplyConfiguration) WithReclaimablePods(values ...*ReclaimablePodApplyConfiguration) *WorkloadStatusApplyConfiguration { 70 for i := range values { 71 if values[i] == nil { 72 panic("nil value passed to WithReclaimablePods") 73 } 74 b.ReclaimablePods = append(b.ReclaimablePods, *values[i]) 75 } 76 return b 77 } 78 79 // WithAdmissionChecks adds the given value to the AdmissionChecks field in the declarative configuration 80 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 81 // If called multiple times, values provided by each call will be appended to the AdmissionChecks field. 82 func (b *WorkloadStatusApplyConfiguration) WithAdmissionChecks(values ...*AdmissionCheckStateApplyConfiguration) *WorkloadStatusApplyConfiguration { 83 for i := range values { 84 if values[i] == nil { 85 panic("nil value passed to WithAdmissionChecks") 86 } 87 b.AdmissionChecks = append(b.AdmissionChecks, *values[i]) 88 } 89 return b 90 }