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

package com.azure.resourcemanager.alertsmanagement.models;

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

/** Condition to trigger an alert processing rule. */
@Fluent
public final class Condition {
    /*
     * Field for a given condition.
     */
    @JsonProperty(value = "field")
    private Field field;

    /*
     * Operator for a given condition.
     */
    @JsonProperty(value = "operator")
    private Operator operator;

    /*
     * List of values to match for a given condition.
     */
    @JsonProperty(value = "values")
    private List<String> values;

    /**
     * Get the field property: Field for a given condition.
     *
     * @return the field value.
     */
    public Field field() {
        return this.field;
    }

    /**
     * Set the field property: Field for a given condition.
     *
     * @param field the field value to set.
     * @return the Condition object itself.
     */
    public Condition withField(Field field) {
        this.field = field;
        return this;
    }

    /**
     * Get the operator property: Operator for a given condition.
     *
     * @return the operator value.
     */
    public Operator operator() {
        return this.operator;
    }

    /**
     * Set the operator property: Operator for a given condition.
     *
     * @param operator the operator value to set.
     * @return the Condition object itself.
     */
    public Condition withOperator(Operator operator) {
        this.operator = operator;
        return this;
    }

    /**
     * Get the values property: List of values to match for a given condition.
     *
     * @return the values value.
     */
    public List<String> values() {
        return this.values;
    }

    /**
     * Set the values property: List of values to match for a given condition.
     *
     * @param values the values value to set.
     * @return the Condition object itself.
     */
    public Condition withValues(List<String> values) {
        this.values = values;
        return this;
    }

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