// 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.Immutable;
import com.azure.resourcemanager.security.models.IoTSecurityAggregatedAlertPropertiesTopDevicesListItem;
import com.azure.resourcemanager.security.models.ReportedSeverity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.LocalDate;
import java.util.List;

/** IoT Security solution aggregated alert details. */
@Immutable
public final class IoTSecurityAggregatedAlertProperties {
    /*
     * Name of the alert type.
     */
    @JsonProperty(value = "alertType", access = JsonProperty.Access.WRITE_ONLY)
    private String alertType;

    /*
     * Display name of the alert type.
     */
    @JsonProperty(value = "alertDisplayName", access = JsonProperty.Access.WRITE_ONLY)
    private String alertDisplayName;

    /*
     * Date of detection.
     */
    @JsonProperty(value = "aggregatedDateUtc", access = JsonProperty.Access.WRITE_ONLY)
    private LocalDate aggregatedDateUtc;

    /*
     * Name of the organization that raised the alert.
     */
    @JsonProperty(value = "vendorName", access = JsonProperty.Access.WRITE_ONLY)
    private String vendorName;

    /*
     * Assessed alert severity.
     */
    @JsonProperty(value = "reportedSeverity", access = JsonProperty.Access.WRITE_ONLY)
    private ReportedSeverity reportedSeverity;

    /*
     * Recommended steps for remediation.
     */
    @JsonProperty(value = "remediationSteps", access = JsonProperty.Access.WRITE_ONLY)
    private String remediationSteps;

    /*
     * Description of the suspected vulnerability and meaning.
     */
    @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
    private String description;

    /*
     * Number of alerts occurrences within the aggregated time window.
     */
    @JsonProperty(value = "count", access = JsonProperty.Access.WRITE_ONLY)
    private Long count;

    /*
     * Azure resource ID of the resource that received the alerts.
     */
    @JsonProperty(value = "effectedResourceType", access = JsonProperty.Access.WRITE_ONLY)
    private String effectedResourceType;

    /*
     * The type of the alerted resource (Azure, Non-Azure).
     */
    @JsonProperty(value = "systemSource", access = JsonProperty.Access.WRITE_ONLY)
    private String systemSource;

    /*
     * IoT Security solution alert response.
     */
    @JsonProperty(value = "actionTaken", access = JsonProperty.Access.WRITE_ONLY)
    private String actionTaken;

    /*
     * Log analytics query for getting the list of affected devices/alerts.
     */
    @JsonProperty(value = "logAnalyticsQuery", access = JsonProperty.Access.WRITE_ONLY)
    private String logAnalyticsQuery;

    /*
     * 10 devices with the highest number of occurrences of this alert type, on this day.
     */
    @JsonProperty(value = "topDevicesList", access = JsonProperty.Access.WRITE_ONLY)
    private List<IoTSecurityAggregatedAlertPropertiesTopDevicesListItem> topDevicesList;

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

    /**
     * Get the alertType property: Name of the alert type.
     *
     * @return the alertType value.
     */
    public String alertType() {
        return this.alertType;
    }

    /**
     * Get the alertDisplayName property: Display name of the alert type.
     *
     * @return the alertDisplayName value.
     */
    public String alertDisplayName() {
        return this.alertDisplayName;
    }

    /**
     * Get the aggregatedDateUtc property: Date of detection.
     *
     * @return the aggregatedDateUtc value.
     */
    public LocalDate aggregatedDateUtc() {
        return this.aggregatedDateUtc;
    }

    /**
     * Get the vendorName property: Name of the organization that raised the alert.
     *
     * @return the vendorName value.
     */
    public String vendorName() {
        return this.vendorName;
    }

    /**
     * Get the reportedSeverity property: Assessed alert severity.
     *
     * @return the reportedSeverity value.
     */
    public ReportedSeverity reportedSeverity() {
        return this.reportedSeverity;
    }

    /**
     * Get the remediationSteps property: Recommended steps for remediation.
     *
     * @return the remediationSteps value.
     */
    public String remediationSteps() {
        return this.remediationSteps;
    }

    /**
     * Get the description property: Description of the suspected vulnerability and meaning.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Get the count property: Number of alerts occurrences within the aggregated time window.
     *
     * @return the count value.
     */
    public Long count() {
        return this.count;
    }

    /**
     * Get the effectedResourceType property: Azure resource ID of the resource that received the alerts.
     *
     * @return the effectedResourceType value.
     */
    public String effectedResourceType() {
        return this.effectedResourceType;
    }

    /**
     * Get the systemSource property: The type of the alerted resource (Azure, Non-Azure).
     *
     * @return the systemSource value.
     */
    public String systemSource() {
        return this.systemSource;
    }

    /**
     * Get the actionTaken property: IoT Security solution alert response.
     *
     * @return the actionTaken value.
     */
    public String actionTaken() {
        return this.actionTaken;
    }

    /**
     * Get the logAnalyticsQuery property: Log analytics query for getting the list of affected devices/alerts.
     *
     * @return the logAnalyticsQuery value.
     */
    public String logAnalyticsQuery() {
        return this.logAnalyticsQuery;
    }

    /**
     * Get the topDevicesList property: 10 devices with the highest number of occurrences of this alert type, on this
     * day.
     *
     * @return the topDevicesList value.
     */
    public List<IoTSecurityAggregatedAlertPropertiesTopDevicesListItem> topDevicesList() {
        return this.topDevicesList;
    }

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