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