// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.devtestlabs.models.PolicySetResult;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Response body for evaluating a policy set. */
@Fluent
public final class EvaluatePoliciesResponseInner {
    /*
     * Results of evaluating a policy set.
     */
    @JsonProperty(value = "results")
    private List<PolicySetResult> results;

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

    /**
     * Get the results property: Results of evaluating a policy set.
     *
     * @return the results value.
     */
    public List<PolicySetResult> results() {
        return this.results;
    }

    /**
     * Set the results property: Results of evaluating a policy set.
     *
     * @param results the results value to set.
     * @return the EvaluatePoliciesResponseInner object itself.
     */
    public EvaluatePoliciesResponseInner withResults(List<PolicySetResult> results) {
        this.results = results;
        return this;
    }

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