| 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 |
// VolumeSourceApplyConfiguration represents a declarative configuration of the VolumeSource type for use |
| 22 |
// with apply. |
| 23 |
type VolumeSourceApplyConfiguration struct { |
| 24 |
HostPath *HostPathVolumeSourceApplyConfiguration `json:"hostPath,omitempty"` |
| 25 |
EmptyDir *EmptyDirVolumeSourceApplyConfiguration `json:"emptyDir,omitempty"` |
| 26 |
GCEPersistentDisk *GCEPersistentDiskVolumeSourceApplyConfiguration `json:"gcePersistentDisk,omitempty"` |
| 27 |
AWSElasticBlockStore *AWSElasticBlockStoreVolumeSourceApplyConfiguration `json:"awsElasticBlockStore,omitempty"` |
| 28 |
GitRepo *GitRepoVolumeSourceApplyConfiguration `json:"gitRepo,omitempty"` |
| 29 |
Secret *SecretVolumeSourceApplyConfiguration `json:"secret,omitempty"` |
| 30 |
NFS *NFSVolumeSourceApplyConfiguration `json:"nfs,omitempty"` |
| 31 |
ISCSI *ISCSIVolumeSourceApplyConfiguration `json:"iscsi,omitempty"` |
| 32 |
Glusterfs *GlusterfsVolumeSourceApplyConfiguration `json:"glusterfs,omitempty"` |
| 33 |
PersistentVolumeClaim *PersistentVolumeClaimVolumeSourceApplyConfiguration `json:"persistentVolumeClaim,omitempty"` |
| 34 |
RBD *RBDVolumeSourceApplyConfiguration `json:"rbd,omitempty"` |
| 35 |
FlexVolume *FlexVolumeSourceApplyConfiguration `json:"flexVolume,omitempty"` |
| 36 |
Cinder *CinderVolumeSourceApplyConfiguration `json:"cinder,omitempty"` |
| 37 |
CephFS *CephFSVolumeSourceApplyConfiguration `json:"cephfs,omitempty"` |
| 38 |
Flocker *FlockerVolumeSourceApplyConfiguration `json:"flocker,omitempty"` |
| 39 |
DownwardAPI *DownwardAPIVolumeSourceApplyConfiguration `json:"downwardAPI,omitempty"` |
| 40 |
FC *FCVolumeSourceApplyConfiguration `json:"fc,omitempty"` |
| 41 |
AzureFile *AzureFileVolumeSourceApplyConfiguration `json:"azureFile,omitempty"` |
| 42 |
ConfigMap *ConfigMapVolumeSourceApplyConfiguration `json:"configMap,omitempty"` |
| 43 |
VsphereVolume *VsphereVirtualDiskVolumeSourceApplyConfiguration `json:"vsphereVolume,omitempty"` |
| 44 |
Quobyte *QuobyteVolumeSourceApplyConfiguration `json:"quobyte,omitempty"` |
| 45 |
AzureDisk *AzureDiskVolumeSourceApplyConfiguration `json:"azureDisk,omitempty"` |
| 46 |
PhotonPersistentDisk *PhotonPersistentDiskVolumeSourceApplyConfiguration `json:"photonPersistentDisk,omitempty"` |
| 47 |
Projected *ProjectedVolumeSourceApplyConfiguration `json:"projected,omitempty"` |
| 48 |
PortworxVolume *PortworxVolumeSourceApplyConfiguration `json:"portworxVolume,omitempty"` |
| 49 |
ScaleIO *ScaleIOVolumeSourceApplyConfiguration `json:"scaleIO,omitempty"` |
| 50 |
StorageOS *StorageOSVolumeSourceApplyConfiguration `json:"storageos,omitempty"` |
| 51 |
CSI *CSIVolumeSourceApplyConfiguration `json:"csi,omitempty"` |
| 52 |
Ephemeral *EphemeralVolumeSourceApplyConfiguration `json:"ephemeral,omitempty"` |
| 53 |
Image *ImageVolumeSourceApplyConfiguration `json:"image,omitempty"` |
| 54 |
} |
| 55 |
|
| 56 |
// VolumeSourceApplyConfiguration constructs a declarative configuration of the VolumeSource type for use with |
| 57 |
// apply. |
| 58 |
func VolumeSource() *VolumeSourceApplyConfiguration { |
| 59 |
return &VolumeSourceApplyConfiguration{} |
| 60 |
} |
| 61 |
|
| 62 |
// WithHostPath sets the HostPath field in the declarative configuration to the given value |
| 63 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 64 |
// If called multiple times, the HostPath field is set to the value of the last call. |
| 65 |
func (b *VolumeSourceApplyConfiguration) WithHostPath(value *HostPathVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 66 |
b.HostPath = value |
| 67 |
return b |
| 68 |
} |
| 69 |
|
| 70 |
// WithEmptyDir sets the EmptyDir field in the declarative configuration to the given value |
| 71 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 72 |
// If called multiple times, the EmptyDir field is set to the value of the last call. |
| 73 |
func (b *VolumeSourceApplyConfiguration) WithEmptyDir(value *EmptyDirVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 74 |
b.EmptyDir = value |
| 75 |
return b |
| 76 |
} |
| 77 |
|
| 78 |
// WithGCEPersistentDisk sets the GCEPersistentDisk field in the declarative configuration to the given value |
| 79 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 80 |
// If called multiple times, the GCEPersistentDisk field is set to the value of the last call. |
| 81 |
func (b *VolumeSourceApplyConfiguration) WithGCEPersistentDisk(value *GCEPersistentDiskVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 82 |
b.GCEPersistentDisk = value |
| 83 |
return b |
| 84 |
} |
| 85 |
|
| 86 |
// WithAWSElasticBlockStore sets the AWSElasticBlockStore field in the declarative configuration to the given value |
| 87 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 88 |
// If called multiple times, the AWSElasticBlockStore field is set to the value of the last call. |
| 89 |
func (b *VolumeSourceApplyConfiguration) WithAWSElasticBlockStore(value *AWSElasticBlockStoreVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 90 |
b.AWSElasticBlockStore = value |
| 91 |
return b |
| 92 |
} |
| 93 |
|
| 94 |
// WithGitRepo sets the GitRepo field in the declarative configuration to the given value |
| 95 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 96 |
// If called multiple times, the GitRepo field is set to the value of the last call. |
| 97 |
func (b *VolumeSourceApplyConfiguration) WithGitRepo(value *GitRepoVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 98 |
b.GitRepo = value |
| 99 |
return b |
| 100 |
} |
| 101 |
|
| 102 |
// WithSecret sets the Secret field in the declarative configuration to the given value |
| 103 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 104 |
// If called multiple times, the Secret field is set to the value of the last call. |
| 105 |
func (b *VolumeSourceApplyConfiguration) WithSecret(value *SecretVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 106 |
b.Secret = value |
| 107 |
return b |
| 108 |
} |
| 109 |
|
| 110 |
// WithNFS sets the NFS field in the declarative configuration to the given value |
| 111 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 112 |
// If called multiple times, the NFS field is set to the value of the last call. |
| 113 |
func (b *VolumeSourceApplyConfiguration) WithNFS(value *NFSVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 114 |
b.NFS = value |
| 115 |
return b |
| 116 |
} |
| 117 |
|
| 118 |
// WithISCSI sets the ISCSI field in the declarative configuration to the given value |
| 119 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 120 |
// If called multiple times, the ISCSI field is set to the value of the last call. |
| 121 |
func (b *VolumeSourceApplyConfiguration) WithISCSI(value *ISCSIVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 122 |
b.ISCSI = value |
| 123 |
return b |
| 124 |
} |
| 125 |
|
| 126 |
// WithGlusterfs sets the Glusterfs field in the declarative configuration to the given value |
| 127 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 128 |
// If called multiple times, the Glusterfs field is set to the value of the last call. |
| 129 |
func (b *VolumeSourceApplyConfiguration) WithGlusterfs(value *GlusterfsVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 130 |
b.Glusterfs = value |
| 131 |
return b |
| 132 |
} |
| 133 |
|
| 134 |
// WithPersistentVolumeClaim sets the PersistentVolumeClaim field in the declarative configuration to the given value |
| 135 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 136 |
// If called multiple times, the PersistentVolumeClaim field is set to the value of the last call. |
| 137 |
func (b *VolumeSourceApplyConfiguration) WithPersistentVolumeClaim(value *PersistentVolumeClaimVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 138 |
b.PersistentVolumeClaim = value |
| 139 |
return b |
| 140 |
} |
| 141 |
|
| 142 |
// WithRBD sets the RBD field in the declarative configuration to the given value |
| 143 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 144 |
// If called multiple times, the RBD field is set to the value of the last call. |
| 145 |
func (b *VolumeSourceApplyConfiguration) WithRBD(value *RBDVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 146 |
b.RBD = value |
| 147 |
return b |
| 148 |
} |
| 149 |
|
| 150 |
// WithFlexVolume sets the FlexVolume field in the declarative configuration to the given value |
| 151 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 152 |
// If called multiple times, the FlexVolume field is set to the value of the last call. |
| 153 |
func (b *VolumeSourceApplyConfiguration) WithFlexVolume(value *FlexVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 154 |
b.FlexVolume = value |
| 155 |
return b |
| 156 |
} |
| 157 |
|
| 158 |
// WithCinder sets the Cinder field in the declarative configuration to the given value |
| 159 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 160 |
// If called multiple times, the Cinder field is set to the value of the last call. |
| 161 |
func (b *VolumeSourceApplyConfiguration) WithCinder(value *CinderVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 162 |
b.Cinder = value |
| 163 |
return b |
| 164 |
} |
| 165 |
|
| 166 |
// WithCephFS sets the CephFS field in the declarative configuration to the given value |
| 167 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 168 |
// If called multiple times, the CephFS field is set to the value of the last call. |
| 169 |
func (b *VolumeSourceApplyConfiguration) WithCephFS(value *CephFSVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 170 |
b.CephFS = value |
| 171 |
return b |
| 172 |
} |
| 173 |
|
| 174 |
// WithFlocker sets the Flocker field in the declarative configuration to the given value |
| 175 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 176 |
// If called multiple times, the Flocker field is set to the value of the last call. |
| 177 |
func (b *VolumeSourceApplyConfiguration) WithFlocker(value *FlockerVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 178 |
b.Flocker = value |
| 179 |
return b |
| 180 |
} |
| 181 |
|
| 182 |
// WithDownwardAPI sets the DownwardAPI field in the declarative configuration to the given value |
| 183 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 184 |
// If called multiple times, the DownwardAPI field is set to the value of the last call. |
| 185 |
func (b *VolumeSourceApplyConfiguration) WithDownwardAPI(value *DownwardAPIVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 186 |
b.DownwardAPI = value |
| 187 |
return b |
| 188 |
} |
| 189 |
|
| 190 |
// WithFC sets the FC field in the declarative configuration to the given value |
| 191 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 192 |
// If called multiple times, the FC field is set to the value of the last call. |
| 193 |
func (b *VolumeSourceApplyConfiguration) WithFC(value *FCVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 194 |
b.FC = value |
| 195 |
return b |
| 196 |
} |
| 197 |
|
| 198 |
// WithAzureFile sets the AzureFile field in the declarative configuration to the given value |
| 199 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 200 |
// If called multiple times, the AzureFile field is set to the value of the last call. |
| 201 |
func (b *VolumeSourceApplyConfiguration) WithAzureFile(value *AzureFileVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 202 |
b.AzureFile = value |
| 203 |
return b |
| 204 |
} |
| 205 |
|
| 206 |
// WithConfigMap sets the ConfigMap field in the declarative configuration to the given value |
| 207 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 208 |
// If called multiple times, the ConfigMap field is set to the value of the last call. |
| 209 |
func (b *VolumeSourceApplyConfiguration) WithConfigMap(value *ConfigMapVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 210 |
b.ConfigMap = value |
| 211 |
return b |
| 212 |
} |
| 213 |
|
| 214 |
// WithVsphereVolume sets the VsphereVolume field in the declarative configuration to the given value |
| 215 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 216 |
// If called multiple times, the VsphereVolume field is set to the value of the last call. |
| 217 |
func (b *VolumeSourceApplyConfiguration) WithVsphereVolume(value *VsphereVirtualDiskVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 218 |
b.VsphereVolume = value |
| 219 |
return b |
| 220 |
} |
| 221 |
|
| 222 |
// WithQuobyte sets the Quobyte field in the declarative configuration to the given value |
| 223 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 224 |
// If called multiple times, the Quobyte field is set to the value of the last call. |
| 225 |
func (b *VolumeSourceApplyConfiguration) WithQuobyte(value *QuobyteVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 226 |
b.Quobyte = value |
| 227 |
return b |
| 228 |
} |
| 229 |
|
| 230 |
// WithAzureDisk sets the AzureDisk field in the declarative configuration to the given value |
| 231 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 232 |
// If called multiple times, the AzureDisk field is set to the value of the last call. |
| 233 |
func (b *VolumeSourceApplyConfiguration) WithAzureDisk(value *AzureDiskVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 234 |
b.AzureDisk = value |
| 235 |
return b |
| 236 |
} |
| 237 |
|
| 238 |
// WithPhotonPersistentDisk sets the PhotonPersistentDisk field in the declarative configuration to the given value |
| 239 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 240 |
// If called multiple times, the PhotonPersistentDisk field is set to the value of the last call. |
| 241 |
func (b *VolumeSourceApplyConfiguration) WithPhotonPersistentDisk(value *PhotonPersistentDiskVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 242 |
b.PhotonPersistentDisk = value |
| 243 |
return b |
| 244 |
} |
| 245 |
|
| 246 |
// WithProjected sets the Projected field in the declarative configuration to the given value |
| 247 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 248 |
// If called multiple times, the Projected field is set to the value of the last call. |
| 249 |
func (b *VolumeSourceApplyConfiguration) WithProjected(value *ProjectedVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 250 |
b.Projected = value |
| 251 |
return b |
| 252 |
} |
| 253 |
|
| 254 |
// WithPortworxVolume sets the PortworxVolume field in the declarative configuration to the given value |
| 255 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 256 |
// If called multiple times, the PortworxVolume field is set to the value of the last call. |
| 257 |
func (b *VolumeSourceApplyConfiguration) WithPortworxVolume(value *PortworxVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 258 |
b.PortworxVolume = value |
| 259 |
return b |
| 260 |
} |
| 261 |
|
| 262 |
// WithScaleIO sets the ScaleIO field in the declarative configuration to the given value |
| 263 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 264 |
// If called multiple times, the ScaleIO field is set to the value of the last call. |
| 265 |
func (b *VolumeSourceApplyConfiguration) WithScaleIO(value *ScaleIOVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 266 |
b.ScaleIO = value |
| 267 |
return b |
| 268 |
} |
| 269 |
|
| 270 |
// WithStorageOS sets the StorageOS field in the declarative configuration to the given value |
| 271 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 272 |
// If called multiple times, the StorageOS field is set to the value of the last call. |
| 273 |
func (b *VolumeSourceApplyConfiguration) WithStorageOS(value *StorageOSVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 274 |
b.StorageOS = value |
| 275 |
return b |
| 276 |
} |
| 277 |
|
| 278 |
// WithCSI sets the CSI field in the declarative configuration to the given value |
| 279 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 280 |
// If called multiple times, the CSI field is set to the value of the last call. |
| 281 |
func (b *VolumeSourceApplyConfiguration) WithCSI(value *CSIVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 282 |
b.CSI = value |
| 283 |
return b |
| 284 |
} |
| 285 |
|
| 286 |
// WithEphemeral sets the Ephemeral field in the declarative configuration to the given value |
| 287 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 288 |
// If called multiple times, the Ephemeral field is set to the value of the last call. |
| 289 |
func (b *VolumeSourceApplyConfiguration) WithEphemeral(value *EphemeralVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 290 |
b.Ephemeral = value |
| 291 |
return b |
| 292 |
} |
| 293 |
|
| 294 |
// WithImage sets the Image field in the declarative configuration to the given value |
| 295 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 296 |
// If called multiple times, the Image field is set to the value of the last call. |
| 297 |
func (b *VolumeSourceApplyConfiguration) WithImage(value *ImageVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration { |
| 298 |
b.Image = value |
| 299 |
return b |
| 300 |
} |