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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.security.models.EnvironmentDetails;
import com.azure.resourcemanager.security.models.HealthDataClassification;
import com.azure.resourcemanager.security.models.Issue;
import com.azure.resourcemanager.security.models.ResourceDetailsAutoGenerated;
import com.azure.resourcemanager.security.models.StatusAutoGenerated;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The health report resource. */
@Fluent
public final class HealthReportInner extends ProxyResource {
    /*
     * Properties of a health report
     */
    @JsonProperty(value = "properties")
    private HealthReportProperties innerProperties;

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

    /**
     * Get the innerProperties property: Properties of a health report.
     *
     * @return the innerProperties value.
     */
    private HealthReportProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the resourceDetails property: The resource details of the health report.
     *
     * @return the resourceDetails value.
     */
    public ResourceDetailsAutoGenerated resourceDetails() {
        return this.innerProperties() == null ? null : this.innerProperties().resourceDetails();
    }

    /**
     * Set the resourceDetails property: The resource details of the health report.
     *
     * @param resourceDetails the resourceDetails value to set.
     * @return the HealthReportInner object itself.
     */
    public HealthReportInner withResourceDetails(ResourceDetailsAutoGenerated resourceDetails) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HealthReportProperties();
        }
        this.innerProperties().withResourceDetails(resourceDetails);
        return this;
    }

    /**
     * Get the environmentDetails property: The environment details of the resource.
     *
     * @return the environmentDetails value.
     */
    public EnvironmentDetails environmentDetails() {
        return this.innerProperties() == null ? null : this.innerProperties().environmentDetails();
    }

    /**
     * Set the environmentDetails property: The environment details of the resource.
     *
     * @param environmentDetails the environmentDetails value to set.
     * @return the HealthReportInner object itself.
     */
    public HealthReportInner withEnvironmentDetails(EnvironmentDetails environmentDetails) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HealthReportProperties();
        }
        this.innerProperties().withEnvironmentDetails(environmentDetails);
        return this;
    }

    /**
     * Get the healthDataClassification property: The classification of the health report.
     *
     * @return the healthDataClassification value.
     */
    public HealthDataClassification healthDataClassification() {
        return this.innerProperties() == null ? null : this.innerProperties().healthDataClassification();
    }

    /**
     * Set the healthDataClassification property: The classification of the health report.
     *
     * @param healthDataClassification the healthDataClassification value to set.
     * @return the HealthReportInner object itself.
     */
    public HealthReportInner withHealthDataClassification(HealthDataClassification healthDataClassification) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HealthReportProperties();
        }
        this.innerProperties().withHealthDataClassification(healthDataClassification);
        return this;
    }

    /**
     * Get the status property: The status of the health report.
     *
     * @return the status value.
     */
    public StatusAutoGenerated status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Set the status property: The status of the health report.
     *
     * @param status the status value to set.
     * @return the HealthReportInner object itself.
     */
    public HealthReportInner withStatus(StatusAutoGenerated status) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HealthReportProperties();
        }
        this.innerProperties().withStatus(status);
        return this;
    }

    /**
     * Get the affectedDefendersPlans property: The affected defenders plans by unhealthy report.
     *
     * @return the affectedDefendersPlans value.
     */
    public List<String> affectedDefendersPlans() {
        return this.innerProperties() == null ? null : this.innerProperties().affectedDefendersPlans();
    }

    /**
     * Set the affectedDefendersPlans property: The affected defenders plans by unhealthy report.
     *
     * @param affectedDefendersPlans the affectedDefendersPlans value to set.
     * @return the HealthReportInner object itself.
     */
    public HealthReportInner withAffectedDefendersPlans(List<String> affectedDefendersPlans) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HealthReportProperties();
        }
        this.innerProperties().withAffectedDefendersPlans(affectedDefendersPlans);
        return this;
    }

    /**
     * Get the issues property: A collection of the issues in the report.
     *
     * @return the issues value.
     */
    public List<Issue> issues() {
        return this.innerProperties() == null ? null : this.innerProperties().issues();
    }

    /**
     * Set the issues property: A collection of the issues in the report.
     *
     * @param issues the issues value to set.
     * @return the HealthReportInner object itself.
     */
    public HealthReportInner withIssues(List<Issue> issues) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HealthReportProperties();
        }
        this.innerProperties().withIssues(issues);
        return this;
    }

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