sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/kueue/v1beta1/clusterqueuepreemption.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 v1beta1 "sigs.k8s.io/kueue/apis/kueue/v1beta1" 22 ) 23 24 // ClusterQueuePreemptionApplyConfiguration represents an declarative configuration of the ClusterQueuePreemption type for use 25 // with apply. 26 type ClusterQueuePreemptionApplyConfiguration struct { 27 ReclaimWithinCohort *v1beta1.PreemptionPolicy `json:"reclaimWithinCohort,omitempty"` 28 BorrowWithinCohort *BorrowWithinCohortApplyConfiguration `json:"borrowWithinCohort,omitempty"` 29 WithinClusterQueue *v1beta1.PreemptionPolicy `json:"withinClusterQueue,omitempty"` 30 } 31 32 // ClusterQueuePreemptionApplyConfiguration constructs an declarative configuration of the ClusterQueuePreemption type for use with 33 // apply. 34 func ClusterQueuePreemption() *ClusterQueuePreemptionApplyConfiguration { 35 return &ClusterQueuePreemptionApplyConfiguration{} 36 } 37 38 // WithReclaimWithinCohort sets the ReclaimWithinCohort field in the declarative configuration to the given value 39 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 40 // If called multiple times, the ReclaimWithinCohort field is set to the value of the last call. 41 func (b *ClusterQueuePreemptionApplyConfiguration) WithReclaimWithinCohort(value v1beta1.PreemptionPolicy) *ClusterQueuePreemptionApplyConfiguration { 42 b.ReclaimWithinCohort = &value 43 return b 44 } 45 46 // WithBorrowWithinCohort sets the BorrowWithinCohort field in the declarative configuration to the given value 47 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 48 // If called multiple times, the BorrowWithinCohort field is set to the value of the last call. 49 func (b *ClusterQueuePreemptionApplyConfiguration) WithBorrowWithinCohort(value *BorrowWithinCohortApplyConfiguration) *ClusterQueuePreemptionApplyConfiguration { 50 b.BorrowWithinCohort = value 51 return b 52 } 53 54 // WithWithinClusterQueue sets the WithinClusterQueue field in the declarative configuration to the given value 55 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 56 // If called multiple times, the WithinClusterQueue field is set to the value of the last call. 57 func (b *ClusterQueuePreemptionApplyConfiguration) WithWithinClusterQueue(value v1beta1.PreemptionPolicy) *ClusterQueuePreemptionApplyConfiguration { 58 b.WithinClusterQueue = &value 59 return b 60 }