1/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Code generated by applyconfiguration-gen. DO NOT EDIT.
18
19package v1
20
21// PersistentVolumeSourceApplyConfiguration represents an declarative configuration of the PersistentVolumeSource type for use
22// with apply.
23type PersistentVolumeSourceApplyConfiguration struct {
24	GCEPersistentDisk    *GCEPersistentDiskVolumeSourceApplyConfiguration    `json:"gcePersistentDisk,omitempty"`
25	AWSElasticBlockStore *AWSElasticBlockStoreVolumeSourceApplyConfiguration `json:"awsElasticBlockStore,omitempty"`
26	HostPath             *HostPathVolumeSourceApplyConfiguration             `json:"hostPath,omitempty"`
27	Glusterfs            *GlusterfsPersistentVolumeSourceApplyConfiguration  `json:"glusterfs,omitempty"`
28	NFS                  *NFSVolumeSourceApplyConfiguration                  `json:"nfs,omitempty"`
29	RBD                  *RBDPersistentVolumeSourceApplyConfiguration        `json:"rbd,omitempty"`
30	ISCSI                *ISCSIPersistentVolumeSourceApplyConfiguration      `json:"iscsi,omitempty"`
31	Cinder               *CinderPersistentVolumeSourceApplyConfiguration     `json:"cinder,omitempty"`
32	CephFS               *CephFSPersistentVolumeSourceApplyConfiguration     `json:"cephfs,omitempty"`
33	FC                   *FCVolumeSourceApplyConfiguration                   `json:"fc,omitempty"`
34	Flocker              *FlockerVolumeSourceApplyConfiguration              `json:"flocker,omitempty"`
35	FlexVolume           *FlexPersistentVolumeSourceApplyConfiguration       `json:"flexVolume,omitempty"`
36	AzureFile            *AzureFilePersistentVolumeSourceApplyConfiguration  `json:"azureFile,omitempty"`
37	VsphereVolume        *VsphereVirtualDiskVolumeSourceApplyConfiguration   `json:"vsphereVolume,omitempty"`
38	Quobyte              *QuobyteVolumeSourceApplyConfiguration              `json:"quobyte,omitempty"`
39	AzureDisk            *AzureDiskVolumeSourceApplyConfiguration            `json:"azureDisk,omitempty"`
40	PhotonPersistentDisk *PhotonPersistentDiskVolumeSourceApplyConfiguration `json:"photonPersistentDisk,omitempty"`
41	PortworxVolume       *PortworxVolumeSourceApplyConfiguration             `json:"portworxVolume,omitempty"`
42	ScaleIO              *ScaleIOPersistentVolumeSourceApplyConfiguration    `json:"scaleIO,omitempty"`
43	Local                *LocalVolumeSourceApplyConfiguration                `json:"local,omitempty"`
44	StorageOS            *StorageOSPersistentVolumeSourceApplyConfiguration  `json:"storageos,omitempty"`
45	CSI                  *CSIPersistentVolumeSourceApplyConfiguration        `json:"csi,omitempty"`
46}
47
48// PersistentVolumeSourceApplyConfiguration constructs an declarative configuration of the PersistentVolumeSource type for use with
49// apply.
50func PersistentVolumeSource() *PersistentVolumeSourceApplyConfiguration {
51	return &PersistentVolumeSourceApplyConfiguration{}
52}
53
54// WithGCEPersistentDisk sets the GCEPersistentDisk field in the declarative configuration to the given value
55// and returns the receiver, so that objects can be built by chaining "With" function invocations.
56// If called multiple times, the GCEPersistentDisk field is set to the value of the last call.
57func (b *PersistentVolumeSourceApplyConfiguration) WithGCEPersistentDisk(value *GCEPersistentDiskVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
58	b.GCEPersistentDisk = value
59	return b
60}
61
62// WithAWSElasticBlockStore sets the AWSElasticBlockStore 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 AWSElasticBlockStore field is set to the value of the last call.
65func (b *PersistentVolumeSourceApplyConfiguration) WithAWSElasticBlockStore(value *AWSElasticBlockStoreVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
66	b.AWSElasticBlockStore = value
67	return b
68}
69
70// WithHostPath sets the HostPath 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 HostPath field is set to the value of the last call.
73func (b *PersistentVolumeSourceApplyConfiguration) WithHostPath(value *HostPathVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
74	b.HostPath = value
75	return b
76}
77
78// WithGlusterfs sets the Glusterfs 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 Glusterfs field is set to the value of the last call.
81func (b *PersistentVolumeSourceApplyConfiguration) WithGlusterfs(value *GlusterfsPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
82	b.Glusterfs = value
83	return b
84}
85
86// WithNFS sets the NFS 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 NFS field is set to the value of the last call.
89func (b *PersistentVolumeSourceApplyConfiguration) WithNFS(value *NFSVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
90	b.NFS = value
91	return b
92}
93
94// WithRBD sets the RBD 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 RBD field is set to the value of the last call.
97func (b *PersistentVolumeSourceApplyConfiguration) WithRBD(value *RBDPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
98	b.RBD = value
99	return b
100}
101
102// WithISCSI sets the ISCSI 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 ISCSI field is set to the value of the last call.
105func (b *PersistentVolumeSourceApplyConfiguration) WithISCSI(value *ISCSIPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
106	b.ISCSI = value
107	return b
108}
109
110// WithCinder sets the Cinder 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 Cinder field is set to the value of the last call.
113func (b *PersistentVolumeSourceApplyConfiguration) WithCinder(value *CinderPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
114	b.Cinder = value
115	return b
116}
117
118// WithCephFS sets the CephFS 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 CephFS field is set to the value of the last call.
121func (b *PersistentVolumeSourceApplyConfiguration) WithCephFS(value *CephFSPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
122	b.CephFS = value
123	return b
124}
125
126// WithFC sets the FC 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 FC field is set to the value of the last call.
129func (b *PersistentVolumeSourceApplyConfiguration) WithFC(value *FCVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
130	b.FC = value
131	return b
132}
133
134// WithFlocker sets the Flocker 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 Flocker field is set to the value of the last call.
137func (b *PersistentVolumeSourceApplyConfiguration) WithFlocker(value *FlockerVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
138	b.Flocker = value
139	return b
140}
141
142// WithFlexVolume sets the FlexVolume 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 FlexVolume field is set to the value of the last call.
145func (b *PersistentVolumeSourceApplyConfiguration) WithFlexVolume(value *FlexPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
146	b.FlexVolume = value
147	return b
148}
149
150// WithAzureFile sets the AzureFile 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 AzureFile field is set to the value of the last call.
153func (b *PersistentVolumeSourceApplyConfiguration) WithAzureFile(value *AzureFilePersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
154	b.AzureFile = value
155	return b
156}
157
158// WithVsphereVolume sets the VsphereVolume 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 VsphereVolume field is set to the value of the last call.
161func (b *PersistentVolumeSourceApplyConfiguration) WithVsphereVolume(value *VsphereVirtualDiskVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
162	b.VsphereVolume = value
163	return b
164}
165
166// WithQuobyte sets the Quobyte 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 Quobyte field is set to the value of the last call.
169func (b *PersistentVolumeSourceApplyConfiguration) WithQuobyte(value *QuobyteVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
170	b.Quobyte = value
171	return b
172}
173
174// WithAzureDisk sets the AzureDisk 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 AzureDisk field is set to the value of the last call.
177func (b *PersistentVolumeSourceApplyConfiguration) WithAzureDisk(value *AzureDiskVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
178	b.AzureDisk = value
179	return b
180}
181
182// WithPhotonPersistentDisk sets the PhotonPersistentDisk 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 PhotonPersistentDisk field is set to the value of the last call.
185func (b *PersistentVolumeSourceApplyConfiguration) WithPhotonPersistentDisk(value *PhotonPersistentDiskVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
186	b.PhotonPersistentDisk = value
187	return b
188}
189
190// WithPortworxVolume sets the PortworxVolume 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 PortworxVolume field is set to the value of the last call.
193func (b *PersistentVolumeSourceApplyConfiguration) WithPortworxVolume(value *PortworxVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
194	b.PortworxVolume = value
195	return b
196}
197
198// WithScaleIO sets the ScaleIO 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 ScaleIO field is set to the value of the last call.
201func (b *PersistentVolumeSourceApplyConfiguration) WithScaleIO(value *ScaleIOPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
202	b.ScaleIO = value
203	return b
204}
205
206// WithLocal sets the Local 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 Local field is set to the value of the last call.
209func (b *PersistentVolumeSourceApplyConfiguration) WithLocal(value *LocalVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
210	b.Local = value
211	return b
212}
213
214// WithStorageOS sets the StorageOS 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 StorageOS field is set to the value of the last call.
217func (b *PersistentVolumeSourceApplyConfiguration) WithStorageOS(value *StorageOSPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
218	b.StorageOS = value
219	return b
220}
221
222// WithCSI sets the CSI 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 CSI field is set to the value of the last call.
225func (b *PersistentVolumeSourceApplyConfiguration) WithCSI(value *CSIPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSourceApplyConfiguration {
226	b.CSI = value
227	return b
228}
229