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