// 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.FileHashEntityProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.Map;

/** Represents a file hash entity. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonTypeName("FileHash")
@Fluent
public final class FileHashEntity extends EntityInner {
    /*
     * FileHash entity properties
     */
    @JsonProperty(value = "properties")
    private FileHashEntityProperties innerProperties;

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

    /**
     * Get the algorithm property: The hash algorithm type.
     *
     * @return the algorithm value.
     */
    public FileHashAlgorithm algorithm() {
        return this.innerProperties() == null ? null : this.innerProperties().algorithm();
    }

    /**
     * Get the hashValue property: The file hash value.
     *
     * @return the hashValue value.
     */
    public String hashValue() {
        return this.innerProperties() == null ? null : this.innerProperties().hashValue();
    }

    /**
     * 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();
        }
    }
}
