// 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.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** An properties abstract Query item for entity. */
@Fluent
public class EntityQueryItemProperties {
    /*
     * Data types for template
     */
    @JsonProperty(value = "dataTypes")
    private List<EntityQueryItemPropertiesDataTypesItem> dataTypes;

    /*
     * The type of the entity
     */
    @JsonProperty(value = "inputEntityType")
    private EntityType inputEntityType;

    /*
     * Data types for template
     */
    @JsonProperty(value = "requiredInputFieldsSets")
    private List<List<String>> requiredInputFieldsSets;

    /*
     * The query applied only to entities matching to all filters
     */
    @JsonProperty(value = "entitiesFilter")
    private Object entitiesFilter;

    /**
     * Get the dataTypes property: Data types for template.
     *
     * @return the dataTypes value.
     */
    public List<EntityQueryItemPropertiesDataTypesItem> dataTypes() {
        return this.dataTypes;
    }

    /**
     * Set the dataTypes property: Data types for template.
     *
     * @param dataTypes the dataTypes value to set.
     * @return the EntityQueryItemProperties object itself.
     */
    public EntityQueryItemProperties withDataTypes(List<EntityQueryItemPropertiesDataTypesItem> dataTypes) {
        this.dataTypes = dataTypes;
        return this;
    }

    /**
     * Get the inputEntityType property: The type of the entity.
     *
     * @return the inputEntityType value.
     */
    public EntityType inputEntityType() {
        return this.inputEntityType;
    }

    /**
     * Set the inputEntityType property: The type of the entity.
     *
     * @param inputEntityType the inputEntityType value to set.
     * @return the EntityQueryItemProperties object itself.
     */
    public EntityQueryItemProperties withInputEntityType(EntityType inputEntityType) {
        this.inputEntityType = inputEntityType;
        return this;
    }

    /**
     * Get the requiredInputFieldsSets property: Data types for template.
     *
     * @return the requiredInputFieldsSets value.
     */
    public List<List<String>> requiredInputFieldsSets() {
        return this.requiredInputFieldsSets;
    }

    /**
     * Set the requiredInputFieldsSets property: Data types for template.
     *
     * @param requiredInputFieldsSets the requiredInputFieldsSets value to set.
     * @return the EntityQueryItemProperties object itself.
     */
    public EntityQueryItemProperties withRequiredInputFieldsSets(List<List<String>> requiredInputFieldsSets) {
        this.requiredInputFieldsSets = requiredInputFieldsSets;
        return this;
    }

    /**
     * Get the entitiesFilter property: The query applied only to entities matching to all filters.
     *
     * @return the entitiesFilter value.
     */
    public Object entitiesFilter() {
        return this.entitiesFilter;
    }

    /**
     * Set the entitiesFilter property: The query applied only to entities matching to all filters.
     *
     * @param entitiesFilter the entitiesFilter value to set.
     * @return the EntityQueryItemProperties object itself.
     */
    public EntityQueryItemProperties withEntitiesFilter(Object entitiesFilter) {
        this.entitiesFilter = entitiesFilter;
        return this;
    }

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