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

package com.azure.resourcemanager.appcontainers.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Metadata of the diagnostics response. */
@Fluent
public final class DiagnosticsDefinition {
    /*
     * Unique detector name
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * Display Name of the detector
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * Details of the diagnostics info
     */
    @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
    private String description;

    /*
     * Authors' names of the detector
     */
    @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY)
    private String author;

    /*
     * Category of the detector
     */
    @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY)
    private String category;

    /*
     * List of support topics
     */
    @JsonProperty(value = "supportTopicList")
    private List<DiagnosticSupportTopic> supportTopicList;

    /*
     * List of analysis types
     */
    @JsonProperty(value = "analysisTypes")
    private List<String> analysisTypes;

    /*
     * Authors' names of the detector
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private String type;

    /*
     * Authors' names of the detector
     */
    @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY)
    private Float score;

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

    /**
     * Get the id property: Unique detector name.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Get the name property: Display Name of the detector.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the description property: Details of the diagnostics info.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Get the author property: Authors' names of the detector.
     *
     * @return the author value.
     */
    public String author() {
        return this.author;
    }

    /**
     * Get the category property: Category of the detector.
     *
     * @return the category value.
     */
    public String category() {
        return this.category;
    }

    /**
     * Get the supportTopicList property: List of support topics.
     *
     * @return the supportTopicList value.
     */
    public List<DiagnosticSupportTopic> supportTopicList() {
        return this.supportTopicList;
    }

    /**
     * Set the supportTopicList property: List of support topics.
     *
     * @param supportTopicList the supportTopicList value to set.
     * @return the DiagnosticsDefinition object itself.
     */
    public DiagnosticsDefinition withSupportTopicList(List<DiagnosticSupportTopic> supportTopicList) {
        this.supportTopicList = supportTopicList;
        return this;
    }

    /**
     * Get the analysisTypes property: List of analysis types.
     *
     * @return the analysisTypes value.
     */
    public List<String> analysisTypes() {
        return this.analysisTypes;
    }

    /**
     * Set the analysisTypes property: List of analysis types.
     *
     * @param analysisTypes the analysisTypes value to set.
     * @return the DiagnosticsDefinition object itself.
     */
    public DiagnosticsDefinition withAnalysisTypes(List<String> analysisTypes) {
        this.analysisTypes = analysisTypes;
        return this;
    }

    /**
     * Get the type property: Authors' names of the detector.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Get the score property: Authors' names of the detector.
     *
     * @return the score value.
     */
    public Float score() {
        return this.score;
    }

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