sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/kueue/v1beta1/resourcegroup.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/api/core/v1" 22 ) 23 24 // ResourceGroupApplyConfiguration represents an declarative configuration of the ResourceGroup type for use 25 // with apply. 26 type ResourceGroupApplyConfiguration struct { 27 CoveredResources []v1.ResourceName `json:"coveredResources,omitempty"` 28 Flavors []FlavorQuotasApplyConfiguration `json:"flavors,omitempty"` 29 } 30 31 // ResourceGroupApplyConfiguration constructs an declarative configuration of the ResourceGroup type for use with 32 // apply. 33 func ResourceGroup() *ResourceGroupApplyConfiguration { 34 return &ResourceGroupApplyConfiguration{} 35 } 36 37 // WithCoveredResources adds the given value to the CoveredResources field in the declarative configuration 38 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 39 // If called multiple times, values provided by each call will be appended to the CoveredResources field. 40 func (b *ResourceGroupApplyConfiguration) WithCoveredResources(values ...v1.ResourceName) *ResourceGroupApplyConfiguration { 41 for i := range values { 42 b.CoveredResources = append(b.CoveredResources, values[i]) 43 } 44 return b 45 } 46 47 // WithFlavors adds the given value to the Flavors field in the declarative configuration 48 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 49 // If called multiple times, values provided by each call will be appended to the Flavors field. 50 func (b *ResourceGroupApplyConfiguration) WithFlavors(values ...*FlavorQuotasApplyConfiguration) *ResourceGroupApplyConfiguration { 51 for i := range values { 52 if values[i] == nil { 53 panic("nil value passed to WithFlavors") 54 } 55 b.Flavors = append(b.Flavors, *values[i]) 56 } 57 return b 58 }