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

package com.azure.resourcemanager.policyinsights.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Evaluation details of policy language expressions. */
@Fluent
public final class ExpressionEvaluationDetails {
    /*
     * Evaluation result.
     */
    @JsonProperty(value = "result")
    private String result;

    /*
     * Expression evaluated.
     */
    @JsonProperty(value = "expression")
    private String expression;

    /*
     * The kind of expression that was evaluated.
     */
    @JsonProperty(value = "expressionKind", access = JsonProperty.Access.WRITE_ONLY)
    private String expressionKind;

    /*
     * Property path if the expression is a field or an alias.
     */
    @JsonProperty(value = "path")
    private String path;

    /*
     * Value of the expression.
     */
    @JsonProperty(value = "expressionValue")
    private Object expressionValue;

    /*
     * Target value to be compared with the expression value.
     */
    @JsonProperty(value = "targetValue")
    private Object targetValue;

    /*
     * Operator to compare the expression value and the target value.
     */
    @JsonProperty(value = "operator")
    private String operator;

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

    /**
     * Get the result property: Evaluation result.
     *
     * @return the result value.
     */
    public String result() {
        return this.result;
    }

    /**
     * Set the result property: Evaluation result.
     *
     * @param result the result value to set.
     * @return the ExpressionEvaluationDetails object itself.
     */
    public ExpressionEvaluationDetails withResult(String result) {
        this.result = result;
        return this;
    }

    /**
     * Get the expression property: Expression evaluated.
     *
     * @return the expression value.
     */
    public String expression() {
        return this.expression;
    }

    /**
     * Set the expression property: Expression evaluated.
     *
     * @param expression the expression value to set.
     * @return the ExpressionEvaluationDetails object itself.
     */
    public ExpressionEvaluationDetails withExpression(String expression) {
        this.expression = expression;
        return this;
    }

    /**
     * Get the expressionKind property: The kind of expression that was evaluated.
     *
     * @return the expressionKind value.
     */
    public String expressionKind() {
        return this.expressionKind;
    }

    /**
     * Get the path property: Property path if the expression is a field or an alias.
     *
     * @return the path value.
     */
    public String path() {
        return this.path;
    }

    /**
     * Set the path property: Property path if the expression is a field or an alias.
     *
     * @param path the path value to set.
     * @return the ExpressionEvaluationDetails object itself.
     */
    public ExpressionEvaluationDetails withPath(String path) {
        this.path = path;
        return this;
    }

    /**
     * Get the expressionValue property: Value of the expression.
     *
     * @return the expressionValue value.
     */
    public Object expressionValue() {
        return this.expressionValue;
    }

    /**
     * Set the expressionValue property: Value of the expression.
     *
     * @param expressionValue the expressionValue value to set.
     * @return the ExpressionEvaluationDetails object itself.
     */
    public ExpressionEvaluationDetails withExpressionValue(Object expressionValue) {
        this.expressionValue = expressionValue;
        return this;
    }

    /**
     * Get the targetValue property: Target value to be compared with the expression value.
     *
     * @return the targetValue value.
     */
    public Object targetValue() {
        return this.targetValue;
    }

    /**
     * Set the targetValue property: Target value to be compared with the expression value.
     *
     * @param targetValue the targetValue value to set.
     * @return the ExpressionEvaluationDetails object itself.
     */
    public ExpressionEvaluationDetails withTargetValue(Object targetValue) {
        this.targetValue = targetValue;
        return this;
    }

    /**
     * Get the operator property: Operator to compare the expression value and the target value.
     *
     * @return the operator value.
     */
    public String operator() {
        return this.operator;
    }

    /**
     * Set the operator property: Operator to compare the expression value and the target value.
     *
     * @param operator the operator value to set.
     * @return the ExpressionEvaluationDetails object itself.
     */
    public ExpressionEvaluationDetails withOperator(String operator) {
        this.operator = operator;
        return this;
    }

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