| 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 |
import ( |
| 22 |
corev1 "k8s.io/api/core/v1" |
| 23 |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 24 |
) |
| 25 |
|
| 26 |
// PodStatusApplyConfiguration represents a declarative configuration of the PodStatus type for use |
| 27 |
// with apply. |
| 28 |
type PodStatusApplyConfiguration struct { |
| 29 |
ObservedGeneration *int64 `json:"observedGeneration,omitempty"` |
| 30 |
Phase *corev1.PodPhase `json:"phase,omitempty"` |
| 31 |
Conditions []PodConditionApplyConfiguration `json:"conditions,omitempty"` |
| 32 |
Message *string `json:"message,omitempty"` |
| 33 |
Reason *string `json:"reason,omitempty"` |
| 34 |
NominatedNodeName *string `json:"nominatedNodeName,omitempty"` |
| 35 |
HostIP *string `json:"hostIP,omitempty"` |
| 36 |
HostIPs []HostIPApplyConfiguration `json:"hostIPs,omitempty"` |
| 37 |
PodIP *string `json:"podIP,omitempty"` |
| 38 |
PodIPs []PodIPApplyConfiguration `json:"podIPs,omitempty"` |
| 39 |
StartTime *metav1.Time `json:"startTime,omitempty"` |
| 40 |
InitContainerStatuses []ContainerStatusApplyConfiguration `json:"initContainerStatuses,omitempty"` |
| 41 |
ContainerStatuses []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"` |
| 42 |
QOSClass *corev1.PodQOSClass `json:"qosClass,omitempty"` |
| 43 |
EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"` |
| 44 |
Resize *corev1.PodResizeStatus `json:"resize,omitempty"` |
| 45 |
ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"` |
| 46 |
} |
| 47 |
|
| 48 |
// PodStatusApplyConfiguration constructs a declarative configuration of the PodStatus type for use with |
| 49 |
// apply. |
| 50 |
func PodStatus() *PodStatusApplyConfiguration { |
| 51 |
return &PodStatusApplyConfiguration{} |
| 52 |
} |
| 53 |
|
| 54 |
// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call. |
| 57 |
func (b *PodStatusApplyConfiguration) WithObservedGeneration(value int64) *PodStatusApplyConfiguration { |
| 58 |
b.ObservedGeneration = &value |
| 59 |
return b |
| 60 |
} |
| 61 |
|
| 62 |
// WithPhase sets the Phase 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 Phase field is set to the value of the last call. |
| 65 |
func (b *PodStatusApplyConfiguration) WithPhase(value corev1.PodPhase) *PodStatusApplyConfiguration { |
| 66 |
b.Phase = &value |
| 67 |
return b |
| 68 |
} |
| 69 |
|
| 70 |
// WithConditions adds the given value to the Conditions field in the declarative configuration |
| 71 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 72 |
// If called multiple times, values provided by each call will be appended to the Conditions field. |
| 73 |
func (b *PodStatusApplyConfiguration) WithConditions(values ...*PodConditionApplyConfiguration) *PodStatusApplyConfiguration { |
| 74 |
for i := range values { |
| 75 |
if values[i] == nil { |
| 76 |
panic("nil value passed to WithConditions") |
| 77 |
} |
| 78 |
b.Conditions = append(b.Conditions, *values[i]) |
| 79 |
} |
| 80 |
return b |
| 81 |
} |
| 82 |
|
| 83 |
// WithMessage sets the Message 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 Message field is set to the value of the last call. |
| 86 |
func (b *PodStatusApplyConfiguration) WithMessage(value string) *PodStatusApplyConfiguration { |
| 87 |
b.Message = &value |
| 88 |
return b |
| 89 |
} |
| 90 |
|
| 91 |
// WithReason sets the Reason field in the declarative configuration to the given value |
| 92 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 93 |
// If called multiple times, the Reason field is set to the value of the last call. |
| 94 |
func (b *PodStatusApplyConfiguration) WithReason(value string) *PodStatusApplyConfiguration { |
| 95 |
b.Reason = &value |
| 96 |
return b |
| 97 |
} |
| 98 |
|
| 99 |
// WithNominatedNodeName sets the NominatedNodeName field in the declarative configuration to the given value |
| 100 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 101 |
// If called multiple times, the NominatedNodeName field is set to the value of the last call. |
| 102 |
func (b *PodStatusApplyConfiguration) WithNominatedNodeName(value string) *PodStatusApplyConfiguration { |
| 103 |
b.NominatedNodeName = &value |
| 104 |
return b |
| 105 |
} |
| 106 |
|
| 107 |
// WithHostIP sets the HostIP field in the declarative configuration to the given value |
| 108 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 109 |
// If called multiple times, the HostIP field is set to the value of the last call. |
| 110 |
func (b *PodStatusApplyConfiguration) WithHostIP(value string) *PodStatusApplyConfiguration { |
| 111 |
b.HostIP = &value |
| 112 |
return b |
| 113 |
} |
| 114 |
|
| 115 |
// WithHostIPs adds the given value to the HostIPs field in the declarative configuration |
| 116 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 117 |
// If called multiple times, values provided by each call will be appended to the HostIPs field. |
| 118 |
func (b *PodStatusApplyConfiguration) WithHostIPs(values ...*HostIPApplyConfiguration) *PodStatusApplyConfiguration { |
| 119 |
for i := range values { |
| 120 |
if values[i] == nil { |
| 121 |
panic("nil value passed to WithHostIPs") |
| 122 |
} |
| 123 |
b.HostIPs = append(b.HostIPs, *values[i]) |
| 124 |
} |
| 125 |
return b |
| 126 |
} |
| 127 |
|
| 128 |
// WithPodIP sets the PodIP field in the declarative configuration to the given value |
| 129 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 130 |
// If called multiple times, the PodIP field is set to the value of the last call. |
| 131 |
func (b *PodStatusApplyConfiguration) WithPodIP(value string) *PodStatusApplyConfiguration { |
| 132 |
b.PodIP = &value |
| 133 |
return b |
| 134 |
} |
| 135 |
|
| 136 |
// WithPodIPs adds the given value to the PodIPs field in the declarative configuration |
| 137 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 138 |
// If called multiple times, values provided by each call will be appended to the PodIPs field. |
| 139 |
func (b *PodStatusApplyConfiguration) WithPodIPs(values ...*PodIPApplyConfiguration) *PodStatusApplyConfiguration { |
| 140 |
for i := range values { |
| 141 |
if values[i] == nil { |
| 142 |
panic("nil value passed to WithPodIPs") |
| 143 |
} |
| 144 |
b.PodIPs = append(b.PodIPs, *values[i]) |
| 145 |
} |
| 146 |
return b |
| 147 |
} |
| 148 |
|
| 149 |
// WithStartTime sets the StartTime field in the declarative configuration to the given value |
| 150 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 151 |
// If called multiple times, the StartTime field is set to the value of the last call. |
| 152 |
func (b *PodStatusApplyConfiguration) WithStartTime(value metav1.Time) *PodStatusApplyConfiguration { |
| 153 |
b.StartTime = &value |
| 154 |
return b |
| 155 |
} |
| 156 |
|
| 157 |
// WithInitContainerStatuses adds the given value to the InitContainerStatuses field in the declarative configuration |
| 158 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 159 |
// If called multiple times, values provided by each call will be appended to the InitContainerStatuses field. |
| 160 |
func (b *PodStatusApplyConfiguration) WithInitContainerStatuses(values ...*ContainerStatusApplyConfiguration) *PodStatusApplyConfiguration { |
| 161 |
for i := range values { |
| 162 |
if values[i] == nil { |
| 163 |
panic("nil value passed to WithInitContainerStatuses") |
| 164 |
} |
| 165 |
b.InitContainerStatuses = append(b.InitContainerStatuses, *values[i]) |
| 166 |
} |
| 167 |
return b |
| 168 |
} |
| 169 |
|
| 170 |
// WithContainerStatuses adds the given value to the ContainerStatuses field in the declarative configuration |
| 171 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 172 |
// If called multiple times, values provided by each call will be appended to the ContainerStatuses field. |
| 173 |
func (b *PodStatusApplyConfiguration) WithContainerStatuses(values ...*ContainerStatusApplyConfiguration) *PodStatusApplyConfiguration { |
| 174 |
for i := range values { |
| 175 |
if values[i] == nil { |
| 176 |
panic("nil value passed to WithContainerStatuses") |
| 177 |
} |
| 178 |
b.ContainerStatuses = append(b.ContainerStatuses, *values[i]) |
| 179 |
} |
| 180 |
return b |
| 181 |
} |
| 182 |
|
| 183 |
// WithQOSClass sets the QOSClass field in the declarative configuration to the given value |
| 184 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 185 |
// If called multiple times, the QOSClass field is set to the value of the last call. |
| 186 |
func (b *PodStatusApplyConfiguration) WithQOSClass(value corev1.PodQOSClass) *PodStatusApplyConfiguration { |
| 187 |
b.QOSClass = &value |
| 188 |
return b |
| 189 |
} |
| 190 |
|
| 191 |
// WithEphemeralContainerStatuses adds the given value to the EphemeralContainerStatuses field in the declarative configuration |
| 192 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 193 |
// If called multiple times, values provided by each call will be appended to the EphemeralContainerStatuses field. |
| 194 |
func (b *PodStatusApplyConfiguration) WithEphemeralContainerStatuses(values ...*ContainerStatusApplyConfiguration) *PodStatusApplyConfiguration { |
| 195 |
for i := range values { |
| 196 |
if values[i] == nil { |
| 197 |
panic("nil value passed to WithEphemeralContainerStatuses") |
| 198 |
} |
| 199 |
b.EphemeralContainerStatuses = append(b.EphemeralContainerStatuses, *values[i]) |
| 200 |
} |
| 201 |
return b |
| 202 |
} |
| 203 |
|
| 204 |
// WithResize sets the Resize field in the declarative configuration to the given value |
| 205 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 206 |
// If called multiple times, the Resize field is set to the value of the last call. |
| 207 |
func (b *PodStatusApplyConfiguration) WithResize(value corev1.PodResizeStatus) *PodStatusApplyConfiguration { |
| 208 |
b.Resize = &value |
| 209 |
return b |
| 210 |
} |
| 211 |
|
| 212 |
// WithResourceClaimStatuses adds the given value to the ResourceClaimStatuses field in the declarative configuration |
| 213 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 214 |
// If called multiple times, values provided by each call will be appended to the ResourceClaimStatuses field. |
| 215 |
func (b *PodStatusApplyConfiguration) WithResourceClaimStatuses(values ...*PodResourceClaimStatusApplyConfiguration) *PodStatusApplyConfiguration { |
| 216 |
for i := range values { |
| 217 |
if values[i] == nil { |
| 218 |
panic("nil value passed to WithResourceClaimStatuses") |
| 219 |
} |
| 220 |
b.ResourceClaimStatuses = append(b.ResourceClaimStatuses, *values[i]) |
| 221 |
} |
| 222 |
return b |
| 223 |
} |