Debian Codegraph @

applyconfigurations/core/v1/podcondition.go

raw
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 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24 )
25
26 // PodConditionApplyConfiguration represents a declarative configuration of the PodCondition type for use
27 // with apply.
28 type PodConditionApplyConfiguration struct {
29 Type *corev1.PodConditionType `json:"type,omitempty"`
30 ObservedGeneration *int64 `json:"observedGeneration,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 // PodConditionApplyConfiguration constructs a declarative configuration of the PodCondition type for use with
39 // apply.
40 func PodCondition() *PodConditionApplyConfiguration {
41 return &PodConditionApplyConfiguration{}
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 *PodConditionApplyConfiguration) WithType(value corev1.PodConditionType) *PodConditionApplyConfiguration {
48 b.Type = &value
49 return b
50 }
51
52 // WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call.
55 func (b *PodConditionApplyConfiguration) WithObservedGeneration(value int64) *PodConditionApplyConfiguration {
56 b.ObservedGeneration = &value
57 return b
58 }
59
60 // WithStatus sets the Status 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 Status field is set to the value of the last call.
63 func (b *PodConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *PodConditionApplyConfiguration {
64 b.Status = &value
65 return b
66 }
67
68 // WithLastProbeTime sets the LastProbeTime 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 LastProbeTime field is set to the value of the last call.
71 func (b *PodConditionApplyConfiguration) WithLastProbeTime(value metav1.Time) *PodConditionApplyConfiguration {
72 b.LastProbeTime = &value
73 return b
74 }
75
76 // WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call.
79 func (b *PodConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *PodConditionApplyConfiguration {
80 b.LastTransitionTime = &value
81 return b
82 }
83
84 // WithReason sets the Reason 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 Reason field is set to the value of the last call.
87 func (b *PodConditionApplyConfiguration) WithReason(value string) *PodConditionApplyConfiguration {
88 b.Reason = &value
89 return b
90 }
91
92 // WithMessage sets the Message 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 Message field is set to the value of the last call.
95 func (b *PodConditionApplyConfiguration) WithMessage(value string) *PodConditionApplyConfiguration {
96 b.Message = &value
97 return b
98 }