//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
//
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
///
/// Volume represents a named volume in a pod that may be accessed by any
/// container in the pod.
///
public partial class V1Volume
{
///
/// Initializes a new instance of the V1Volume class.
///
public V1Volume()
{
CustomInit();
}
///
/// Initializes a new instance of the V1Volume class.
///
/// Volume's name. Must be a DNS_LABEL and unique
/// within the pod. More info:
/// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
/// AWSElasticBlockStore represents
/// an AWS Disk resource that is attached to a kubelet's host machine
/// and then exposed to the pod. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
/// AzureDisk represents an Azure Data Disk
/// mount on the host and bind mount to the pod.
/// AzureFile represents an Azure File Service
/// mount on the host and bind mount to the pod.
/// CephFS represents a Ceph FS mount on the host
/// that shares a pod's lifetime
/// Cinder represents a cinder volume attached and
/// mounted on kubelets host machine More info:
/// https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
/// ConfigMap represents a configMap that
/// should populate this volume
/// DownwardAPI represents downward API about
/// the pod that should populate this volume
/// EmptyDir represents a temporary directory
/// that shares a pod's lifetime. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#emptydir
/// FC represents a Fibre Channel resource that is
/// attached to a kubelet's host machine and then exposed to the
/// pod.
/// FlexVolume represents a generic volume
/// resource that is provisioned/attached using an exec based
/// plugin.
/// Flocker represents a Flocker volume attached
/// to a kubelet's host machine. This depends on the Flocker control
/// service being running
/// GCEPersistentDisk represents a GCE
/// Disk resource that is attached to a kubelet's host machine and then
/// exposed to the pod. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
/// GitRepo represents a git repository at a
/// particular revision. DEPRECATED: GitRepo is deprecated. To
/// provision a container with a git repo, mount an EmptyDir into an
/// InitContainer that clones the repo using git, then mount the
/// EmptyDir into the Pod's container.
/// Glusterfs represents a Glusterfs mount on
/// the host that shares a pod's lifetime. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
/// HostPath represents a pre-existing file or
/// directory on the host machine that is directly exposed to the
/// container. This is generally used for system agents or other
/// privileged things that are allowed to see the host machine. Most
/// containers will NOT need this. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#hostpath
/// ISCSI represents an ISCSI Disk resource that is
/// attached to a kubelet's host machine and then exposed to the pod.
/// More info:
/// https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
/// NFS represents an NFS mount on the host that
/// shares a pod's lifetime More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#nfs
/// PersistentVolumeClaimVolumeSource
/// represents a reference to a PersistentVolumeClaim in the same
/// namespace. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
/// PhotonPersistentDisk represents
/// a PhotonController persistent disk attached and mounted on kubelets
/// host machine
/// PortworxVolume represents a portworx
/// volume attached and mounted on kubelets host machine
/// Items for all in one resources secrets,
/// configmaps, and downward API
/// Quobyte represents a Quobyte mount on the
/// host that shares a pod's lifetime
/// RBD represents a Rados Block Device mount on the
/// host that shares a pod's lifetime. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
/// ScaleIO represents a ScaleIO persistent
/// volume attached and mounted on Kubernetes nodes.
/// Secret represents a secret that should
/// populate this volume. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#secret
/// StorageOS represents a StorageOS volume
/// attached and mounted on Kubernetes nodes.
/// VsphereVolume represents a vSphere
/// volume attached and mounted on kubelets host machine
public V1Volume(string name, V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(V1AWSElasticBlockStoreVolumeSource), V1AzureDiskVolumeSource azureDisk = default(V1AzureDiskVolumeSource), V1AzureFileVolumeSource azureFile = default(V1AzureFileVolumeSource), V1CephFSVolumeSource cephfs = default(V1CephFSVolumeSource), V1CinderVolumeSource cinder = default(V1CinderVolumeSource), V1ConfigMapVolumeSource configMap = default(V1ConfigMapVolumeSource), V1DownwardAPIVolumeSource downwardAPI = default(V1DownwardAPIVolumeSource), V1EmptyDirVolumeSource emptyDir = default(V1EmptyDirVolumeSource), V1FCVolumeSource fc = default(V1FCVolumeSource), V1FlexVolumeSource flexVolume = default(V1FlexVolumeSource), V1FlockerVolumeSource flocker = default(V1FlockerVolumeSource), V1GCEPersistentDiskVolumeSource gcePersistentDisk = default(V1GCEPersistentDiskVolumeSource), V1GitRepoVolumeSource gitRepo = default(V1GitRepoVolumeSource), V1GlusterfsVolumeSource glusterfs = default(V1GlusterfsVolumeSource), V1HostPathVolumeSource hostPath = default(V1HostPathVolumeSource), V1ISCSIVolumeSource iscsi = default(V1ISCSIVolumeSource), V1NFSVolumeSource nfs = default(V1NFSVolumeSource), V1PersistentVolumeClaimVolumeSource persistentVolumeClaim = default(V1PersistentVolumeClaimVolumeSource), V1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(V1PhotonPersistentDiskVolumeSource), V1PortworxVolumeSource portworxVolume = default(V1PortworxVolumeSource), V1ProjectedVolumeSource projected = default(V1ProjectedVolumeSource), V1QuobyteVolumeSource quobyte = default(V1QuobyteVolumeSource), V1RBDVolumeSource rbd = default(V1RBDVolumeSource), V1ScaleIOVolumeSource scaleIO = default(V1ScaleIOVolumeSource), V1SecretVolumeSource secret = default(V1SecretVolumeSource), V1StorageOSVolumeSource storageos = default(V1StorageOSVolumeSource), V1VsphereVirtualDiskVolumeSource vsphereVolume = default(V1VsphereVirtualDiskVolumeSource))
{
AwsElasticBlockStore = awsElasticBlockStore;
AzureDisk = azureDisk;
AzureFile = azureFile;
Cephfs = cephfs;
Cinder = cinder;
ConfigMap = configMap;
DownwardAPI = downwardAPI;
EmptyDir = emptyDir;
Fc = fc;
FlexVolume = flexVolume;
Flocker = flocker;
GcePersistentDisk = gcePersistentDisk;
GitRepo = gitRepo;
Glusterfs = glusterfs;
HostPath = hostPath;
Iscsi = iscsi;
Name = name;
Nfs = nfs;
PersistentVolumeClaim = persistentVolumeClaim;
PhotonPersistentDisk = photonPersistentDisk;
PortworxVolume = portworxVolume;
Projected = projected;
Quobyte = quobyte;
Rbd = rbd;
ScaleIO = scaleIO;
Secret = secret;
Storageos = storageos;
VsphereVolume = vsphereVolume;
CustomInit();
}
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
///
/// Gets or sets aWSElasticBlockStore represents an AWS Disk resource
/// that is attached to a kubelet's host machine and then exposed to
/// the pod. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
///
[JsonProperty(PropertyName = "awsElasticBlockStore")]
public V1AWSElasticBlockStoreVolumeSource AwsElasticBlockStore { get; set; }
///
/// Gets or sets azureDisk represents an Azure Data Disk mount on the
/// host and bind mount to the pod.
///
[JsonProperty(PropertyName = "azureDisk")]
public V1AzureDiskVolumeSource AzureDisk { get; set; }
///
/// Gets or sets azureFile represents an Azure File Service mount on
/// the host and bind mount to the pod.
///
[JsonProperty(PropertyName = "azureFile")]
public V1AzureFileVolumeSource AzureFile { get; set; }
///
/// Gets or sets cephFS represents a Ceph FS mount on the host that
/// shares a pod's lifetime
///
[JsonProperty(PropertyName = "cephfs")]
public V1CephFSVolumeSource Cephfs { get; set; }
///
/// Gets or sets cinder represents a cinder volume attached and mounted
/// on kubelets host machine More info:
/// https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
///
[JsonProperty(PropertyName = "cinder")]
public V1CinderVolumeSource Cinder { get; set; }
///
/// Gets or sets configMap represents a configMap that should populate
/// this volume
///
[JsonProperty(PropertyName = "configMap")]
public V1ConfigMapVolumeSource ConfigMap { get; set; }
///
/// Gets or sets downwardAPI represents downward API about the pod that
/// should populate this volume
///
[JsonProperty(PropertyName = "downwardAPI")]
public V1DownwardAPIVolumeSource DownwardAPI { get; set; }
///
/// Gets or sets emptyDir represents a temporary directory that shares
/// a pod's lifetime. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#emptydir
///
[JsonProperty(PropertyName = "emptyDir")]
public V1EmptyDirVolumeSource EmptyDir { get; set; }
///
/// Gets or sets FC represents a Fibre Channel resource that is
/// attached to a kubelet's host machine and then exposed to the pod.
///
[JsonProperty(PropertyName = "fc")]
public V1FCVolumeSource Fc { get; set; }
///
/// Gets or sets flexVolume represents a generic volume resource that
/// is provisioned/attached using an exec based plugin.
///
[JsonProperty(PropertyName = "flexVolume")]
public V1FlexVolumeSource FlexVolume { get; set; }
///
/// Gets or sets flocker represents a Flocker volume attached to a
/// kubelet's host machine. This depends on the Flocker control service
/// being running
///
[JsonProperty(PropertyName = "flocker")]
public V1FlockerVolumeSource Flocker { get; set; }
///
/// Gets or sets gCEPersistentDisk represents a GCE Disk resource that
/// is attached to a kubelet's host machine and then exposed to the
/// pod. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
///
[JsonProperty(PropertyName = "gcePersistentDisk")]
public V1GCEPersistentDiskVolumeSource GcePersistentDisk { get; set; }
///
/// Gets or sets gitRepo represents a git repository at a particular
/// revision. DEPRECATED: GitRepo is deprecated. To provision a
/// container with a git repo, mount an EmptyDir into an InitContainer
/// that clones the repo using git, then mount the EmptyDir into the
/// Pod's container.
///
[JsonProperty(PropertyName = "gitRepo")]
public V1GitRepoVolumeSource GitRepo { get; set; }
///
/// Gets or sets glusterfs represents a Glusterfs mount on the host
/// that shares a pod's lifetime. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
///
[JsonProperty(PropertyName = "glusterfs")]
public V1GlusterfsVolumeSource Glusterfs { get; set; }
///
/// Gets or sets hostPath represents a pre-existing file or directory
/// on the host machine that is directly exposed to the container. This
/// is generally used for system agents or other privileged things that
/// are allowed to see the host machine. Most containers will NOT need
/// this. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#hostpath
///
[JsonProperty(PropertyName = "hostPath")]
public V1HostPathVolumeSource HostPath { get; set; }
///
/// Gets or sets ISCSI represents an ISCSI Disk resource that is
/// attached to a kubelet's host machine and then exposed to the pod.
/// More info:
/// https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
///
[JsonProperty(PropertyName = "iscsi")]
public V1ISCSIVolumeSource Iscsi { get; set; }
///
/// Gets or sets volume's name. Must be a DNS_LABEL and unique within
/// the pod. More info:
/// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
///
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
///
/// Gets or sets NFS represents an NFS mount on the host that shares a
/// pod's lifetime More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#nfs
///
[JsonProperty(PropertyName = "nfs")]
public V1NFSVolumeSource Nfs { get; set; }
///
/// Gets or sets persistentVolumeClaimVolumeSource represents a
/// reference to a PersistentVolumeClaim in the same namespace. More
/// info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
///
[JsonProperty(PropertyName = "persistentVolumeClaim")]
public V1PersistentVolumeClaimVolumeSource PersistentVolumeClaim { get; set; }
///
/// Gets or sets photonPersistentDisk represents a PhotonController
/// persistent disk attached and mounted on kubelets host machine
///
[JsonProperty(PropertyName = "photonPersistentDisk")]
public V1PhotonPersistentDiskVolumeSource PhotonPersistentDisk { get; set; }
///
/// Gets or sets portworxVolume represents a portworx volume attached
/// and mounted on kubelets host machine
///
[JsonProperty(PropertyName = "portworxVolume")]
public V1PortworxVolumeSource PortworxVolume { get; set; }
///
/// Gets or sets items for all in one resources secrets, configmaps,
/// and downward API
///
[JsonProperty(PropertyName = "projected")]
public V1ProjectedVolumeSource Projected { get; set; }
///
/// Gets or sets quobyte represents a Quobyte mount on the host that
/// shares a pod's lifetime
///
[JsonProperty(PropertyName = "quobyte")]
public V1QuobyteVolumeSource Quobyte { get; set; }
///
/// Gets or sets RBD represents a Rados Block Device mount on the host
/// that shares a pod's lifetime. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
///
[JsonProperty(PropertyName = "rbd")]
public V1RBDVolumeSource Rbd { get; set; }
///
/// Gets or sets scaleIO represents a ScaleIO persistent volume
/// attached and mounted on Kubernetes nodes.
///
[JsonProperty(PropertyName = "scaleIO")]
public V1ScaleIOVolumeSource ScaleIO { get; set; }
///
/// Gets or sets secret represents a secret that should populate this
/// volume. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#secret
///
[JsonProperty(PropertyName = "secret")]
public V1SecretVolumeSource Secret { get; set; }
///
/// Gets or sets storageOS represents a StorageOS volume attached and
/// mounted on Kubernetes nodes.
///
[JsonProperty(PropertyName = "storageos")]
public V1StorageOSVolumeSource Storageos { get; set; }
///
/// Gets or sets vsphereVolume represents a vSphere volume attached and
/// mounted on kubelets host machine
///
[JsonProperty(PropertyName = "vsphereVolume")]
public V1VsphereVirtualDiskVolumeSource VsphereVolume { get; set; }
///
/// Validate the object.
///
///
/// Thrown if validation fails
///
public virtual void Validate()
{
if (Name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
if (AwsElasticBlockStore != null)
{
AwsElasticBlockStore.Validate();
}
if (AzureDisk != null)
{
AzureDisk.Validate();
}
if (AzureFile != null)
{
AzureFile.Validate();
}
if (Cephfs != null)
{
Cephfs.Validate();
}
if (Cinder != null)
{
Cinder.Validate();
}
if (FlexVolume != null)
{
FlexVolume.Validate();
}
if (GcePersistentDisk != null)
{
GcePersistentDisk.Validate();
}
if (GitRepo != null)
{
GitRepo.Validate();
}
if (Glusterfs != null)
{
Glusterfs.Validate();
}
if (HostPath != null)
{
HostPath.Validate();
}
if (Iscsi != null)
{
Iscsi.Validate();
}
if (Nfs != null)
{
Nfs.Validate();
}
if (PersistentVolumeClaim != null)
{
PersistentVolumeClaim.Validate();
}
if (PhotonPersistentDisk != null)
{
PhotonPersistentDisk.Validate();
}
if (PortworxVolume != null)
{
PortworxVolume.Validate();
}
if (Projected != null)
{
Projected.Validate();
}
if (Quobyte != null)
{
Quobyte.Validate();
}
if (Rbd != null)
{
Rbd.Validate();
}
if (ScaleIO != null)
{
ScaleIO.Validate();
}
if (VsphereVolume != null)
{
VsphereVolume.Validate();
}
}
}
}