/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Containers == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Containers"); } if (Affinity != null) { Affinity.Validate(); } if (Containers != null) { foreach (var element in Containers) { if (element != null) { element.Validate(); } } } if (InitContainers != null) { foreach (var element1 in InitContainers) { if (element1 != null) { element1.Validate(); } } } if (ReadinessGates != null) { foreach (var element2 in ReadinessGates) { if (element2 != null) { element2.Validate(); } } } if (Volumes != null) { foreach (var element3 in Volumes) { if (element3 != null) { element3.Validate(); } } } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="Microsoft.Rest.ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Affinity != null) { Affinity.Validate(); } if (Rules != null) { foreach (var element in Rules) { if (element != null) { element.Validate(); } } } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Containers == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Containers"); } if (Affinity != null) { Affinity.Validate(); } if (Containers != null) { foreach (var element in Containers) { if (element != null) { element.Validate(); } } } if (EphemeralContainers != null) { foreach (var element1 in EphemeralContainers) { if (element1 != null) { element1.Validate(); } } } if (InitContainers != null) { foreach (var element2 in InitContainers) { if (element2 != null) { element2.Validate(); } } } if (ReadinessGates != null) { foreach (var element3 in ReadinessGates) { if (element3 != null) { element3.Validate(); } } } if (SecurityContext != null) { SecurityContext.Validate(); } if (TopologySpreadConstraints != null) { foreach (var element4 in TopologySpreadConstraints) { if (element4 != null) { element4.Validate(); } } } if (Volumes != null) { foreach (var element5 in Volumes) { if (element5 != null) { element5.Validate(); } } } }