// // 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 Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Linq; /// /// PersistentVolumeSpec is the specification of a persistent volume. /// public partial class V1PersistentVolumeSpec { /// /// Initializes a new instance of the V1PersistentVolumeSpec class. /// public V1PersistentVolumeSpec() { CustomInit(); } /// /// Initializes a new instance of the V1PersistentVolumeSpec class. /// /// AccessModes contains all ways the volume /// can be mounted. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes /// 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. /// A description of the persistent volume's /// resources and capacity. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity /// 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 /// ClaimRef is part of a bi-directional binding /// between PersistentVolume and PersistentVolumeClaim. Expected to be /// non-nil when bound. claim.VolumeName is the authoritative bind /// between PV and PVC. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding /// CSI represents storage that handled by an /// external CSI driver (Beta feature). /// 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 and exposed to the pod for its usage. /// 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. Provisioned by an admin. More info: /// https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk /// Glusterfs represents a Glusterfs volume /// that is attached to a host and exposed to the pod. Provisioned by /// an admin. More info: /// https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md /// HostPath represents a directory on the host. /// Provisioned by a developer or tester. This is useful for /// single-node development and testing only! On-host storage is not /// supported in any way and WILL NOT WORK in a multi-node cluster. /// 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. /// Provisioned by an admin. /// Local represents directly-attached storage with /// node affinity /// A list of mount options, e.g. ["ro", /// "soft"]. Not validated - mount will simply fail if one is invalid. /// More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options /// NFS represents an NFS mount on the host. /// Provisioned by an admin. More info: /// https://kubernetes.io/docs/concepts/storage/volumes#nfs /// NodeAffinity defines constraints that /// limit what nodes this volume can be accessed from. This field /// influences the scheduling of pods that use this volume. /// What happens to a /// persistent volume when released from its claim. Valid options are /// Retain (default for manually created PersistentVolumes), Delete /// (default for dynamically provisioned PersistentVolumes), and /// Recycle (deprecated). Recycle must be supported by the volume /// plugin underlying this PersistentVolume. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming /// 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 /// 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. /// Name of StorageClass to which this /// persistent volume belongs. Empty value means that this volume does /// not belong to any StorageClass. /// StorageOS represents a StorageOS volume /// that is attached to the kubelet's host machine and mounted into the /// pod More info: /// https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md /// volumeMode defines if a volume is intended /// to be used with a formatted filesystem or to remain in raw block /// state. Value of Filesystem is implied when not included in spec. /// This is an alpha feature and may change in the future. /// VsphereVolume represents a vSphere /// volume attached and mounted on kubelets host machine public V1PersistentVolumeSpec(IList accessModes = default(IList), V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(V1AWSElasticBlockStoreVolumeSource), V1AzureDiskVolumeSource azureDisk = default(V1AzureDiskVolumeSource), V1AzureFilePersistentVolumeSource azureFile = default(V1AzureFilePersistentVolumeSource), IDictionary capacity = default(IDictionary), V1CephFSPersistentVolumeSource cephfs = default(V1CephFSPersistentVolumeSource), V1CinderVolumeSource cinder = default(V1CinderVolumeSource), V1ObjectReference claimRef = default(V1ObjectReference), V1CSIPersistentVolumeSource csi = default(V1CSIPersistentVolumeSource), V1FCVolumeSource fc = default(V1FCVolumeSource), V1FlexPersistentVolumeSource flexVolume = default(V1FlexPersistentVolumeSource), V1FlockerVolumeSource flocker = default(V1FlockerVolumeSource), V1GCEPersistentDiskVolumeSource gcePersistentDisk = default(V1GCEPersistentDiskVolumeSource), V1GlusterfsVolumeSource glusterfs = default(V1GlusterfsVolumeSource), V1HostPathVolumeSource hostPath = default(V1HostPathVolumeSource), V1ISCSIPersistentVolumeSource iscsi = default(V1ISCSIPersistentVolumeSource), V1LocalVolumeSource local = default(V1LocalVolumeSource), IList mountOptions = default(IList), V1NFSVolumeSource nfs = default(V1NFSVolumeSource), V1VolumeNodeAffinity nodeAffinity = default(V1VolumeNodeAffinity), string persistentVolumeReclaimPolicy = default(string), V1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(V1PhotonPersistentDiskVolumeSource), V1PortworxVolumeSource portworxVolume = default(V1PortworxVolumeSource), V1QuobyteVolumeSource quobyte = default(V1QuobyteVolumeSource), V1RBDPersistentVolumeSource rbd = default(V1RBDPersistentVolumeSource), V1ScaleIOPersistentVolumeSource scaleIO = default(V1ScaleIOPersistentVolumeSource), string storageClassName = default(string), V1StorageOSPersistentVolumeSource storageos = default(V1StorageOSPersistentVolumeSource), string volumeMode = default(string), V1VsphereVirtualDiskVolumeSource vsphereVolume = default(V1VsphereVirtualDiskVolumeSource)) { AccessModes = accessModes; AwsElasticBlockStore = awsElasticBlockStore; AzureDisk = azureDisk; AzureFile = azureFile; Capacity = capacity; Cephfs = cephfs; Cinder = cinder; ClaimRef = claimRef; Csi = csi; Fc = fc; FlexVolume = flexVolume; Flocker = flocker; GcePersistentDisk = gcePersistentDisk; Glusterfs = glusterfs; HostPath = hostPath; Iscsi = iscsi; Local = local; MountOptions = mountOptions; Nfs = nfs; NodeAffinity = nodeAffinity; PersistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy; PhotonPersistentDisk = photonPersistentDisk; PortworxVolume = portworxVolume; Quobyte = quobyte; Rbd = rbd; ScaleIO = scaleIO; StorageClassName = storageClassName; Storageos = storageos; VolumeMode = volumeMode; VsphereVolume = vsphereVolume; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets accessModes contains all ways the volume can be /// mounted. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes /// [JsonProperty(PropertyName = "accessModes")] public IList AccessModes { get; set; } /// /// 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 V1AzureFilePersistentVolumeSource AzureFile { get; set; } /// /// Gets or sets a description of the persistent volume's resources and /// capacity. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity /// [JsonProperty(PropertyName = "capacity")] public IDictionary Capacity { get; set; } /// /// Gets or sets cephFS represents a Ceph FS mount on the host that /// shares a pod's lifetime /// [JsonProperty(PropertyName = "cephfs")] public V1CephFSPersistentVolumeSource 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 claimRef is part of a bi-directional binding between /// PersistentVolume and PersistentVolumeClaim. Expected to be non-nil /// when bound. claim.VolumeName is the authoritative bind between PV /// and PVC. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding /// [JsonProperty(PropertyName = "claimRef")] public V1ObjectReference ClaimRef { get; set; } /// /// Gets or sets CSI represents storage that handled by an external CSI /// driver (Beta feature). /// [JsonProperty(PropertyName = "csi")] public V1CSIPersistentVolumeSource Csi { 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 V1FlexPersistentVolumeSource FlexVolume { get; set; } /// /// Gets or sets flocker represents a Flocker volume attached to a /// kubelet's host machine and exposed to the pod for its usage. 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. Provisioned by an admin. More info: /// https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk /// [JsonProperty(PropertyName = "gcePersistentDisk")] public V1GCEPersistentDiskVolumeSource GcePersistentDisk { get; set; } /// /// Gets or sets glusterfs represents a Glusterfs volume that is /// attached to a host and exposed to the pod. Provisioned by an admin. /// 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 directory on the host. /// Provisioned by a developer or tester. This is useful for /// single-node development and testing only! On-host storage is not /// supported in any way and WILL NOT WORK in a multi-node cluster. /// 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. /// Provisioned by an admin. /// [JsonProperty(PropertyName = "iscsi")] public V1ISCSIPersistentVolumeSource Iscsi { get; set; } /// /// Gets or sets local represents directly-attached storage with node /// affinity /// [JsonProperty(PropertyName = "local")] public V1LocalVolumeSource Local { get; set; } /// /// Gets or sets a list of mount options, e.g. ["ro", "soft"]. Not /// validated - mount will simply fail if one is invalid. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options /// [JsonProperty(PropertyName = "mountOptions")] public IList MountOptions { get; set; } /// /// Gets or sets NFS represents an NFS mount on the host. Provisioned /// by an admin. More info: /// https://kubernetes.io/docs/concepts/storage/volumes#nfs /// [JsonProperty(PropertyName = "nfs")] public V1NFSVolumeSource Nfs { get; set; } /// /// Gets or sets nodeAffinity defines constraints that limit what nodes /// this volume can be accessed from. This field influences the /// scheduling of pods that use this volume. /// [JsonProperty(PropertyName = "nodeAffinity")] public V1VolumeNodeAffinity NodeAffinity { get; set; } /// /// Gets or sets what happens to a persistent volume when released from /// its claim. Valid options are Retain (default for manually created /// PersistentVolumes), Delete (default for dynamically provisioned /// PersistentVolumes), and Recycle (deprecated). Recycle must be /// supported by the volume plugin underlying this PersistentVolume. /// More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming /// [JsonProperty(PropertyName = "persistentVolumeReclaimPolicy")] public string PersistentVolumeReclaimPolicy { 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 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 V1RBDPersistentVolumeSource Rbd { get; set; } /// /// Gets or sets scaleIO represents a ScaleIO persistent volume /// attached and mounted on Kubernetes nodes. /// [JsonProperty(PropertyName = "scaleIO")] public V1ScaleIOPersistentVolumeSource ScaleIO { get; set; } /// /// Gets or sets name of StorageClass to which this persistent volume /// belongs. Empty value means that this volume does not belong to any /// StorageClass. /// [JsonProperty(PropertyName = "storageClassName")] public string StorageClassName { get; set; } /// /// Gets or sets storageOS represents a StorageOS volume that is /// attached to the kubelet's host machine and mounted into the pod /// More info: /// https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md /// [JsonProperty(PropertyName = "storageos")] public V1StorageOSPersistentVolumeSource Storageos { get; set; } /// /// Gets or sets volumeMode defines if a volume is intended to be used /// with a formatted filesystem or to remain in raw block state. Value /// of Filesystem is implied when not included in spec. This is an /// alpha feature and may change in the future. /// [JsonProperty(PropertyName = "volumeMode")] public string VolumeMode { 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 (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 (Csi != null) { Csi.Validate(); } if (FlexVolume != null) { FlexVolume.Validate(); } if (GcePersistentDisk != null) { GcePersistentDisk.Validate(); } if (Glusterfs != null) { Glusterfs.Validate(); } if (HostPath != null) { HostPath.Validate(); } if (Iscsi != null) { Iscsi.Validate(); } if (Local != null) { Local.Validate(); } if (Nfs != null) { Nfs.Validate(); } if (NodeAffinity != null) { NodeAffinity.Validate(); } if (PhotonPersistentDisk != null) { PhotonPersistentDisk.Validate(); } if (PortworxVolume != null) { PortworxVolume.Validate(); } if (Quobyte != null) { Quobyte.Validate(); } if (Rbd != null) { Rbd.Validate(); } if (ScaleIO != null) { ScaleIO.Validate(); } if (VsphereVolume != null) { VsphereVolume.Validate(); } } } }