agones.dev/agones@v1.54.0/pkg/client/applyconfiguration/autoscaling/v1/fleetautoscalerpolicy.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 autoscalingv1 "agones.dev/agones/pkg/apis/autoscaling/v1" 23 ) 24 25 // FleetAutoscalerPolicyApplyConfiguration represents a declarative configuration of the FleetAutoscalerPolicy type for use 26 // with apply. 27 type FleetAutoscalerPolicyApplyConfiguration struct { 28 Type *autoscalingv1.FleetAutoscalerPolicyType `json:"type,omitempty"` 29 Buffer *BufferPolicyApplyConfiguration `json:"buffer,omitempty"` 30 Webhook *URLConfigurationApplyConfiguration `json:"webhook,omitempty"` 31 Counter *CounterPolicyApplyConfiguration `json:"counter,omitempty"` 32 List *ListPolicyApplyConfiguration `json:"list,omitempty"` 33 Schedule *SchedulePolicyApplyConfiguration `json:"schedule,omitempty"` 34 Chain *autoscalingv1.ChainPolicy `json:"chain,omitempty"` 35 Wasm *WasmPolicyApplyConfiguration `json:"wasm,omitempty"` 36 } 37 38 // FleetAutoscalerPolicyApplyConfiguration constructs a declarative configuration of the FleetAutoscalerPolicy type for use with 39 // apply. 40 func FleetAutoscalerPolicy() *FleetAutoscalerPolicyApplyConfiguration { 41 return &FleetAutoscalerPolicyApplyConfiguration{} 42 } 43 44 // WithType sets the Type field in the declarative configuration to the given value 45 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 46 // If called multiple times, the Type field is set to the value of the last call. 47 func (b *FleetAutoscalerPolicyApplyConfiguration) WithType(value autoscalingv1.FleetAutoscalerPolicyType) *FleetAutoscalerPolicyApplyConfiguration { 48 b.Type = &value 49 return b 50 } 51 52 // WithBuffer sets the Buffer field in the declarative configuration to the given value 53 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 54 // If called multiple times, the Buffer field is set to the value of the last call. 55 func (b *FleetAutoscalerPolicyApplyConfiguration) WithBuffer(value *BufferPolicyApplyConfiguration) *FleetAutoscalerPolicyApplyConfiguration { 56 b.Buffer = value 57 return b 58 } 59 60 // WithWebhook sets the Webhook field in the declarative configuration to the given value 61 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 62 // If called multiple times, the Webhook field is set to the value of the last call. 63 func (b *FleetAutoscalerPolicyApplyConfiguration) WithWebhook(value *URLConfigurationApplyConfiguration) *FleetAutoscalerPolicyApplyConfiguration { 64 b.Webhook = value 65 return b 66 } 67 68 // WithCounter sets the Counter 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 Counter field is set to the value of the last call. 71 func (b *FleetAutoscalerPolicyApplyConfiguration) WithCounter(value *CounterPolicyApplyConfiguration) *FleetAutoscalerPolicyApplyConfiguration { 72 b.Counter = value 73 return b 74 } 75 76 // WithList sets the List 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 List field is set to the value of the last call. 79 func (b *FleetAutoscalerPolicyApplyConfiguration) WithList(value *ListPolicyApplyConfiguration) *FleetAutoscalerPolicyApplyConfiguration { 80 b.List = value 81 return b 82 } 83 84 // WithSchedule sets the Schedule 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 Schedule field is set to the value of the last call. 87 func (b *FleetAutoscalerPolicyApplyConfiguration) WithSchedule(value *SchedulePolicyApplyConfiguration) *FleetAutoscalerPolicyApplyConfiguration { 88 b.Schedule = value 89 return b 90 } 91 92 // WithChain sets the Chain field in the declarative configuration to the given value 93 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 94 // If called multiple times, the Chain field is set to the value of the last call. 95 func (b *FleetAutoscalerPolicyApplyConfiguration) WithChain(value autoscalingv1.ChainPolicy) *FleetAutoscalerPolicyApplyConfiguration { 96 b.Chain = &value 97 return b 98 } 99 100 // WithWasm sets the Wasm field in the declarative configuration to the given value 101 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 102 // If called multiple times, the Wasm field is set to the value of the last call. 103 func (b *FleetAutoscalerPolicyApplyConfiguration) WithWasm(value *WasmPolicyApplyConfiguration) *FleetAutoscalerPolicyApplyConfiguration { 104 b.Wasm = value 105 return b 106 }