//
// 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.Collections;
using System.Collections.Generic;
using System.Linq;
///
/// Represents a Rados Block Device mount that lasts the lifetime of a pod.
/// RBD volumes support ownership management and SELinux relabeling.
///
public partial class V1RBDVolumeSource
{
///
/// Initializes a new instance of the V1RBDVolumeSource class.
///
public V1RBDVolumeSource()
{
CustomInit();
}
///
/// Initializes a new instance of the V1RBDVolumeSource class.
///
/// The rados image name. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
/// A collection of Ceph monitors. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
/// Filesystem type of the volume that you want to
/// mount. Tip: Ensure that the filesystem type is supported by the
/// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#rbd
/// Keyring is the path to key ring for RBDUser.
/// Default is /etc/ceph/keyring. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
/// The rados pool name. Default is rbd. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
/// ReadOnly here will force the
/// ReadOnly setting in VolumeMounts. Defaults to false. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
/// SecretRef is name of the authentication
/// secret for RBDUser. If provided overrides keyring. Default is nil.
/// More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
/// The rados user name. Default is admin. More
/// info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
public V1RBDVolumeSource(string image, IList monitors, string fsType = default(string), string keyring = default(string), string pool = default(string), bool? readOnlyProperty = default(bool?), V1LocalObjectReference secretRef = default(V1LocalObjectReference), string user = default(string))
{
FsType = fsType;
Image = image;
Keyring = keyring;
Monitors = monitors;
Pool = pool;
ReadOnlyProperty = readOnlyProperty;
SecretRef = secretRef;
User = user;
CustomInit();
}
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
///
/// Gets or sets filesystem type of the volume that you want to mount.
/// Tip: Ensure that the filesystem type is supported by the host
/// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
/// inferred to be "ext4" if unspecified. More info:
/// https://kubernetes.io/docs/concepts/storage/volumes#rbd
///
[JsonProperty(PropertyName = "fsType")]
public string FsType { get; set; }
///
/// Gets or sets the rados image name. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
///
/// Gets or sets keyring is the path to key ring for RBDUser. Default
/// is /etc/ceph/keyring. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "keyring")]
public string Keyring { get; set; }
///
/// Gets or sets a collection of Ceph monitors. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "monitors")]
public IList Monitors { get; set; }
///
/// Gets or sets the rados pool name. Default is rbd. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "pool")]
public string Pool { get; set; }
///
/// Gets or sets readOnly here will force the ReadOnly setting in
/// VolumeMounts. Defaults to false. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
///
/// Gets or sets secretRef is name of the authentication secret for
/// RBDUser. If provided overrides keyring. Default is nil. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "secretRef")]
public V1LocalObjectReference SecretRef { get; set; }
///
/// Gets or sets the rados user name. Default is admin. More info:
/// https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
///
[JsonProperty(PropertyName = "user")]
public string User { get; set; }
///
/// Validate the object.
///
///
/// Thrown if validation fails
///
public virtual void Validate()
{
if (Image == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Image");
}
if (Monitors == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Monitors");
}
}
}
}