k8s.io/client-go@v0.22.2/applyconfigurations/core/v1/podstatus.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  	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  	PodIP                      *string                             `json:"podIP,omitempty"`
    36  	PodIPs                     []PodIPApplyConfiguration           `json:"podIPs,omitempty"`
    37  	StartTime                  *metav1.Time                        `json:"startTime,omitempty"`
    38  	InitContainerStatuses      []ContainerStatusApplyConfiguration `json:"initContainerStatuses,omitempty"`
    39  	ContainerStatuses          []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"`
    40  	QOSClass                   *v1.PodQOSClass                     `json:"qosClass,omitempty"`
    41  	EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"`
    42  }
    43  
    44  // PodStatusApplyConfiguration constructs an declarative configuration of the PodStatus type for use with
    45  // apply.
    46  func PodStatus() *PodStatusApplyConfiguration {
    47  	return &PodStatusApplyConfiguration{}
    48  }
    49  
    50  // WithPhase sets the Phase field in the declarative configuration to the given value
    51  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    52  // If called multiple times, the Phase field is set to the value of the last call.
    53  func (b *PodStatusApplyConfiguration) WithPhase(value v1.PodPhase) *PodStatusApplyConfiguration {
    54  	b.Phase = &value
    55  	return b
    56  }
    57  
    58  // WithConditions adds the given value to the Conditions field in the declarative configuration
    59  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    60  // If called multiple times, values provided by each call will be appended to the Conditions field.
    61  func (b *PodStatusApplyConfiguration) WithConditions(values ...*PodConditionApplyConfiguration) *PodStatusApplyConfiguration {
    62  	for i := range values {
    63  		if values[i] == nil {
    64  			panic("nil value passed to WithConditions")
    65  		}
    66  		b.Conditions = append(b.Conditions, *values[i])
    67  	}
    68  	return b
    69  }
    70  
    71  // WithMessage sets the Message field in the declarative configuration to the given value
    72  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    73  // If called multiple times, the Message field is set to the value of the last call.
    74  func (b *PodStatusApplyConfiguration) WithMessage(value string) *PodStatusApplyConfiguration {
    75  	b.Message = &value
    76  	return b
    77  }
    78  
    79  // WithReason sets the Reason field in the declarative configuration to the given value
    80  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    81  // If called multiple times, the Reason field is set to the value of the last call.
    82  func (b *PodStatusApplyConfiguration) WithReason(value string) *PodStatusApplyConfiguration {
    83  	b.Reason = &value
    84  	return b
    85  }
    86  
    87  // WithNominatedNodeName sets the NominatedNodeName field in the declarative configuration to the given value
    88  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    89  // If called multiple times, the NominatedNodeName field is set to the value of the last call.
    90  func (b *PodStatusApplyConfiguration) WithNominatedNodeName(value string) *PodStatusApplyConfiguration {
    91  	b.NominatedNodeName = &value
    92  	return b
    93  }
    94  
    95  // WithHostIP sets the HostIP field in the declarative configuration to the given value
    96  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    97  // If called multiple times, the HostIP field is set to the value of the last call.
    98  func (b *PodStatusApplyConfiguration) WithHostIP(value string) *PodStatusApplyConfiguration {
    99  	b.HostIP = &value
   100  	return b
   101  }
   102  
   103  // WithPodIP sets the PodIP field in the declarative configuration to the given value
   104  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   105  // If called multiple times, the PodIP field is set to the value of the last call.
   106  func (b *PodStatusApplyConfiguration) WithPodIP(value string) *PodStatusApplyConfiguration {
   107  	b.PodIP = &value
   108  	return b
   109  }
   110  
   111  // WithPodIPs adds the given value to the PodIPs field in the declarative configuration
   112  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   113  // If called multiple times, values provided by each call will be appended to the PodIPs field.
   114  func (b *PodStatusApplyConfiguration) WithPodIPs(values ...*PodIPApplyConfiguration) *PodStatusApplyConfiguration {
   115  	for i := range values {
   116  		if values[i] == nil {
   117  			panic("nil value passed to WithPodIPs")
   118  		}
   119  		b.PodIPs = append(b.PodIPs, *values[i])
   120  	}
   121  	return b
   122  }
   123  
   124  // WithStartTime sets the StartTime field in the declarative configuration to the given value
   125  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   126  // If called multiple times, the StartTime field is set to the value of the last call.
   127  func (b *PodStatusApplyConfiguration) WithStartTime(value metav1.Time) *PodStatusApplyConfiguration {
   128  	b.StartTime = &value
   129  	return b
   130  }
   131  
   132  // WithInitContainerStatuses adds the given value to the InitContainerStatuses field in the declarative configuration
   133  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   134  // If called multiple times, values provided by each call will be appended to the InitContainerStatuses field.
   135  func (b *PodStatusApplyConfiguration) WithInitContainerStatuses(values ...*ContainerStatusApplyConfiguration) *PodStatusApplyConfiguration {
   136  	for i := range values {
   137  		if values[i] == nil {
   138  			panic("nil value passed to WithInitContainerStatuses")
   139  		}
   140  		b.InitContainerStatuses = append(b.InitContainerStatuses, *values[i])
   141  	}
   142  	return b
   143  }
   144  
   145  // WithContainerStatuses adds the given value to the ContainerStatuses field in the declarative configuration
   146  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   147  // If called multiple times, values provided by each call will be appended to the ContainerStatuses field.
   148  func (b *PodStatusApplyConfiguration) WithContainerStatuses(values ...*ContainerStatusApplyConfiguration) *PodStatusApplyConfiguration {
   149  	for i := range values {
   150  		if values[i] == nil {
   151  			panic("nil value passed to WithContainerStatuses")
   152  		}
   153  		b.ContainerStatuses = append(b.ContainerStatuses, *values[i])
   154  	}
   155  	return b
   156  }
   157  
   158  // WithQOSClass sets the QOSClass field in the declarative configuration to the given value
   159  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   160  // If called multiple times, the QOSClass field is set to the value of the last call.
   161  func (b *PodStatusApplyConfiguration) WithQOSClass(value v1.PodQOSClass) *PodStatusApplyConfiguration {
   162  	b.QOSClass = &value
   163  	return b
   164  }
   165  
   166  // WithEphemeralContainerStatuses adds the given value to the EphemeralContainerStatuses field in the declarative configuration
   167  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   168  // If called multiple times, values provided by each call will be appended to the EphemeralContainerStatuses field.
   169  func (b *PodStatusApplyConfiguration) WithEphemeralContainerStatuses(values ...*ContainerStatusApplyConfiguration) *PodStatusApplyConfiguration {
   170  	for i := range values {
   171  		if values[i] == nil {
   172  			panic("nil value passed to WithEphemeralContainerStatuses")
   173  		}
   174  		b.EphemeralContainerStatuses = append(b.EphemeralContainerStatuses, *values[i])
   175  	}
   176  	return b
   177  }