agones.dev/agones@v1.53.0/pkg/client/applyconfiguration/autoscaling/v1/counterpolicy.go (about) 1 // Copyright 2024 Google LLC All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // This code was autogenerated. Do not edit directly. 16 17 // Code generated by applyconfiguration-gen. DO NOT EDIT. 18 19 package v1 20 21 import ( 22 intstr "k8s.io/apimachinery/pkg/util/intstr" 23 ) 24 25 // CounterPolicyApplyConfiguration represents a declarative configuration of the CounterPolicy type for use 26 // with apply. 27 type CounterPolicyApplyConfiguration struct { 28 Key *string `json:"key,omitempty"` 29 MaxCapacity *int64 `json:"maxCapacity,omitempty"` 30 MinCapacity *int64 `json:"minCapacity,omitempty"` 31 BufferSize *intstr.IntOrString `json:"bufferSize,omitempty"` 32 } 33 34 // CounterPolicyApplyConfiguration constructs a declarative configuration of the CounterPolicy type for use with 35 // apply. 36 func CounterPolicy() *CounterPolicyApplyConfiguration { 37 return &CounterPolicyApplyConfiguration{} 38 } 39 40 // WithKey sets the Key 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 Key field is set to the value of the last call. 43 func (b *CounterPolicyApplyConfiguration) WithKey(value string) *CounterPolicyApplyConfiguration { 44 b.Key = &value 45 return b 46 } 47 48 // WithMaxCapacity sets the MaxCapacity 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 MaxCapacity field is set to the value of the last call. 51 func (b *CounterPolicyApplyConfiguration) WithMaxCapacity(value int64) *CounterPolicyApplyConfiguration { 52 b.MaxCapacity = &value 53 return b 54 } 55 56 // WithMinCapacity sets the MinCapacity field in the declarative configuration to the given value 57 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 58 // If called multiple times, the MinCapacity field is set to the value of the last call. 59 func (b *CounterPolicyApplyConfiguration) WithMinCapacity(value int64) *CounterPolicyApplyConfiguration { 60 b.MinCapacity = &value 61 return b 62 } 63 64 // WithBufferSize sets the BufferSize field in the declarative configuration to the given value 65 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 66 // If called multiple times, the BufferSize field is set to the value of the last call. 67 func (b *CounterPolicyApplyConfiguration) WithBufferSize(value intstr.IntOrString) *CounterPolicyApplyConfiguration { 68 b.BufferSize = &value 69 return b 70 }