k8s.io/client-go@v0.31.1/applyconfigurations/core/v1/containerstatus.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  	corev1 "k8s.io/api/core/v1"
    23  )
    24  
    25  // ContainerStatusApplyConfiguration represents a declarative configuration of the ContainerStatus type for use
    26  // with apply.
    27  type ContainerStatusApplyConfiguration struct {
    28  	Name                     *string                                 `json:"name,omitempty"`
    29  	State                    *ContainerStateApplyConfiguration       `json:"state,omitempty"`
    30  	LastTerminationState     *ContainerStateApplyConfiguration       `json:"lastState,omitempty"`
    31  	Ready                    *bool                                   `json:"ready,omitempty"`
    32  	RestartCount             *int32                                  `json:"restartCount,omitempty"`
    33  	Image                    *string                                 `json:"image,omitempty"`
    34  	ImageID                  *string                                 `json:"imageID,omitempty"`
    35  	ContainerID              *string                                 `json:"containerID,omitempty"`
    36  	Started                  *bool                                   `json:"started,omitempty"`
    37  	AllocatedResources       *corev1.ResourceList                    `json:"allocatedResources,omitempty"`
    38  	Resources                *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
    39  	VolumeMounts             []VolumeMountStatusApplyConfiguration   `json:"volumeMounts,omitempty"`
    40  	User                     *ContainerUserApplyConfiguration        `json:"user,omitempty"`
    41  	AllocatedResourcesStatus []ResourceStatusApplyConfiguration      `json:"allocatedResourcesStatus,omitempty"`
    42  }
    43  
    44  // ContainerStatusApplyConfiguration constructs a declarative configuration of the ContainerStatus type for use with
    45  // apply.
    46  func ContainerStatus() *ContainerStatusApplyConfiguration {
    47  	return &ContainerStatusApplyConfiguration{}
    48  }
    49  
    50  // WithName sets the Name 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 Name field is set to the value of the last call.
    53  func (b *ContainerStatusApplyConfiguration) WithName(value string) *ContainerStatusApplyConfiguration {
    54  	b.Name = &value
    55  	return b
    56  }
    57  
    58  // WithState sets the State field in the declarative configuration to the given value
    59  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    60  // If called multiple times, the State field is set to the value of the last call.
    61  func (b *ContainerStatusApplyConfiguration) WithState(value *ContainerStateApplyConfiguration) *ContainerStatusApplyConfiguration {
    62  	b.State = value
    63  	return b
    64  }
    65  
    66  // WithLastTerminationState sets the LastTerminationState field in the declarative configuration to the given value
    67  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    68  // If called multiple times, the LastTerminationState field is set to the value of the last call.
    69  func (b *ContainerStatusApplyConfiguration) WithLastTerminationState(value *ContainerStateApplyConfiguration) *ContainerStatusApplyConfiguration {
    70  	b.LastTerminationState = value
    71  	return b
    72  }
    73  
    74  // WithReady sets the Ready 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 Ready field is set to the value of the last call.
    77  func (b *ContainerStatusApplyConfiguration) WithReady(value bool) *ContainerStatusApplyConfiguration {
    78  	b.Ready = &value
    79  	return b
    80  }
    81  
    82  // WithRestartCount sets the RestartCount 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 RestartCount field is set to the value of the last call.
    85  func (b *ContainerStatusApplyConfiguration) WithRestartCount(value int32) *ContainerStatusApplyConfiguration {
    86  	b.RestartCount = &value
    87  	return b
    88  }
    89  
    90  // WithImage sets the Image 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 Image field is set to the value of the last call.
    93  func (b *ContainerStatusApplyConfiguration) WithImage(value string) *ContainerStatusApplyConfiguration {
    94  	b.Image = &value
    95  	return b
    96  }
    97  
    98  // WithImageID sets the ImageID 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 ImageID field is set to the value of the last call.
   101  func (b *ContainerStatusApplyConfiguration) WithImageID(value string) *ContainerStatusApplyConfiguration {
   102  	b.ImageID = &value
   103  	return b
   104  }
   105  
   106  // WithContainerID sets the ContainerID 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 ContainerID field is set to the value of the last call.
   109  func (b *ContainerStatusApplyConfiguration) WithContainerID(value string) *ContainerStatusApplyConfiguration {
   110  	b.ContainerID = &value
   111  	return b
   112  }
   113  
   114  // WithStarted sets the Started field in the declarative configuration to the given value
   115  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   116  // If called multiple times, the Started field is set to the value of the last call.
   117  func (b *ContainerStatusApplyConfiguration) WithStarted(value bool) *ContainerStatusApplyConfiguration {
   118  	b.Started = &value
   119  	return b
   120  }
   121  
   122  // WithAllocatedResources sets the AllocatedResources field in the declarative configuration to the given value
   123  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   124  // If called multiple times, the AllocatedResources field is set to the value of the last call.
   125  func (b *ContainerStatusApplyConfiguration) WithAllocatedResources(value corev1.ResourceList) *ContainerStatusApplyConfiguration {
   126  	b.AllocatedResources = &value
   127  	return b
   128  }
   129  
   130  // WithResources sets the Resources field in the declarative configuration to the given value
   131  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   132  // If called multiple times, the Resources field is set to the value of the last call.
   133  func (b *ContainerStatusApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *ContainerStatusApplyConfiguration {
   134  	b.Resources = value
   135  	return b
   136  }
   137  
   138  // WithVolumeMounts adds the given value to the VolumeMounts 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 VolumeMounts field.
   141  func (b *ContainerStatusApplyConfiguration) WithVolumeMounts(values ...*VolumeMountStatusApplyConfiguration) *ContainerStatusApplyConfiguration {
   142  	for i := range values {
   143  		if values[i] == nil {
   144  			panic("nil value passed to WithVolumeMounts")
   145  		}
   146  		b.VolumeMounts = append(b.VolumeMounts, *values[i])
   147  	}
   148  	return b
   149  }
   150  
   151  // WithUser sets the User 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 User field is set to the value of the last call.
   154  func (b *ContainerStatusApplyConfiguration) WithUser(value *ContainerUserApplyConfiguration) *ContainerStatusApplyConfiguration {
   155  	b.User = value
   156  	return b
   157  }
   158  
   159  // WithAllocatedResourcesStatus adds the given value to the AllocatedResourcesStatus 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 AllocatedResourcesStatus field.
   162  func (b *ContainerStatusApplyConfiguration) WithAllocatedResourcesStatus(values ...*ResourceStatusApplyConfiguration) *ContainerStatusApplyConfiguration {
   163  	for i := range values {
   164  		if values[i] == nil {
   165  			panic("nil value passed to WithAllocatedResourcesStatus")
   166  		}
   167  		b.AllocatedResourcesStatus = append(b.AllocatedResourcesStatus, *values[i])
   168  	}
   169  	return b
   170  }