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/batch/v1" 23 corev1 "k8s.io/api/core/v1" 24 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 25 ) 26 27 // JobConditionApplyConfiguration represents an declarative configuration of the JobCondition type for use 28 // with apply. 29 type JobConditionApplyConfiguration struct { 30 Type *v1.JobConditionType `json:"type,omitempty"` 31 Status *corev1.ConditionStatus `json:"status,omitempty"` 32 LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` 33 LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` 34 Reason *string `json:"reason,omitempty"` 35 Message *string `json:"message,omitempty"` 36 } 37 38 // JobConditionApplyConfiguration constructs an declarative configuration of the JobCondition type for use with 39 // apply. 40 func JobCondition() *JobConditionApplyConfiguration { 41 return &JobConditionApplyConfiguration{} 42 } 43 44 // WithType sets the Type field in the declarative configuration to the given value 45 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 46 // If called multiple times, the Type field is set to the value of the last call. 47 func (b *JobConditionApplyConfiguration) WithType(value v1.JobConditionType) *JobConditionApplyConfiguration { 48 b.Type = &value 49 return b 50 } 51 52 // WithStatus sets the Status field in the declarative configuration to the given value 53 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 54 // If called multiple times, the Status field is set to the value of the last call. 55 func (b *JobConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *JobConditionApplyConfiguration { 56 b.Status = &value 57 return b 58 } 59 60 // WithLastProbeTime sets the LastProbeTime 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 LastProbeTime field is set to the value of the last call. 63 func (b *JobConditionApplyConfiguration) WithLastProbeTime(value metav1.Time) *JobConditionApplyConfiguration { 64 b.LastProbeTime = &value 65 return b 66 } 67 68 // WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. 71 func (b *JobConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *JobConditionApplyConfiguration { 72 b.LastTransitionTime = &value 73 return b 74 } 75 76 // WithReason sets the Reason 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 Reason field is set to the value of the last call. 79 func (b *JobConditionApplyConfiguration) WithReason(value string) *JobConditionApplyConfiguration { 80 b.Reason = &value 81 return b 82 } 83 84 // WithMessage sets the Message 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 Message field is set to the value of the last call. 87 func (b *JobConditionApplyConfiguration) WithMessage(value string) *JobConditionApplyConfiguration { 88 b.Message = &value 89 return b 90 } 91