/// <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="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(); } }
/// <summary> /// Creates a new Basic Readiness Service that will announce that the service has completed initialization /// </summary> /// <param name="readyProbe">The Readiness Probe to toggle</param> public BasicReadinessService(ReadinessProbe readyProbe) { _readyProbe = readyProbe; }