k8s.io/client-go@v0.31.1/applyconfigurations/core/v1/nodestatus.go (about) 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 v1 "k8s.io/api/core/v1" 23 ) 24 25 // NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use 26 // with apply. 27 type NodeStatusApplyConfiguration struct { 28 Capacity *v1.ResourceList `json:"capacity,omitempty"` 29 Allocatable *v1.ResourceList `json:"allocatable,omitempty"` 30 Phase *v1.NodePhase `json:"phase,omitempty"` 31 Conditions []NodeConditionApplyConfiguration `json:"conditions,omitempty"` 32 Addresses []NodeAddressApplyConfiguration `json:"addresses,omitempty"` 33 DaemonEndpoints *NodeDaemonEndpointsApplyConfiguration `json:"daemonEndpoints,omitempty"` 34 NodeInfo *NodeSystemInfoApplyConfiguration `json:"nodeInfo,omitempty"` 35 Images []ContainerImageApplyConfiguration `json:"images,omitempty"` 36 VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"` 37 VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` 38 Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"` 39 RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"` 40 Features *NodeFeaturesApplyConfiguration `json:"features,omitempty"` 41 } 42 43 // NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with 44 // apply. 45 func NodeStatus() *NodeStatusApplyConfiguration { 46 return &NodeStatusApplyConfiguration{} 47 } 48 49 // WithCapacity sets the Capacity field in the declarative configuration to the given value 50 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 51 // If called multiple times, the Capacity field is set to the value of the last call. 52 func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *NodeStatusApplyConfiguration { 53 b.Capacity = &value 54 return b 55 } 56 57 // WithAllocatable sets the Allocatable field in the declarative configuration to the given value 58 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 59 // If called multiple times, the Allocatable field is set to the value of the last call. 60 func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *NodeStatusApplyConfiguration { 61 b.Allocatable = &value 62 return b 63 } 64 65 // WithPhase sets the Phase field in the declarative configuration to the given value 66 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 67 // If called multiple times, the Phase field is set to the value of the last call. 68 func (b *NodeStatusApplyConfiguration) WithPhase(value v1.NodePhase) *NodeStatusApplyConfiguration { 69 b.Phase = &value 70 return b 71 } 72 73 // WithConditions adds the given value to the Conditions field in the declarative configuration 74 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 75 // If called multiple times, values provided by each call will be appended to the Conditions field. 76 func (b *NodeStatusApplyConfiguration) WithConditions(values ...*NodeConditionApplyConfiguration) *NodeStatusApplyConfiguration { 77 for i := range values { 78 if values[i] == nil { 79 panic("nil value passed to WithConditions") 80 } 81 b.Conditions = append(b.Conditions, *values[i]) 82 } 83 return b 84 } 85 86 // WithAddresses adds the given value to the Addresses field in the declarative configuration 87 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 88 // If called multiple times, values provided by each call will be appended to the Addresses field. 89 func (b *NodeStatusApplyConfiguration) WithAddresses(values ...*NodeAddressApplyConfiguration) *NodeStatusApplyConfiguration { 90 for i := range values { 91 if values[i] == nil { 92 panic("nil value passed to WithAddresses") 93 } 94 b.Addresses = append(b.Addresses, *values[i]) 95 } 96 return b 97 } 98 99 // WithDaemonEndpoints sets the DaemonEndpoints 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 DaemonEndpoints field is set to the value of the last call. 102 func (b *NodeStatusApplyConfiguration) WithDaemonEndpoints(value *NodeDaemonEndpointsApplyConfiguration) *NodeStatusApplyConfiguration { 103 b.DaemonEndpoints = value 104 return b 105 } 106 107 // WithNodeInfo sets the NodeInfo 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 NodeInfo field is set to the value of the last call. 110 func (b *NodeStatusApplyConfiguration) WithNodeInfo(value *NodeSystemInfoApplyConfiguration) *NodeStatusApplyConfiguration { 111 b.NodeInfo = value 112 return b 113 } 114 115 // WithImages adds the given value to the Images 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 Images field. 118 func (b *NodeStatusApplyConfiguration) WithImages(values ...*ContainerImageApplyConfiguration) *NodeStatusApplyConfiguration { 119 for i := range values { 120 if values[i] == nil { 121 panic("nil value passed to WithImages") 122 } 123 b.Images = append(b.Images, *values[i]) 124 } 125 return b 126 } 127 128 // WithVolumesInUse adds the given value to the VolumesInUse field in the declarative configuration 129 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 130 // If called multiple times, values provided by each call will be appended to the VolumesInUse field. 131 func (b *NodeStatusApplyConfiguration) WithVolumesInUse(values ...v1.UniqueVolumeName) *NodeStatusApplyConfiguration { 132 for i := range values { 133 b.VolumesInUse = append(b.VolumesInUse, values[i]) 134 } 135 return b 136 } 137 138 // WithVolumesAttached adds the given value to the VolumesAttached field in the declarative configuration 139 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 140 // If called multiple times, values provided by each call will be appended to the VolumesAttached field. 141 func (b *NodeStatusApplyConfiguration) WithVolumesAttached(values ...*AttachedVolumeApplyConfiguration) *NodeStatusApplyConfiguration { 142 for i := range values { 143 if values[i] == nil { 144 panic("nil value passed to WithVolumesAttached") 145 } 146 b.VolumesAttached = append(b.VolumesAttached, *values[i]) 147 } 148 return b 149 } 150 151 // WithConfig sets the Config field in the declarative configuration to the given value 152 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 153 // If called multiple times, the Config field is set to the value of the last call. 154 func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyConfiguration) *NodeStatusApplyConfiguration { 155 b.Config = value 156 return b 157 } 158 159 // WithRuntimeHandlers adds the given value to the RuntimeHandlers field in the declarative configuration 160 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 161 // If called multiple times, values provided by each call will be appended to the RuntimeHandlers field. 162 func (b *NodeStatusApplyConfiguration) WithRuntimeHandlers(values ...*NodeRuntimeHandlerApplyConfiguration) *NodeStatusApplyConfiguration { 163 for i := range values { 164 if values[i] == nil { 165 panic("nil value passed to WithRuntimeHandlers") 166 } 167 b.RuntimeHandlers = append(b.RuntimeHandlers, *values[i]) 168 } 169 return b 170 } 171 172 // WithFeatures sets the Features field in the declarative configuration to the given value 173 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 174 // If called multiple times, the Features field is set to the value of the last call. 175 func (b *NodeStatusApplyConfiguration) WithFeatures(value *NodeFeaturesApplyConfiguration) *NodeStatusApplyConfiguration { 176 b.Features = value 177 return b 178 }