1/* 2Copyright The Kubernetes Authors. 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15*/ 16 17// Code generated by applyconfiguration-gen. DO NOT EDIT. 18 19package v1 20 21import ( 22 v1 "k8s.io/api/core/v1" 23) 24 25// NodeStatusApplyConfiguration represents an declarative configuration of the NodeStatus type for use 26// with apply. 27type 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} 40 41// NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with 42// apply. 43func NodeStatus() *NodeStatusApplyConfiguration { 44 return &NodeStatusApplyConfiguration{} 45} 46 47// WithCapacity sets the Capacity 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 Capacity field is set to the value of the last call. 50func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *NodeStatusApplyConfiguration { 51 b.Capacity = &value 52 return b 53} 54 55// WithAllocatable sets the Allocatable 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 Allocatable field is set to the value of the last call. 58func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *NodeStatusApplyConfiguration { 59 b.Allocatable = &value 60 return b 61} 62 63// WithPhase sets the Phase 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 Phase field is set to the value of the last call. 66func (b *NodeStatusApplyConfiguration) WithPhase(value v1.NodePhase) *NodeStatusApplyConfiguration { 67 b.Phase = &value 68 return b 69} 70 71// WithConditions adds the given value to the Conditions field in the declarative configuration 72// and returns the receiver, so that objects can be build by chaining "With" function invocations. 73// If called multiple times, values provided by each call will be appended to the Conditions field. 74func (b *NodeStatusApplyConfiguration) WithConditions(values ...*NodeConditionApplyConfiguration) *NodeStatusApplyConfiguration { 75 for i := range values { 76 if values[i] == nil { 77 panic("nil value passed to WithConditions") 78 } 79 b.Conditions = append(b.Conditions, *values[i]) 80 } 81 return b 82} 83 84// WithAddresses adds the given value to the Addresses field in the declarative configuration 85// and returns the receiver, so that objects can be build by chaining "With" function invocations. 86// If called multiple times, values provided by each call will be appended to the Addresses field. 87func (b *NodeStatusApplyConfiguration) WithAddresses(values ...*NodeAddressApplyConfiguration) *NodeStatusApplyConfiguration { 88 for i := range values { 89 if values[i] == nil { 90 panic("nil value passed to WithAddresses") 91 } 92 b.Addresses = append(b.Addresses, *values[i]) 93 } 94 return b 95} 96 97// WithDaemonEndpoints sets the DaemonEndpoints field in the declarative configuration to the given value 98// and returns the receiver, so that objects can be built by chaining "With" function invocations. 99// If called multiple times, the DaemonEndpoints field is set to the value of the last call. 100func (b *NodeStatusApplyConfiguration) WithDaemonEndpoints(value *NodeDaemonEndpointsApplyConfiguration) *NodeStatusApplyConfiguration { 101 b.DaemonEndpoints = value 102 return b 103} 104 105// WithNodeInfo sets the NodeInfo field in the declarative configuration to the given value 106// and returns the receiver, so that objects can be built by chaining "With" function invocations. 107// If called multiple times, the NodeInfo field is set to the value of the last call. 108func (b *NodeStatusApplyConfiguration) WithNodeInfo(value *NodeSystemInfoApplyConfiguration) *NodeStatusApplyConfiguration { 109 b.NodeInfo = value 110 return b 111} 112 113// WithImages adds the given value to the Images field in the declarative configuration 114// and returns the receiver, so that objects can be build by chaining "With" function invocations. 115// If called multiple times, values provided by each call will be appended to the Images field. 116func (b *NodeStatusApplyConfiguration) WithImages(values ...*ContainerImageApplyConfiguration) *NodeStatusApplyConfiguration { 117 for i := range values { 118 if values[i] == nil { 119 panic("nil value passed to WithImages") 120 } 121 b.Images = append(b.Images, *values[i]) 122 } 123 return b 124} 125 126// WithVolumesInUse adds the given value to the VolumesInUse field in the declarative configuration 127// and returns the receiver, so that objects can be build by chaining "With" function invocations. 128// If called multiple times, values provided by each call will be appended to the VolumesInUse field. 129func (b *NodeStatusApplyConfiguration) WithVolumesInUse(values ...v1.UniqueVolumeName) *NodeStatusApplyConfiguration { 130 for i := range values { 131 b.VolumesInUse = append(b.VolumesInUse, values[i]) 132 } 133 return b 134} 135 136// WithVolumesAttached adds the given value to the VolumesAttached 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 VolumesAttached field. 139func (b *NodeStatusApplyConfiguration) WithVolumesAttached(values ...*AttachedVolumeApplyConfiguration) *NodeStatusApplyConfiguration { 140 for i := range values { 141 if values[i] == nil { 142 panic("nil value passed to WithVolumesAttached") 143 } 144 b.VolumesAttached = append(b.VolumesAttached, *values[i]) 145 } 146 return b 147} 148 149// WithConfig sets the Config 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 Config field is set to the value of the last call. 152func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyConfiguration) *NodeStatusApplyConfiguration { 153 b.Config = value 154 return b 155} 156