...

Source file src/k8s.io/client-go/applyconfigurations/core/v1/volumesource.go

Documentation: k8s.io/client-go/applyconfigurations/core/v1

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

View as plain text