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

package com.azure.resourcemanager.devtestlabs.models;

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

/** Properties of an environment deployment. */
@Fluent
public final class EnvironmentDeploymentProperties {
    /*
     * The Azure Resource Manager template's identifier.
     */
    @JsonProperty(value = "armTemplateId")
    private String armTemplateId;

    /*
     * The parameters of the Azure Resource Manager template.
     */
    @JsonProperty(value = "parameters")
    private List<ArmTemplateParameterProperties> parameters;

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

    /**
     * Get the armTemplateId property: The Azure Resource Manager template's identifier.
     *
     * @return the armTemplateId value.
     */
    public String armTemplateId() {
        return this.armTemplateId;
    }

    /**
     * Set the armTemplateId property: The Azure Resource Manager template's identifier.
     *
     * @param armTemplateId the armTemplateId value to set.
     * @return the EnvironmentDeploymentProperties object itself.
     */
    public EnvironmentDeploymentProperties withArmTemplateId(String armTemplateId) {
        this.armTemplateId = armTemplateId;
        return this;
    }

    /**
     * Get the parameters property: The parameters of the Azure Resource Manager template.
     *
     * @return the parameters value.
     */
    public List<ArmTemplateParameterProperties> parameters() {
        return this.parameters;
    }

    /**
     * Set the parameters property: The parameters of the Azure Resource Manager template.
     *
     * @param parameters the parameters value to set.
     * @return the EnvironmentDeploymentProperties object itself.
     */
    public EnvironmentDeploymentProperties withParameters(List<ArmTemplateParameterProperties> parameters) {
        this.parameters = parameters;
        return this;
    }

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