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

package com.azure.resourcemanager.advisor.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.advisor.models.MetadataSupportedValueDetail;
import com.azure.resourcemanager.advisor.models.Scenario;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The metadata entity properties. */
@Fluent
public final class MetadataEntityProperties {
    /*
     * The display name.
     */
    @JsonProperty(value = "displayName")
    private String displayName;

    /*
     * The list of keys on which this entity depends on.
     */
    @JsonProperty(value = "dependsOn")
    private List<String> dependsOn;

    /*
     * The list of scenarios applicable to this metadata entity.
     */
    @JsonProperty(value = "applicableScenarios")
    private List<Scenario> applicableScenarios;

    /*
     * The list of supported values.
     */
    @JsonProperty(value = "supportedValues")
    private List<MetadataSupportedValueDetail> supportedValues;

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

    /**
     * Get the displayName property: The display name.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: The display name.
     *
     * @param displayName the displayName value to set.
     * @return the MetadataEntityProperties object itself.
     */
    public MetadataEntityProperties withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the dependsOn property: The list of keys on which this entity depends on.
     *
     * @return the dependsOn value.
     */
    public List<String> dependsOn() {
        return this.dependsOn;
    }

    /**
     * Set the dependsOn property: The list of keys on which this entity depends on.
     *
     * @param dependsOn the dependsOn value to set.
     * @return the MetadataEntityProperties object itself.
     */
    public MetadataEntityProperties withDependsOn(List<String> dependsOn) {
        this.dependsOn = dependsOn;
        return this;
    }

    /**
     * Get the applicableScenarios property: The list of scenarios applicable to this metadata entity.
     *
     * @return the applicableScenarios value.
     */
    public List<Scenario> applicableScenarios() {
        return this.applicableScenarios;
    }

    /**
     * Set the applicableScenarios property: The list of scenarios applicable to this metadata entity.
     *
     * @param applicableScenarios the applicableScenarios value to set.
     * @return the MetadataEntityProperties object itself.
     */
    public MetadataEntityProperties withApplicableScenarios(List<Scenario> applicableScenarios) {
        this.applicableScenarios = applicableScenarios;
        return this;
    }

    /**
     * Get the supportedValues property: The list of supported values.
     *
     * @return the supportedValues value.
     */
    public List<MetadataSupportedValueDetail> supportedValues() {
        return this.supportedValues;
    }

    /**
     * Set the supportedValues property: The list of supported values.
     *
     * @param supportedValues the supportedValues value to set.
     * @return the MetadataEntityProperties object itself.
     */
    public MetadataEntityProperties withSupportedValues(List<MetadataSupportedValueDetail> supportedValues) {
        this.supportedValues = supportedValues;
        return this;
    }

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