//
// 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;
///
/// PersistentVolumeClaimVolumeSource references the user's PVC in the same
/// namespace. This volume finds the bound PV and mounts that volume for
/// the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper
/// around another type of volume that is owned by someone else (the
/// system).
///
public partial class V1PersistentVolumeClaimVolumeSource
{
///
/// Initializes a new instance of the
/// V1PersistentVolumeClaimVolumeSource class.
///
public V1PersistentVolumeClaimVolumeSource()
{
CustomInit();
}
///
/// Initializes a new instance of the
/// V1PersistentVolumeClaimVolumeSource class.
///
/// ClaimName is the name of a
/// PersistentVolumeClaim in the same namespace as the pod using this
/// volume. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
/// Will force the ReadOnly setting in
/// VolumeMounts. Default false.
public V1PersistentVolumeClaimVolumeSource(string claimName, bool? readOnlyProperty = default(bool?))
{
ClaimName = claimName;
ReadOnlyProperty = readOnlyProperty;
CustomInit();
}
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
///
/// Gets or sets claimName is the name of a PersistentVolumeClaim in
/// the same namespace as the pod using this volume. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
///
[JsonProperty(PropertyName = "claimName")]
public string ClaimName { get; set; }
///
/// Gets or sets will force the ReadOnly setting in VolumeMounts.
/// Default false.
///
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
///
/// Validate the object.
///
///
/// Thrown if validation fails
///
public virtual void Validate()
{
if (ClaimName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ClaimName");
}
}
}
}