| 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 a 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 | Terminating *int32 `json:"terminating,omitempty"` |
| 35 | CompletedIndexes *string `json:"completedIndexes,omitempty"` |
| 36 | FailedIndexes *string `json:"failedIndexes,omitempty"` |
| 37 | UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"` |
| 38 | Ready *int32 `json:"ready,omitempty"` |
| 39 | } |
| 40 | |
| 41 | // JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with |
| 42 | // apply. |
| 43 | func JobStatus() *JobStatusApplyConfiguration { |
| 44 | return &JobStatusApplyConfiguration{} |
| 45 | } |
| 46 | |
| 47 | // WithConditions adds the given value to the Conditions field in the declarative configuration |
| 48 | // and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 49 | // If called multiple times, values provided by each call will be appended to the Conditions field. |
| 50 | func (b *JobStatusApplyConfiguration) WithConditions(values ...*JobConditionApplyConfiguration) *JobStatusApplyConfiguration { |
| 51 | for i := range values { |
| 52 | if values[i] == nil { |
| 53 | panic("nil value passed to WithConditions") |
| 54 | } |
| 55 | b.Conditions = append(b.Conditions, *values[i]) |
| 56 | } |
| 57 | return b |
| 58 | } |
| 59 | |
| 60 | // WithStartTime sets the StartTime field in the declarative configuration to the given value |
| 61 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 62 | // If called multiple times, the StartTime field is set to the value of the last call. |
| 63 | func (b *JobStatusApplyConfiguration) WithStartTime(value metav1.Time) *JobStatusApplyConfiguration { |
| 64 | b.StartTime = &value |
| 65 | return b |
| 66 | } |
| 67 | |
| 68 | // WithCompletionTime sets the CompletionTime field in the declarative configuration to the given value |
| 69 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 70 | // If called multiple times, the CompletionTime field is set to the value of the last call. |
| 71 | func (b *JobStatusApplyConfiguration) WithCompletionTime(value metav1.Time) *JobStatusApplyConfiguration { |
| 72 | b.CompletionTime = &value |
| 73 | return b |
| 74 | } |
| 75 | |
| 76 | // WithActive sets the Active field in the declarative configuration to the given value |
| 77 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 78 | // If called multiple times, the Active field is set to the value of the last call. |
| 79 | func (b *JobStatusApplyConfiguration) WithActive(value int32) *JobStatusApplyConfiguration { |
| 80 | b.Active = &value |
| 81 | return b |
| 82 | } |
| 83 | |
| 84 | // WithSucceeded sets the Succeeded field in the declarative configuration to the given value |
| 85 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 86 | // If called multiple times, the Succeeded field is set to the value of the last call. |
| 87 | func (b *JobStatusApplyConfiguration) WithSucceeded(value int32) *JobStatusApplyConfiguration { |
| 88 | b.Succeeded = &value |
| 89 | return b |
| 90 | } |
| 91 | |
| 92 | // WithFailed sets the Failed field in the declarative configuration to the given value |
| 93 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 94 | // If called multiple times, the Failed field is set to the value of the last call. |
| 95 | func (b *JobStatusApplyConfiguration) WithFailed(value int32) *JobStatusApplyConfiguration { |
| 96 | b.Failed = &value |
| 97 | return b |
| 98 | } |
| 99 | |
| 100 | // WithTerminating sets the Terminating field in the declarative configuration to the given value |
| 101 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 102 | // If called multiple times, the Terminating field is set to the value of the last call. |
| 103 | func (b *JobStatusApplyConfiguration) WithTerminating(value int32) *JobStatusApplyConfiguration { |
| 104 | b.Terminating = &value |
| 105 | return b |
| 106 | } |
| 107 | |
| 108 | // WithCompletedIndexes sets the CompletedIndexes field in the declarative configuration to the given value |
| 109 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 110 | // If called multiple times, the CompletedIndexes field is set to the value of the last call. |
| 111 | func (b *JobStatusApplyConfiguration) WithCompletedIndexes(value string) *JobStatusApplyConfiguration { |
| 112 | b.CompletedIndexes = &value |
| 113 | return b |
| 114 | } |
| 115 | |
| 116 | // WithFailedIndexes sets the FailedIndexes field in the declarative configuration to the given value |
| 117 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 118 | // If called multiple times, the FailedIndexes field is set to the value of the last call. |
| 119 | func (b *JobStatusApplyConfiguration) WithFailedIndexes(value string) *JobStatusApplyConfiguration { |
| 120 | b.FailedIndexes = &value |
| 121 | return b |
| 122 | } |
| 123 | |
| 124 | // WithUncountedTerminatedPods sets the UncountedTerminatedPods 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 UncountedTerminatedPods field is set to the value of the last call. |
| 127 | func (b *JobStatusApplyConfiguration) WithUncountedTerminatedPods(value *UncountedTerminatedPodsApplyConfiguration) *JobStatusApplyConfiguration { |
| 128 | b.UncountedTerminatedPods = value |
| 129 | return b |
| 130 | } |
| 131 | |
| 132 | // WithReady sets the Ready field in the declarative configuration to the given value |
| 133 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 134 | // If called multiple times, the Ready field is set to the value of the last call. |
| 135 | func (b *JobStatusApplyConfiguration) WithReady(value int32) *JobStatusApplyConfiguration { |
| 136 | b.Ready = &value |
| 137 | return b |
| 138 | } |