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

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner;
import com.azure.resourcemanager.securityinsights.fluent.models.MailClusterEntityProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;

/** Represents a mail cluster entity. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("MailCluster")
@Fluent
public final class MailClusterEntity extends EntityInner {
    /*
     * Mail cluster entity properties
     */
    @JsonProperty(value = "properties")
    private MailClusterEntityProperties innerProperties;

    /**
     * Get the innerProperties property: Mail cluster entity properties.
     *
     * @return the innerProperties value.
     */
    private MailClusterEntityProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster.
     *
     * @return the networkMessageIds value.
     */
    public List<String> networkMessageIds() {
        return this.innerProperties() == null ? null : this.innerProperties().networkMessageIds();
    }

    /**
     * Get the countByDeliveryStatus property: Count of mail messages by DeliveryStatus string representation.
     *
     * @return the countByDeliveryStatus value.
     */
    public Object countByDeliveryStatus() {
        return this.innerProperties() == null ? null : this.innerProperties().countByDeliveryStatus();
    }

    /**
     * Get the countByThreatType property: Count of mail messages by ThreatType string representation.
     *
     * @return the countByThreatType value.
     */
    public Object countByThreatType() {
        return this.innerProperties() == null ? null : this.innerProperties().countByThreatType();
    }

    /**
     * Get the countByProtectionStatus property: Count of mail messages by ProtectionStatus string representation.
     *
     * @return the countByProtectionStatus value.
     */
    public Object countByProtectionStatus() {
        return this.innerProperties() == null ? null : this.innerProperties().countByProtectionStatus();
    }

    /**
     * Get the threats property: The threats of mail messages that are part of the mail cluster.
     *
     * @return the threats value.
     */
    public List<String> threats() {
        return this.innerProperties() == null ? null : this.innerProperties().threats();
    }

    /**
     * Get the query property: The query that was used to identify the messages of the mail cluster.
     *
     * @return the query value.
     */
    public String query() {
        return this.innerProperties() == null ? null : this.innerProperties().query();
    }

    /**
     * Get the queryTime property: The query time.
     *
     * @return the queryTime value.
     */
    public OffsetDateTime queryTime() {
        return this.innerProperties() == null ? null : this.innerProperties().queryTime();
    }

    /**
     * Get the mailCount property: The number of mail messages that are part of the mail cluster.
     *
     * @return the mailCount value.
     */
    public Integer mailCount() {
        return this.innerProperties() == null ? null : this.innerProperties().mailCount();
    }

    /**
     * Get the isVolumeAnomaly property: Is this a volume anomaly mail cluster.
     *
     * @return the isVolumeAnomaly value.
     */
    public Boolean isVolumeAnomaly() {
        return this.innerProperties() == null ? null : this.innerProperties().isVolumeAnomaly();
    }

    /**
     * Get the source property: The source of the mail cluster (default is 'O365 ATP').
     *
     * @return the source value.
     */
    public String source() {
        return this.innerProperties() == null ? null : this.innerProperties().source();
    }

    /**
     * Get the clusterSourceIdentifier property: The id of the cluster source.
     *
     * @return the clusterSourceIdentifier value.
     */
    public String clusterSourceIdentifier() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterSourceIdentifier();
    }

    /**
     * Get the clusterSourceType property: The type of the cluster source.
     *
     * @return the clusterSourceType value.
     */
    public String clusterSourceType() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterSourceType();
    }

    /**
     * Get the clusterQueryStartTime property: The cluster query start time.
     *
     * @return the clusterQueryStartTime value.
     */
    public OffsetDateTime clusterQueryStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterQueryStartTime();
    }

    /**
     * Get the clusterQueryEndTime property: The cluster query end time.
     *
     * @return the clusterQueryEndTime value.
     */
    public OffsetDateTime clusterQueryEndTime() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterQueryEndTime();
    }

    /**
     * Get the clusterGroup property: The cluster group.
     *
     * @return the clusterGroup value.
     */
    public String clusterGroup() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterGroup();
    }

    /**
     * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented
     * to the user.
     *
     * @return the additionalData value.
     */
    public Map<String, Object> additionalData() {
        return this.innerProperties() == null ? null : this.innerProperties().additionalData();
    }

    /**
     * Get the friendlyName property: The graph item display name which is a short humanly readable description of the
     * graph item instance. This property is optional and might be system generated.
     *
     * @return the friendlyName value.
     */
    public String friendlyName() {
        return this.innerProperties() == null ? null : this.innerProperties().friendlyName();
    }

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