// 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.azure.resourcemanager.databoxedge.models.ArmBaseModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;

/** Alert on the data box edge/gateway device. */
@Immutable
public final class AlertInner extends ArmBaseModel {
    /*
     * Properties of alert.
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private AlertProperties innerProperties;

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

    /**
     * Get the innerProperties property: Properties of alert.
     *
     * @return the innerProperties value.
     */
    private AlertProperties innerProperties() {
        return this.innerProperties;
    }

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

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

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

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

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

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

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

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