...

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

View as plain text