| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package v1 |
| 20 |
|
| 21 |
import ( |
| 22 |
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 23 |
types "k8s.io/apimachinery/pkg/types" |
| 24 |
metav1 "k8s.io/client-go/applyconfigurations/meta/v1" |
| 25 |
) |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
type JobTemplateSpecApplyConfiguration struct { |
| 30 |
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` |
| 31 |
Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
func JobTemplateSpec() *JobTemplateSpecApplyConfiguration { |
| 37 |
return &JobTemplateSpecApplyConfiguration{} |
| 38 |
} |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
func (b *JobTemplateSpecApplyConfiguration) WithName(value string) *JobTemplateSpecApplyConfiguration { |
| 44 |
b.ensureObjectMetaApplyConfigurationExists() |
| 45 |
b.ObjectMetaApplyConfiguration.Name = &value |
| 46 |
return b |
| 47 |
} |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
func (b *JobTemplateSpecApplyConfiguration) WithGenerateName(value string) *JobTemplateSpecApplyConfiguration { |
| 53 |
b.ensureObjectMetaApplyConfigurationExists() |
| 54 |
b.ObjectMetaApplyConfiguration.GenerateName = &value |
| 55 |
return b |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemplateSpecApplyConfiguration { |
| 62 |
b.ensureObjectMetaApplyConfigurationExists() |
| 63 |
b.ObjectMetaApplyConfiguration.Namespace = &value |
| 64 |
return b |
| 65 |
} |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
func (b *JobTemplateSpecApplyConfiguration) WithUID(value types.UID) *JobTemplateSpecApplyConfiguration { |
| 71 |
b.ensureObjectMetaApplyConfigurationExists() |
| 72 |
b.ObjectMetaApplyConfiguration.UID = &value |
| 73 |
return b |
| 74 |
} |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
func (b *JobTemplateSpecApplyConfiguration) WithResourceVersion(value string) *JobTemplateSpecApplyConfiguration { |
| 80 |
b.ensureObjectMetaApplyConfigurationExists() |
| 81 |
b.ObjectMetaApplyConfiguration.ResourceVersion = &value |
| 82 |
return b |
| 83 |
} |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
func (b *JobTemplateSpecApplyConfiguration) WithGeneration(value int64) *JobTemplateSpecApplyConfiguration { |
| 89 |
b.ensureObjectMetaApplyConfigurationExists() |
| 90 |
b.ObjectMetaApplyConfiguration.Generation = &value |
| 91 |
return b |
| 92 |
} |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
func (b *JobTemplateSpecApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *JobTemplateSpecApplyConfiguration { |
| 98 |
b.ensureObjectMetaApplyConfigurationExists() |
| 99 |
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value |
| 100 |
return b |
| 101 |
} |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
func (b *JobTemplateSpecApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *JobTemplateSpecApplyConfiguration { |
| 107 |
b.ensureObjectMetaApplyConfigurationExists() |
| 108 |
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value |
| 109 |
return b |
| 110 |
} |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
func (b *JobTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobTemplateSpecApplyConfiguration { |
| 116 |
b.ensureObjectMetaApplyConfigurationExists() |
| 117 |
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value |
| 118 |
return b |
| 119 |
} |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
func (b *JobTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *JobTemplateSpecApplyConfiguration { |
| 126 |
b.ensureObjectMetaApplyConfigurationExists() |
| 127 |
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { |
| 128 |
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) |
| 129 |
} |
| 130 |
for k, v := range entries { |
| 131 |
b.ObjectMetaApplyConfiguration.Labels[k] = v |
| 132 |
} |
| 133 |
return b |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
func (b *JobTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *JobTemplateSpecApplyConfiguration { |
| 141 |
b.ensureObjectMetaApplyConfigurationExists() |
| 142 |
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { |
| 143 |
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) |
| 144 |
} |
| 145 |
for k, v := range entries { |
| 146 |
b.ObjectMetaApplyConfiguration.Annotations[k] = v |
| 147 |
} |
| 148 |
return b |
| 149 |
} |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
func (b *JobTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *JobTemplateSpecApplyConfiguration { |
| 155 |
b.ensureObjectMetaApplyConfigurationExists() |
| 156 |
for i := range values { |
| 157 |
if values[i] == nil { |
| 158 |
panic("nil value passed to WithOwnerReferences") |
| 159 |
} |
| 160 |
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) |
| 161 |
} |
| 162 |
return b |
| 163 |
} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *JobTemplateSpecApplyConfiguration { |
| 169 |
b.ensureObjectMetaApplyConfigurationExists() |
| 170 |
for i := range values { |
| 171 |
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) |
| 172 |
} |
| 173 |
return b |
| 174 |
} |
| 175 |
|
| 176 |
func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { |
| 177 |
if b.ObjectMetaApplyConfiguration == nil { |
| 178 |
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} |
| 179 |
} |
| 180 |
} |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
func (b *JobTemplateSpecApplyConfiguration) WithSpec(value *JobSpecApplyConfiguration) *JobTemplateSpecApplyConfiguration { |
| 186 |
b.Spec = value |
| 187 |
return b |
| 188 |
} |
| 189 |
|
| 190 |
|
| 191 |
func (b *JobTemplateSpecApplyConfiguration) GetName() *string { |
| 192 |
b.ensureObjectMetaApplyConfigurationExists() |
| 193 |
return b.ObjectMetaApplyConfiguration.Name |
| 194 |
} |