k8s.io/client-go@v0.22.2/applyconfigurations/batch/v1/jobstatus.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 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 23 ) 24 25 // JobStatusApplyConfiguration represents an declarative configuration of the JobStatus type for use 26 // with apply. 27 type JobStatusApplyConfiguration struct { 28 Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"` 29 StartTime *metav1.Time `json:"startTime,omitempty"` 30 CompletionTime *metav1.Time `json:"completionTime,omitempty"` 31 Active *int32 `json:"active,omitempty"` 32 Succeeded *int32 `json:"succeeded,omitempty"` 33 Failed *int32 `json:"failed,omitempty"` 34 CompletedIndexes *string `json:"completedIndexes,omitempty"` 35 UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"` 36 } 37 38 // JobStatusApplyConfiguration constructs an declarative configuration of the JobStatus type for use with 39 // apply. 40 func JobStatus() *JobStatusApplyConfiguration { 41 return &JobStatusApplyConfiguration{} 42 } 43 44 // WithConditions adds the given value to the Conditions field in the declarative configuration 45 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 46 // If called multiple times, values provided by each call will be appended to the Conditions field. 47 func (b *JobStatusApplyConfiguration) WithConditions(values ...*JobConditionApplyConfiguration) *JobStatusApplyConfiguration { 48 for i := range values { 49 if values[i] == nil { 50 panic("nil value passed to WithConditions") 51 } 52 b.Conditions = append(b.Conditions, *values[i]) 53 } 54 return b 55 } 56 57 // WithStartTime sets the StartTime field in the declarative configuration to the given value 58 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 59 // If called multiple times, the StartTime field is set to the value of the last call. 60 func (b *JobStatusApplyConfiguration) WithStartTime(value metav1.Time) *JobStatusApplyConfiguration { 61 b.StartTime = &value 62 return b 63 } 64 65 // WithCompletionTime sets the CompletionTime field in the declarative configuration to the given value 66 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 67 // If called multiple times, the CompletionTime field is set to the value of the last call. 68 func (b *JobStatusApplyConfiguration) WithCompletionTime(value metav1.Time) *JobStatusApplyConfiguration { 69 b.CompletionTime = &value 70 return b 71 } 72 73 // WithActive sets the Active field in the declarative configuration to the given value 74 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 75 // If called multiple times, the Active field is set to the value of the last call. 76 func (b *JobStatusApplyConfiguration) WithActive(value int32) *JobStatusApplyConfiguration { 77 b.Active = &value 78 return b 79 } 80 81 // WithSucceeded sets the Succeeded field in the declarative configuration to the given value 82 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 83 // If called multiple times, the Succeeded field is set to the value of the last call. 84 func (b *JobStatusApplyConfiguration) WithSucceeded(value int32) *JobStatusApplyConfiguration { 85 b.Succeeded = &value 86 return b 87 } 88 89 // WithFailed sets the Failed field in the declarative configuration to the given value 90 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 91 // If called multiple times, the Failed field is set to the value of the last call. 92 func (b *JobStatusApplyConfiguration) WithFailed(value int32) *JobStatusApplyConfiguration { 93 b.Failed = &value 94 return b 95 } 96 97 // WithCompletedIndexes sets the CompletedIndexes field in the declarative configuration to the given value 98 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 99 // If called multiple times, the CompletedIndexes field is set to the value of the last call. 100 func (b *JobStatusApplyConfiguration) WithCompletedIndexes(value string) *JobStatusApplyConfiguration { 101 b.CompletedIndexes = &value 102 return b 103 } 104 105 // WithUncountedTerminatedPods sets the UncountedTerminatedPods field in the declarative configuration to the given value 106 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 107 // If called multiple times, the UncountedTerminatedPods field is set to the value of the last call. 108 func (b *JobStatusApplyConfiguration) WithUncountedTerminatedPods(value *UncountedTerminatedPodsApplyConfiguration) *JobStatusApplyConfiguration { 109 b.UncountedTerminatedPods = value 110 return b 111 }