Files
csharp/src/KubernetesClient/generated/Models/Policyv1beta1RunAsGroupStrategyOptions.cs
Boshi Lian 1600e44b00 generate for 1.13 (#223)
* generate for 1.13 and bump ver to 1.4

* fix examples for 1.13

* update outdated cert
2018-12-11 21:10:39 -08:00

92 lines
3.1 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.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// RunAsGroupStrategyOptions defines the strategy type and any options
/// used to create the strategy.
/// </summary>
public partial class Policyv1beta1RunAsGroupStrategyOptions
{
/// <summary>
/// Initializes a new instance of the
/// Policyv1beta1RunAsGroupStrategyOptions class.
/// </summary>
public Policyv1beta1RunAsGroupStrategyOptions()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// Policyv1beta1RunAsGroupStrategyOptions class.
/// </summary>
/// <param name="rule">rule is the strategy that will dictate the
/// allowable RunAsGroup values that may be set.</param>
/// <param name="ranges">ranges are the allowed ranges of gids that may
/// be used. If you would like to force a single gid then supply a
/// single range with the same start and end. Required for
/// MustRunAs.</param>
public Policyv1beta1RunAsGroupStrategyOptions(string rule, IList<Policyv1beta1IDRange> ranges = default(IList<Policyv1beta1IDRange>))
{
Ranges = ranges;
Rule = rule;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets ranges are the allowed ranges of gids that may be
/// used. If you would like to force a single gid then supply a single
/// range with the same start and end. Required for MustRunAs.
/// </summary>
[JsonProperty(PropertyName = "ranges")]
public IList<Policyv1beta1IDRange> Ranges { get; set; }
/// <summary>
/// Gets or sets rule is the strategy that will dictate the allowable
/// RunAsGroup values that may be set.
/// </summary>
[JsonProperty(PropertyName = "rule")]
public string Rule { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Rule == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Rule");
}
if (Ranges != null)
{
foreach (var element in Ranges)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}