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

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

import com.azure.core.annotation.Immutable;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.edgeorder.models.CommonProperties;
import com.azure.resourcemanager.edgeorder.models.Dimensions;
import com.azure.resourcemanager.edgeorder.models.Specification;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Properties of configuration. */
@Immutable
public final class ConfigurationProperties extends CommonProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationProperties.class);

    /*
     * Specifications of the configuration
     */
    @JsonProperty(value = "specifications", access = JsonProperty.Access.WRITE_ONLY)
    private List<Specification> specifications;

    /*
     * Dimensions of the configuration
     */
    @JsonProperty(value = "dimensions", access = JsonProperty.Access.WRITE_ONLY)
    private Dimensions dimensions;

    /**
     * Get the specifications property: Specifications of the configuration.
     *
     * @return the specifications value.
     */
    public List<Specification> specifications() {
        return this.specifications;
    }

    /**
     * Get the dimensions property: Dimensions of the configuration.
     *
     * @return the dimensions value.
     */
    public Dimensions dimensions() {
        return this.dimensions;
    }

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