// 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 com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** An abstract Query item for entity. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "kind",
    defaultImpl = EntityQueryItem.class)
@JsonTypeName("EntityQueryItem")
@JsonSubTypes({@JsonSubTypes.Type(name = "Insight", value = InsightQueryItem.class)})
@Fluent
public class EntityQueryItem {
    /*
     * Query Template ARM ID
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * Query Template ARM Name
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * ARM Type
     */
    @JsonProperty(value = "type")
    private String type;

    /**
     * Get the id property: Query Template ARM ID.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Get the name property: Query Template ARM Name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Query Template ARM Name.
     *
     * @param name the name value to set.
     * @return the EntityQueryItem object itself.
     */
    public EntityQueryItem withName(String name) {
        this.name = name;
        return this;
    }

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

    /**
     * Set the type property: ARM Type.
     *
     * @param type the type value to set.
     * @return the EntityQueryItem object itself.
     */
    public EntityQueryItem withType(String type) {
        this.type = type;
        return this;
    }

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