1 /* 2 Copyright The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Code generated by applyconfiguration-gen. DO NOT EDIT. 18 19 package v1 20 21 // ProbeApplyConfiguration represents an declarative configuration of the Probe type for use 22 // with apply. 23 type ProbeApplyConfiguration struct { 24 ProbeHandlerApplyConfiguration `json:",inline"` 25 InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` 26 TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` 27 PeriodSeconds *int32 `json:"periodSeconds,omitempty"` 28 SuccessThreshold *int32 `json:"successThreshold,omitempty"` 29 FailureThreshold *int32 `json:"failureThreshold,omitempty"` 30 TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` 31 } 32 33 // ProbeApplyConfiguration constructs an declarative configuration of the Probe type for use with 34 // apply. 35 func Probe() *ProbeApplyConfiguration { 36 return &ProbeApplyConfiguration{} 37 } 38 39 // WithExec sets the Exec field in the declarative configuration to the given value 40 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 41 // If called multiple times, the Exec field is set to the value of the last call. 42 func (b *ProbeApplyConfiguration) WithExec(value *ExecActionApplyConfiguration) *ProbeApplyConfiguration { 43 b.Exec = value 44 return b 45 } 46 47 // WithHTTPGet sets the HTTPGet field in the declarative configuration to the given value 48 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 49 // If called multiple times, the HTTPGet field is set to the value of the last call. 50 func (b *ProbeApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfiguration) *ProbeApplyConfiguration { 51 b.HTTPGet = value 52 return b 53 } 54 55 // WithTCPSocket sets the TCPSocket field in the declarative configuration to the given value 56 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 57 // If called multiple times, the TCPSocket field is set to the value of the last call. 58 func (b *ProbeApplyConfiguration) WithTCPSocket(value *TCPSocketActionApplyConfiguration) *ProbeApplyConfiguration { 59 b.TCPSocket = value 60 return b 61 } 62 63 // WithGRPC sets the GRPC field in the declarative configuration to the given value 64 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 65 // If called multiple times, the GRPC field is set to the value of the last call. 66 func (b *ProbeApplyConfiguration) WithGRPC(value *GRPCActionApplyConfiguration) *ProbeApplyConfiguration { 67 b.GRPC = value 68 return b 69 } 70 71 // WithInitialDelaySeconds sets the InitialDelaySeconds field in the declarative configuration to the given value 72 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 73 // If called multiple times, the InitialDelaySeconds field is set to the value of the last call. 74 func (b *ProbeApplyConfiguration) WithInitialDelaySeconds(value int32) *ProbeApplyConfiguration { 75 b.InitialDelaySeconds = &value 76 return b 77 } 78 79 // WithTimeoutSeconds sets the TimeoutSeconds field in the declarative configuration to the given value 80 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 81 // If called multiple times, the TimeoutSeconds field is set to the value of the last call. 82 func (b *ProbeApplyConfiguration) WithTimeoutSeconds(value int32) *ProbeApplyConfiguration { 83 b.TimeoutSeconds = &value 84 return b 85 } 86 87 // WithPeriodSeconds sets the PeriodSeconds field in the declarative configuration to the given value 88 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 89 // If called multiple times, the PeriodSeconds field is set to the value of the last call. 90 func (b *ProbeApplyConfiguration) WithPeriodSeconds(value int32) *ProbeApplyConfiguration { 91 b.PeriodSeconds = &value 92 return b 93 } 94 95 // WithSuccessThreshold sets the SuccessThreshold field in the declarative configuration to the given value 96 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 97 // If called multiple times, the SuccessThreshold field is set to the value of the last call. 98 func (b *ProbeApplyConfiguration) WithSuccessThreshold(value int32) *ProbeApplyConfiguration { 99 b.SuccessThreshold = &value 100 return b 101 } 102 103 // WithFailureThreshold sets the FailureThreshold field in the declarative configuration to the given value 104 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 105 // If called multiple times, the FailureThreshold field is set to the value of the last call. 106 func (b *ProbeApplyConfiguration) WithFailureThreshold(value int32) *ProbeApplyConfiguration { 107 b.FailureThreshold = &value 108 return b 109 } 110 111 // WithTerminationGracePeriodSeconds sets the TerminationGracePeriodSeconds field in the declarative configuration to the given value 112 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 113 // If called multiple times, the TerminationGracePeriodSeconds field is set to the value of the last call. 114 func (b *ProbeApplyConfiguration) WithTerminationGracePeriodSeconds(value int64) *ProbeApplyConfiguration { 115 b.TerminationGracePeriodSeconds = &value 116 return b 117 } 118