agones.dev/agones@v1.53.0/pkg/client/applyconfiguration/autoscaling/v1/fleetautoscalerstatus.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  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    24  )
    25  
    26  // FleetAutoscalerStatusApplyConfiguration represents a declarative configuration of the FleetAutoscalerStatus type for use
    27  // with apply.
    28  type FleetAutoscalerStatusApplyConfiguration struct {
    29  	CurrentReplicas   *int32                                   `json:"currentReplicas,omitempty"`
    30  	DesiredReplicas   *int32                                   `json:"desiredReplicas,omitempty"`
    31  	LastScaleTime     *metav1.Time                             `json:"lastScaleTime,omitempty"`
    32  	AbleToScale       *bool                                    `json:"ableToScale,omitempty"`
    33  	ScalingLimited    *bool                                    `json:"scalingLimited,omitempty"`
    34  	LastAppliedPolicy *autoscalingv1.FleetAutoscalerPolicyType `json:"lastAppliedPolicy,omitempty"`
    35  }
    36  
    37  // FleetAutoscalerStatusApplyConfiguration constructs a declarative configuration of the FleetAutoscalerStatus type for use with
    38  // apply.
    39  func FleetAutoscalerStatus() *FleetAutoscalerStatusApplyConfiguration {
    40  	return &FleetAutoscalerStatusApplyConfiguration{}
    41  }
    42  
    43  // WithCurrentReplicas sets the CurrentReplicas field in the declarative configuration to the given value
    44  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    45  // If called multiple times, the CurrentReplicas field is set to the value of the last call.
    46  func (b *FleetAutoscalerStatusApplyConfiguration) WithCurrentReplicas(value int32) *FleetAutoscalerStatusApplyConfiguration {
    47  	b.CurrentReplicas = &value
    48  	return b
    49  }
    50  
    51  // WithDesiredReplicas sets the DesiredReplicas field in the declarative configuration to the given value
    52  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    53  // If called multiple times, the DesiredReplicas field is set to the value of the last call.
    54  func (b *FleetAutoscalerStatusApplyConfiguration) WithDesiredReplicas(value int32) *FleetAutoscalerStatusApplyConfiguration {
    55  	b.DesiredReplicas = &value
    56  	return b
    57  }
    58  
    59  // WithLastScaleTime sets the LastScaleTime field in the declarative configuration to the given value
    60  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    61  // If called multiple times, the LastScaleTime field is set to the value of the last call.
    62  func (b *FleetAutoscalerStatusApplyConfiguration) WithLastScaleTime(value metav1.Time) *FleetAutoscalerStatusApplyConfiguration {
    63  	b.LastScaleTime = &value
    64  	return b
    65  }
    66  
    67  // WithAbleToScale sets the AbleToScale field in the declarative configuration to the given value
    68  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    69  // If called multiple times, the AbleToScale field is set to the value of the last call.
    70  func (b *FleetAutoscalerStatusApplyConfiguration) WithAbleToScale(value bool) *FleetAutoscalerStatusApplyConfiguration {
    71  	b.AbleToScale = &value
    72  	return b
    73  }
    74  
    75  // WithScalingLimited sets the ScalingLimited field in the declarative configuration to the given value
    76  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    77  // If called multiple times, the ScalingLimited field is set to the value of the last call.
    78  func (b *FleetAutoscalerStatusApplyConfiguration) WithScalingLimited(value bool) *FleetAutoscalerStatusApplyConfiguration {
    79  	b.ScalingLimited = &value
    80  	return b
    81  }
    82  
    83  // WithLastAppliedPolicy sets the LastAppliedPolicy field in the declarative configuration to the given value
    84  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    85  // If called multiple times, the LastAppliedPolicy field is set to the value of the last call.
    86  func (b *FleetAutoscalerStatusApplyConfiguration) WithLastAppliedPolicy(value autoscalingv1.FleetAutoscalerPolicyType) *FleetAutoscalerStatusApplyConfiguration {
    87  	b.LastAppliedPolicy = &value
    88  	return b
    89  }