...

Source file src/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go

Documentation: k8s.io/client-go/applyconfigurations/core/v1

     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 an 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  }
    41  
    42  // NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with
    43  // apply.
    44  func NodeStatus() *NodeStatusApplyConfiguration {
    45  	return &NodeStatusApplyConfiguration{}
    46  }
    47  
    48  // WithCapacity sets the Capacity field in the declarative configuration to the given value
    49  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    50  // If called multiple times, the Capacity field is set to the value of the last call.
    51  func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *NodeStatusApplyConfiguration {
    52  	b.Capacity = &value
    53  	return b
    54  }
    55  
    56  // WithAllocatable sets the Allocatable field in the declarative configuration to the given value
    57  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    58  // If called multiple times, the Allocatable field is set to the value of the last call.
    59  func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *NodeStatusApplyConfiguration {
    60  	b.Allocatable = &value
    61  	return b
    62  }
    63  
    64  // WithPhase sets the Phase field in the declarative configuration to the given value
    65  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    66  // If called multiple times, the Phase field is set to the value of the last call.
    67  func (b *NodeStatusApplyConfiguration) WithPhase(value v1.NodePhase) *NodeStatusApplyConfiguration {
    68  	b.Phase = &value
    69  	return b
    70  }
    71  
    72  // WithConditions adds the given value to the Conditions field in the declarative configuration
    73  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    74  // If called multiple times, values provided by each call will be appended to the Conditions field.
    75  func (b *NodeStatusApplyConfiguration) WithConditions(values ...*NodeConditionApplyConfiguration) *NodeStatusApplyConfiguration {
    76  	for i := range values {
    77  		if values[i] == nil {
    78  			panic("nil value passed to WithConditions")
    79  		}
    80  		b.Conditions = append(b.Conditions, *values[i])
    81  	}
    82  	return b
    83  }
    84  
    85  // WithAddresses adds the given value to the Addresses field in the declarative configuration
    86  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    87  // If called multiple times, values provided by each call will be appended to the Addresses field.
    88  func (b *NodeStatusApplyConfiguration) WithAddresses(values ...*NodeAddressApplyConfiguration) *NodeStatusApplyConfiguration {
    89  	for i := range values {
    90  		if values[i] == nil {
    91  			panic("nil value passed to WithAddresses")
    92  		}
    93  		b.Addresses = append(b.Addresses, *values[i])
    94  	}
    95  	return b
    96  }
    97  
    98  // WithDaemonEndpoints sets the DaemonEndpoints field in the declarative configuration to the given value
    99  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   100  // If called multiple times, the DaemonEndpoints field is set to the value of the last call.
   101  func (b *NodeStatusApplyConfiguration) WithDaemonEndpoints(value *NodeDaemonEndpointsApplyConfiguration) *NodeStatusApplyConfiguration {
   102  	b.DaemonEndpoints = value
   103  	return b
   104  }
   105  
   106  // WithNodeInfo sets the NodeInfo field in the declarative configuration to the given value
   107  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   108  // If called multiple times, the NodeInfo field is set to the value of the last call.
   109  func (b *NodeStatusApplyConfiguration) WithNodeInfo(value *NodeSystemInfoApplyConfiguration) *NodeStatusApplyConfiguration {
   110  	b.NodeInfo = value
   111  	return b
   112  }
   113  
   114  // WithImages adds the given value to the Images field in the declarative configuration
   115  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   116  // If called multiple times, values provided by each call will be appended to the Images field.
   117  func (b *NodeStatusApplyConfiguration) WithImages(values ...*ContainerImageApplyConfiguration) *NodeStatusApplyConfiguration {
   118  	for i := range values {
   119  		if values[i] == nil {
   120  			panic("nil value passed to WithImages")
   121  		}
   122  		b.Images = append(b.Images, *values[i])
   123  	}
   124  	return b
   125  }
   126  
   127  // WithVolumesInUse adds the given value to the VolumesInUse field in the declarative configuration
   128  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   129  // If called multiple times, values provided by each call will be appended to the VolumesInUse field.
   130  func (b *NodeStatusApplyConfiguration) WithVolumesInUse(values ...v1.UniqueVolumeName) *NodeStatusApplyConfiguration {
   131  	for i := range values {
   132  		b.VolumesInUse = append(b.VolumesInUse, values[i])
   133  	}
   134  	return b
   135  }
   136  
   137  // WithVolumesAttached adds the given value to the VolumesAttached field in the declarative configuration
   138  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   139  // If called multiple times, values provided by each call will be appended to the VolumesAttached field.
   140  func (b *NodeStatusApplyConfiguration) WithVolumesAttached(values ...*AttachedVolumeApplyConfiguration) *NodeStatusApplyConfiguration {
   141  	for i := range values {
   142  		if values[i] == nil {
   143  			panic("nil value passed to WithVolumesAttached")
   144  		}
   145  		b.VolumesAttached = append(b.VolumesAttached, *values[i])
   146  	}
   147  	return b
   148  }
   149  
   150  // WithConfig sets the Config field in the declarative configuration to the given value
   151  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   152  // If called multiple times, the Config field is set to the value of the last call.
   153  func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyConfiguration) *NodeStatusApplyConfiguration {
   154  	b.Config = value
   155  	return b
   156  }
   157  
   158  // WithRuntimeHandlers adds the given value to the RuntimeHandlers field in the declarative configuration
   159  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   160  // If called multiple times, values provided by each call will be appended to the RuntimeHandlers field.
   161  func (b *NodeStatusApplyConfiguration) WithRuntimeHandlers(values ...*NodeRuntimeHandlerApplyConfiguration) *NodeStatusApplyConfiguration {
   162  	for i := range values {
   163  		if values[i] == nil {
   164  			panic("nil value passed to WithRuntimeHandlers")
   165  		}
   166  		b.RuntimeHandlers = append(b.RuntimeHandlers, *values[i])
   167  	}
   168  	return b
   169  }
   170  

View as plain text