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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.resourcehealth.models.MetadataSupportedValueDetail;
import com.azure.resourcemanager.resourcehealth.models.Scenario;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The metadata entity contract. */
@Fluent
public final class MetadataEntityInner extends ProxyResource {
    /*
     * The metadata entity properties.
     */
    @JsonProperty(value = "properties")
    private MetadataEntityProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

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

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

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

    /**
     * Set the displayName property: The display name.
     *
     * @param displayName the displayName value to set.
     * @return the MetadataEntityInner object itself.
     */
    public MetadataEntityInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new MetadataEntityProperties();
        }
        this.innerProperties().withDisplayName(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.innerProperties() == null ? null : this.innerProperties().dependsOn();
    }

    /**
     * Set the dependsOn property: The list of keys on which this entity depends on.
     *
     * @param dependsOn the dependsOn value to set.
     * @return the MetadataEntityInner object itself.
     */
    public MetadataEntityInner withDependsOn(List<String> dependsOn) {
        if (this.innerProperties() == null) {
            this.innerProperties = new MetadataEntityProperties();
        }
        this.innerProperties().withDependsOn(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.innerProperties() == null ? null : this.innerProperties().applicableScenarios();
    }

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

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

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

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