/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Name == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } if (Env != null) { foreach (var element in Env) { if (element != null) { element.Validate(); } } } if (Lifecycle != null) { Lifecycle.Validate(); } if (LivenessProbe != null) { LivenessProbe.Validate(); } if (Ports != null) { foreach (var element1 in Ports) { if (element1 != null) { element1.Validate(); } } } if (ReadinessProbe != null) { ReadinessProbe.Validate(); } if (VolumeDevices != null) { foreach (var element2 in VolumeDevices) { if (element2 != null) { element2.Validate(); } } } if (VolumeMounts != null) { foreach (var element3 in VolumeMounts) { if (element3 != null) { element3.Validate(); } } } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Name == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } if (Image == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Image"); } if (Resources == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Resources"); } if (Ports != null) { foreach (var element in Ports) { if (element != null) { element.Validate(); } } } if (EnvironmentVariables != null) { foreach (var element1 in EnvironmentVariables) { if (element1 != null) { element1.Validate(); } } } if (Resources != null) { Resources.Validate(); } if (VolumeMounts != null) { foreach (var element2 in VolumeMounts) { if (element2 != null) { element2.Validate(); } } } if (LivenessProbe != null) { LivenessProbe.Validate(); } if (ReadinessProbe != null) { ReadinessProbe.Validate(); } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="Rest.ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (LivenessProbe != null) { LivenessProbe.Validate(); } if (ReadinessProbe != null) { ReadinessProbe.Validate(); } if (StartupProbe != null) { StartupProbe.Validate(); } }