...

Source file src/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.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/apimachinery/pkg/apis/meta/v1"
    23  )
    24  
    25  // ContainerStateTerminatedApplyConfiguration represents an declarative configuration of the ContainerStateTerminated type for use
    26  // with apply.
    27  type ContainerStateTerminatedApplyConfiguration struct {
    28  	ExitCode    *int32   `json:"exitCode,omitempty"`
    29  	Signal      *int32   `json:"signal,omitempty"`
    30  	Reason      *string  `json:"reason,omitempty"`
    31  	Message     *string  `json:"message,omitempty"`
    32  	StartedAt   *v1.Time `json:"startedAt,omitempty"`
    33  	FinishedAt  *v1.Time `json:"finishedAt,omitempty"`
    34  	ContainerID *string  `json:"containerID,omitempty"`
    35  }
    36  
    37  // ContainerStateTerminatedApplyConfiguration constructs an declarative configuration of the ContainerStateTerminated type for use with
    38  // apply.
    39  func ContainerStateTerminated() *ContainerStateTerminatedApplyConfiguration {
    40  	return &ContainerStateTerminatedApplyConfiguration{}
    41  }
    42  
    43  // WithExitCode sets the ExitCode field in the declarative configuration to the given value
    44  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    45  // If called multiple times, the ExitCode field is set to the value of the last call.
    46  func (b *ContainerStateTerminatedApplyConfiguration) WithExitCode(value int32) *ContainerStateTerminatedApplyConfiguration {
    47  	b.ExitCode = &value
    48  	return b
    49  }
    50  
    51  // WithSignal sets the Signal field in the declarative configuration to the given value
    52  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    53  // If called multiple times, the Signal field is set to the value of the last call.
    54  func (b *ContainerStateTerminatedApplyConfiguration) WithSignal(value int32) *ContainerStateTerminatedApplyConfiguration {
    55  	b.Signal = &value
    56  	return b
    57  }
    58  
    59  // WithReason sets the Reason field in the declarative configuration to the given value
    60  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    61  // If called multiple times, the Reason field is set to the value of the last call.
    62  func (b *ContainerStateTerminatedApplyConfiguration) WithReason(value string) *ContainerStateTerminatedApplyConfiguration {
    63  	b.Reason = &value
    64  	return b
    65  }
    66  
    67  // WithMessage sets the Message field in the declarative configuration to the given value
    68  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    69  // If called multiple times, the Message field is set to the value of the last call.
    70  func (b *ContainerStateTerminatedApplyConfiguration) WithMessage(value string) *ContainerStateTerminatedApplyConfiguration {
    71  	b.Message = &value
    72  	return b
    73  }
    74  
    75  // WithStartedAt sets the StartedAt field in the declarative configuration to the given value
    76  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    77  // If called multiple times, the StartedAt field is set to the value of the last call.
    78  func (b *ContainerStateTerminatedApplyConfiguration) WithStartedAt(value v1.Time) *ContainerStateTerminatedApplyConfiguration {
    79  	b.StartedAt = &value
    80  	return b
    81  }
    82  
    83  // WithFinishedAt sets the FinishedAt field in the declarative configuration to the given value
    84  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    85  // If called multiple times, the FinishedAt field is set to the value of the last call.
    86  func (b *ContainerStateTerminatedApplyConfiguration) WithFinishedAt(value v1.Time) *ContainerStateTerminatedApplyConfiguration {
    87  	b.FinishedAt = &value
    88  	return b
    89  }
    90  
    91  // WithContainerID sets the ContainerID field in the declarative configuration to the given value
    92  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    93  // If called multiple times, the ContainerID field is set to the value of the last call.
    94  func (b *ContainerStateTerminatedApplyConfiguration) WithContainerID(value string) *ContainerStateTerminatedApplyConfiguration {
    95  	b.ContainerID = &value
    96  	return b
    97  }
    98  

View as plain text