agones.dev/agones@v1.54.0/pkg/client/applyconfiguration/agones/v1/health.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 // HealthApplyConfiguration represents a declarative configuration of the Health type for use 22 // with apply. 23 type HealthApplyConfiguration struct { 24 Disabled *bool `json:"disabled,omitempty"` 25 PeriodSeconds *int32 `json:"periodSeconds,omitempty"` 26 FailureThreshold *int32 `json:"failureThreshold,omitempty"` 27 InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` 28 } 29 30 // HealthApplyConfiguration constructs a declarative configuration of the Health type for use with 31 // apply. 32 func Health() *HealthApplyConfiguration { 33 return &HealthApplyConfiguration{} 34 } 35 36 // WithDisabled sets the Disabled field in the declarative configuration to the given value 37 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 38 // If called multiple times, the Disabled field is set to the value of the last call. 39 func (b *HealthApplyConfiguration) WithDisabled(value bool) *HealthApplyConfiguration { 40 b.Disabled = &value 41 return b 42 } 43 44 // WithPeriodSeconds sets the PeriodSeconds 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 PeriodSeconds field is set to the value of the last call. 47 func (b *HealthApplyConfiguration) WithPeriodSeconds(value int32) *HealthApplyConfiguration { 48 b.PeriodSeconds = &value 49 return b 50 } 51 52 // WithFailureThreshold sets the FailureThreshold 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 FailureThreshold field is set to the value of the last call. 55 func (b *HealthApplyConfiguration) WithFailureThreshold(value int32) *HealthApplyConfiguration { 56 b.FailureThreshold = &value 57 return b 58 } 59 60 // WithInitialDelaySeconds sets the InitialDelaySeconds 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 InitialDelaySeconds field is set to the value of the last call. 63 func (b *HealthApplyConfiguration) WithInitialDelaySeconds(value int32) *HealthApplyConfiguration { 64 b.InitialDelaySeconds = &value 65 return b 66 }