Files
csharp/src/KubernetesClient/generated/Models/V1PersistentVolumeClaimVolumeSource.cs

83 lines
3.0 KiB
C#

// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace k8s.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// 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).
/// </summary>
public partial class V1PersistentVolumeClaimVolumeSource
{
/// <summary>
/// Initializes a new instance of the
/// V1PersistentVolumeClaimVolumeSource class.
/// </summary>
public V1PersistentVolumeClaimVolumeSource()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// V1PersistentVolumeClaimVolumeSource class.
/// </summary>
/// <param name="claimName">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</param>
/// <param name="readOnlyProperty">Will force the ReadOnly setting in
/// VolumeMounts. Default false.</param>
public V1PersistentVolumeClaimVolumeSource(string claimName, bool? readOnlyProperty = default(bool?))
{
ClaimName = claimName;
ReadOnlyProperty = readOnlyProperty;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// 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
/// </summary>
[JsonProperty(PropertyName = "claimName")]
public string ClaimName { get; set; }
/// <summary>
/// Gets or sets will force the ReadOnly setting in VolumeMounts.
/// Default false.
/// </summary>
[JsonProperty(PropertyName = "readOnly")]
public bool? ReadOnlyProperty { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (ClaimName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "ClaimName");
}
}
}
}