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

package com.azure.resourcemanager.appservice.models;

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

/** Routing rules in production experiments. */
@Fluent
public final class Experiments {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(Experiments.class);

    /*
     * List of ramp-up rules.
     */
    @JsonProperty(value = "rampUpRules")
    private List<RampUpRule> rampUpRules;

    /**
     * Get the rampUpRules property: List of ramp-up rules.
     *
     * @return the rampUpRules value.
     */
    public List<RampUpRule> rampUpRules() {
        return this.rampUpRules;
    }

    /**
     * Set the rampUpRules property: List of ramp-up rules.
     *
     * @param rampUpRules the rampUpRules value to set.
     * @return the Experiments object itself.
     */
    public Experiments withRampUpRules(List<RampUpRule> rampUpRules) {
        this.rampUpRules = rampUpRules;
        return this;
    }

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