Debian Codegraph @

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