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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Resolve health input properties. */
@Fluent
public final class ResolveHealthInputProperties {
    /*
     * Health errors.
     */
    @JsonProperty(value = "healthErrors")
    private List<ResolveHealthError> healthErrors;

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

    /**
     * Get the healthErrors property: Health errors.
     *
     * @return the healthErrors value.
     */
    public List<ResolveHealthError> healthErrors() {
        return this.healthErrors;
    }

    /**
     * Set the healthErrors property: Health errors.
     *
     * @param healthErrors the healthErrors value to set.
     * @return the ResolveHealthInputProperties object itself.
     */
    public ResolveHealthInputProperties withHealthErrors(List<ResolveHealthError> healthErrors) {
        this.healthErrors = healthErrors;
        return this;
    }

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