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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.databoxedge.models.AlertErrorDetails;
import com.azure.resourcemanager.databoxedge.models.AlertSeverity;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;

/** Properties of alert. */
@Immutable
public final class AlertProperties {
    /*
     * Alert title.
     */
    @JsonProperty(value = "title", access = JsonProperty.Access.WRITE_ONLY)
    private String title;

    /*
     * Alert type.
     */
    @JsonProperty(value = "alertType", access = JsonProperty.Access.WRITE_ONLY)
    private String alertType;

    /*
     * UTC time when the alert appeared.
     */
    @JsonProperty(value = "appearedAtDateTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime appearedAtDateTime;

    /*
     * Alert recommendation.
     */
    @JsonProperty(value = "recommendation", access = JsonProperty.Access.WRITE_ONLY)
    private String recommendation;

    /*
     * Severity of the alert.
     */
    @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY)
    private AlertSeverity severity;

    /*
     * Error details of the alert.
     */
    @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY)
    private AlertErrorDetails errorDetails;

    /*
     * Alert details.
     */
    @JsonProperty(value = "detailedInformation", access = JsonProperty.Access.WRITE_ONLY)
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> detailedInformation;

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

    /**
     * Get the title property: Alert title.
     *
     * @return the title value.
     */
    public String title() {
        return this.title;
    }

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

    /**
     * Get the appearedAtDateTime property: UTC time when the alert appeared.
     *
     * @return the appearedAtDateTime value.
     */
    public OffsetDateTime appearedAtDateTime() {
        return this.appearedAtDateTime;
    }

    /**
     * Get the recommendation property: Alert recommendation.
     *
     * @return the recommendation value.
     */
    public String recommendation() {
        return this.recommendation;
    }

    /**
     * Get the severity property: Severity of the alert.
     *
     * @return the severity value.
     */
    public AlertSeverity severity() {
        return this.severity;
    }

    /**
     * Get the errorDetails property: Error details of the alert.
     *
     * @return the errorDetails value.
     */
    public AlertErrorDetails errorDetails() {
        return this.errorDetails;
    }

    /**
     * Get the detailedInformation property: Alert details.
     *
     * @return the detailedInformation value.
     */
    public Map<String, String> detailedInformation() {
        return this.detailedInformation;
    }

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