Files
csharp/src/generated/Models/Corev1Volume.cs

460 lines
22 KiB
C#
Raw Normal View History

2017-10-19 19:53:02 +00:00
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
2017-10-19 19:53:02 +00:00
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Volume represents a named volume in a pod that may be accessed by any
/// container in the pod.
/// </summary>
2017-10-19 19:53:02 +00:00
public partial class Corev1Volume
{
/// <summary>
2017-10-19 19:53:02 +00:00
/// Initializes a new instance of the Corev1Volume class.
/// </summary>
2017-10-19 19:53:02 +00:00
public Corev1Volume()
{
2017-10-19 19:53:02 +00:00
CustomInit();
}
/// <summary>
2017-10-19 19:53:02 +00:00
/// Initializes a new instance of the Corev1Volume class.
/// </summary>
/// <param name="name">Volume's name. Must be a DNS_LABEL and unique
/// within the pod. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names</param>
/// <param name="awsElasticBlockStore">AWSElasticBlockStore represents
/// an AWS Disk resource that is attached to a kubelet's host machine
/// and then exposed to the pod. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore</param>
/// <param name="azureDisk">AzureDisk represents an Azure Data Disk
/// mount on the host and bind mount to the pod.</param>
/// <param name="azureFile">AzureFile represents an Azure File Service
/// mount on the host and bind mount to the pod.</param>
/// <param name="cephfs">CephFS represents a Ceph FS mount on the host
/// that shares a pod's lifetime</param>
/// <param name="cinder">Cinder represents a cinder volume attached and
/// mounted on kubelets host machine More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md</param>
/// <param name="configMap">ConfigMap represents a configMap that
/// should populate this volume</param>
/// <param name="downwardAPI">DownwardAPI represents downward API about
/// the pod that should populate this volume</param>
/// <param name="emptyDir">EmptyDir represents a temporary directory
/// that shares a pod's lifetime. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#emptydir</param>
/// <param name="fc">FC represents a Fibre Channel resource that is
/// attached to a kubelet's host machine and then exposed to the
/// pod.</param>
/// <param name="flexVolume">FlexVolume represents a generic volume
/// resource that is provisioned/attached using an exec based plugin.
/// This is an alpha feature and may change in future.</param>
/// <param name="flocker">Flocker represents a Flocker volume attached
/// to a kubelet's host machine. This depends on the Flocker control
/// service being running</param>
/// <param name="gcePersistentDisk">GCEPersistentDisk represents a GCE
/// Disk resource that is attached to a kubelet's host machine and then
/// exposed to the pod. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk</param>
/// <param name="gitRepo">GitRepo represents a git repository at a
/// particular revision.</param>
/// <param name="glusterfs">Glusterfs represents a Glusterfs mount on
/// the host that shares a pod's lifetime. More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md</param>
/// <param name="hostPath">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:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#hostpath</param>
/// <param name="iscsi">ISCSI represents an ISCSI Disk resource that is
/// attached to a kubelet's host machine and then exposed to the pod.
/// More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md</param>
/// <param name="nfs">NFS represents an NFS mount on the host that
/// shares a pod's lifetime More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#nfs</param>
/// <param
/// name="persistentVolumeClaim">PersistentVolumeClaimVolumeSource
/// represents a reference to a PersistentVolumeClaim in the same
/// namespace. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims</param>
/// <param name="photonPersistentDisk">PhotonPersistentDisk represents
/// a PhotonController persistent disk attached and mounted on kubelets
/// host machine</param>
/// <param name="portworxVolume">PortworxVolume represents a portworx
/// volume attached and mounted on kubelets host machine</param>
/// <param name="projected">Items for all in one resources secrets,
/// configmaps, and downward API</param>
/// <param name="quobyte">Quobyte represents a Quobyte mount on the
/// host that shares a pod's lifetime</param>
/// <param name="rbd">RBD represents a Rados Block Device mount on the
/// host that shares a pod's lifetime. More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md</param>
/// <param name="scaleIO">ScaleIO represents a ScaleIO persistent
/// volume attached and mounted on Kubernetes nodes.</param>
/// <param name="secret">Secret represents a secret that should
/// populate this volume. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#secret</param>
/// <param name="storageos">StorageOS represents a StorageOS volume
/// attached and mounted on Kubernetes nodes.</param>
/// <param name="vsphereVolume">VsphereVolume represents a vSphere
/// volume attached and mounted on kubelets host machine</param>
2017-10-19 19:53:02 +00:00
public Corev1Volume(string name, Corev1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(Corev1AWSElasticBlockStoreVolumeSource), Corev1AzureDiskVolumeSource azureDisk = default(Corev1AzureDiskVolumeSource), Corev1AzureFileVolumeSource azureFile = default(Corev1AzureFileVolumeSource), Corev1CephFSVolumeSource cephfs = default(Corev1CephFSVolumeSource), Corev1CinderVolumeSource cinder = default(Corev1CinderVolumeSource), Corev1ConfigMapVolumeSource configMap = default(Corev1ConfigMapVolumeSource), Corev1DownwardAPIVolumeSource downwardAPI = default(Corev1DownwardAPIVolumeSource), Corev1EmptyDirVolumeSource emptyDir = default(Corev1EmptyDirVolumeSource), Corev1FCVolumeSource fc = default(Corev1FCVolumeSource), Corev1FlexVolumeSource flexVolume = default(Corev1FlexVolumeSource), Corev1FlockerVolumeSource flocker = default(Corev1FlockerVolumeSource), Corev1GCEPersistentDiskVolumeSource gcePersistentDisk = default(Corev1GCEPersistentDiskVolumeSource), Corev1GitRepoVolumeSource gitRepo = default(Corev1GitRepoVolumeSource), Corev1GlusterfsVolumeSource glusterfs = default(Corev1GlusterfsVolumeSource), Corev1HostPathVolumeSource hostPath = default(Corev1HostPathVolumeSource), Corev1ISCSIVolumeSource iscsi = default(Corev1ISCSIVolumeSource), Corev1NFSVolumeSource nfs = default(Corev1NFSVolumeSource), Corev1PersistentVolumeClaimVolumeSource persistentVolumeClaim = default(Corev1PersistentVolumeClaimVolumeSource), Corev1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(Corev1PhotonPersistentDiskVolumeSource), Corev1PortworxVolumeSource portworxVolume = default(Corev1PortworxVolumeSource), Corev1ProjectedVolumeSource projected = default(Corev1ProjectedVolumeSource), Corev1QuobyteVolumeSource quobyte = default(Corev1QuobyteVolumeSource), Corev1RBDVolumeSource rbd = default(Corev1RBDVolumeSource), Corev1ScaleIOVolumeSource scaleIO = default(Corev1ScaleIOVolumeSource), Corev1SecretVolumeSource secret = default(Corev1SecretVolumeSource), Corev1StorageOSVolumeSource storageos = default(Corev1StorageOSVolumeSource), Corev1VsphereVirtualDiskVolumeSource vsphereVolume = default(Corev1VsphereVirtualDiskVolumeSource))
{
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;
2017-10-19 19:53:02 +00:00
Storageos = storageos;
VsphereVolume = vsphereVolume;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// 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:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
/// </summary>
[JsonProperty(PropertyName = "awsElasticBlockStore")]
2017-10-19 19:53:02 +00:00
public Corev1AWSElasticBlockStoreVolumeSource AwsElasticBlockStore { get; set; }
/// <summary>
/// Gets or sets azureDisk represents an Azure Data Disk mount on the
/// host and bind mount to the pod.
/// </summary>
[JsonProperty(PropertyName = "azureDisk")]
2017-10-19 19:53:02 +00:00
public Corev1AzureDiskVolumeSource AzureDisk { get; set; }
/// <summary>
/// Gets or sets azureFile represents an Azure File Service mount on
/// the host and bind mount to the pod.
/// </summary>
[JsonProperty(PropertyName = "azureFile")]
2017-10-19 19:53:02 +00:00
public Corev1AzureFileVolumeSource AzureFile { get; set; }
/// <summary>
/// Gets or sets cephFS represents a Ceph FS mount on the host that
/// shares a pod's lifetime
/// </summary>
[JsonProperty(PropertyName = "cephfs")]
2017-10-19 19:53:02 +00:00
public Corev1CephFSVolumeSource Cephfs { get; set; }
/// <summary>
/// Gets or sets cinder represents a cinder volume attached and mounted
/// on kubelets host machine More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
/// </summary>
[JsonProperty(PropertyName = "cinder")]
2017-10-19 19:53:02 +00:00
public Corev1CinderVolumeSource Cinder { get; set; }
/// <summary>
/// Gets or sets configMap represents a configMap that should populate
/// this volume
/// </summary>
[JsonProperty(PropertyName = "configMap")]
2017-10-19 19:53:02 +00:00
public Corev1ConfigMapVolumeSource ConfigMap { get; set; }
/// <summary>
/// Gets or sets downwardAPI represents downward API about the pod that
/// should populate this volume
/// </summary>
[JsonProperty(PropertyName = "downwardAPI")]
2017-10-19 19:53:02 +00:00
public Corev1DownwardAPIVolumeSource DownwardAPI { get; set; }
/// <summary>
/// Gets or sets emptyDir represents a temporary directory that shares
/// a pod's lifetime. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#emptydir
/// </summary>
[JsonProperty(PropertyName = "emptyDir")]
2017-10-19 19:53:02 +00:00
public Corev1EmptyDirVolumeSource EmptyDir { get; set; }
/// <summary>
/// Gets or sets FC represents a Fibre Channel resource that is
/// attached to a kubelet's host machine and then exposed to the pod.
/// </summary>
[JsonProperty(PropertyName = "fc")]
2017-10-19 19:53:02 +00:00
public Corev1FCVolumeSource Fc { get; set; }
/// <summary>
/// Gets or sets flexVolume represents a generic volume resource that
/// is provisioned/attached using an exec based plugin. This is an
/// alpha feature and may change in future.
/// </summary>
[JsonProperty(PropertyName = "flexVolume")]
2017-10-19 19:53:02 +00:00
public Corev1FlexVolumeSource FlexVolume { get; set; }
/// <summary>
/// Gets or sets flocker represents a Flocker volume attached to a
/// kubelet's host machine. This depends on the Flocker control service
/// being running
/// </summary>
[JsonProperty(PropertyName = "flocker")]
2017-10-19 19:53:02 +00:00
public Corev1FlockerVolumeSource Flocker { get; set; }
/// <summary>
/// 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:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
/// </summary>
[JsonProperty(PropertyName = "gcePersistentDisk")]
2017-10-19 19:53:02 +00:00
public Corev1GCEPersistentDiskVolumeSource GcePersistentDisk { get; set; }
/// <summary>
/// Gets or sets gitRepo represents a git repository at a particular
/// revision.
/// </summary>
[JsonProperty(PropertyName = "gitRepo")]
2017-10-19 19:53:02 +00:00
public Corev1GitRepoVolumeSource GitRepo { get; set; }
/// <summary>
/// Gets or sets glusterfs represents a Glusterfs mount on the host
/// that shares a pod's lifetime. More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
/// </summary>
[JsonProperty(PropertyName = "glusterfs")]
2017-10-19 19:53:02 +00:00
public Corev1GlusterfsVolumeSource Glusterfs { get; set; }
/// <summary>
/// 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:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#hostpath
/// </summary>
[JsonProperty(PropertyName = "hostPath")]
2017-10-19 19:53:02 +00:00
public Corev1HostPathVolumeSource HostPath { get; set; }
/// <summary>
/// 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:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
/// </summary>
[JsonProperty(PropertyName = "iscsi")]
2017-10-19 19:53:02 +00:00
public Corev1ISCSIVolumeSource Iscsi { get; set; }
/// <summary>
/// Gets or sets volume's name. Must be a DNS_LABEL and unique within
/// the pod. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets NFS represents an NFS mount on the host that shares a
/// pod's lifetime More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#nfs
/// </summary>
[JsonProperty(PropertyName = "nfs")]
2017-10-19 19:53:02 +00:00
public Corev1NFSVolumeSource Nfs { get; set; }
/// <summary>
/// Gets or sets persistentVolumeClaimVolumeSource represents a
/// reference to a PersistentVolumeClaim in the same namespace. More
/// info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
/// </summary>
[JsonProperty(PropertyName = "persistentVolumeClaim")]
2017-10-19 19:53:02 +00:00
public Corev1PersistentVolumeClaimVolumeSource PersistentVolumeClaim { get; set; }
/// <summary>
/// Gets or sets photonPersistentDisk represents a PhotonController
/// persistent disk attached and mounted on kubelets host machine
/// </summary>
[JsonProperty(PropertyName = "photonPersistentDisk")]
2017-10-19 19:53:02 +00:00
public Corev1PhotonPersistentDiskVolumeSource PhotonPersistentDisk { get; set; }
/// <summary>
/// Gets or sets portworxVolume represents a portworx volume attached
/// and mounted on kubelets host machine
/// </summary>
[JsonProperty(PropertyName = "portworxVolume")]
2017-10-19 19:53:02 +00:00
public Corev1PortworxVolumeSource PortworxVolume { get; set; }
/// <summary>
/// Gets or sets items for all in one resources secrets, configmaps,
/// and downward API
/// </summary>
[JsonProperty(PropertyName = "projected")]
2017-10-19 19:53:02 +00:00
public Corev1ProjectedVolumeSource Projected { get; set; }
/// <summary>
/// Gets or sets quobyte represents a Quobyte mount on the host that
/// shares a pod's lifetime
/// </summary>
[JsonProperty(PropertyName = "quobyte")]
2017-10-19 19:53:02 +00:00
public Corev1QuobyteVolumeSource Quobyte { get; set; }
/// <summary>
/// Gets or sets RBD represents a Rados Block Device mount on the host
/// that shares a pod's lifetime. More info:
2017-10-19 19:53:02 +00:00
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
/// </summary>
[JsonProperty(PropertyName = "rbd")]
2017-10-19 19:53:02 +00:00
public Corev1RBDVolumeSource Rbd { get; set; }
/// <summary>
/// Gets or sets scaleIO represents a ScaleIO persistent volume
/// attached and mounted on Kubernetes nodes.
/// </summary>
[JsonProperty(PropertyName = "scaleIO")]
2017-10-19 19:53:02 +00:00
public Corev1ScaleIOVolumeSource ScaleIO { get; set; }
/// <summary>
/// Gets or sets secret represents a secret that should populate this
/// volume. More info:
2017-10-19 19:53:02 +00:00
/// https://kubernetes.io/docs/concepts/storage/volumes#secret
/// </summary>
[JsonProperty(PropertyName = "secret")]
2017-10-19 19:53:02 +00:00
public Corev1SecretVolumeSource Secret { get; set; }
/// <summary>
/// Gets or sets storageOS represents a StorageOS volume attached and
/// mounted on Kubernetes nodes.
/// </summary>
[JsonProperty(PropertyName = "storageos")]
public Corev1StorageOSVolumeSource Storageos { get; set; }
/// <summary>
/// Gets or sets vsphereVolume represents a vSphere volume attached and
/// mounted on kubelets host machine
/// </summary>
[JsonProperty(PropertyName = "vsphereVolume")]
2017-10-19 19:53:02 +00:00
public Corev1VsphereVirtualDiskVolumeSource VsphereVolume { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
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();
}
}
}
}