// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.devcenter.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.devcenter.models.HealthCheck;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** Health Check properties. */
@Immutable
public final class HealthCheckStatusDetailsProperties {
    /*
     * Start time of last execution of the health checks.
     */
    @JsonProperty(value = "startDateTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime startDateTime;

    /*
     * End time of last execution of the health checks.
     */
    @JsonProperty(value = "endDateTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime endDateTime;

    /*
     * Details for each health check item.
     */
    @JsonProperty(value = "healthChecks", access = JsonProperty.Access.WRITE_ONLY)
    private List<HealthCheck> healthChecks;

    /** Creates an instance of HealthCheckStatusDetailsProperties class. */
    public HealthCheckStatusDetailsProperties() {
    }

    /**
     * Get the startDateTime property: Start time of last execution of the health checks.
     *
     * @return the startDateTime value.
     */
    public OffsetDateTime startDateTime() {
        return this.startDateTime;
    }

    /**
     * Get the endDateTime property: End time of last execution of the health checks.
     *
     * @return the endDateTime value.
     */
    public OffsetDateTime endDateTime() {
        return this.endDateTime;
    }

    /**
     * Get the healthChecks property: Details for each health check item.
     *
     * @return the healthChecks value.
     */
    public List<HealthCheck> healthChecks() {
        return this.healthChecks;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (healthChecks() != null) {
            healthChecks().forEach(e -> e.validate());
        }
    }
}
