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

package com.azure.resourcemanager.extendedlocation.models;

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

/** Resource Sync Rules matchExpression property definition. */
@Fluent
public final class MatchExpressionsProperties {
    /*
     * Key is the label key that the selector applies to.
     */
    @JsonProperty(value = "key")
    private String key;

    /*
     * The Operator field represents a key's relationship to a set of values.
     * Valid operators are In, NotIn, Exists and DoesNotExist.
     */
    @JsonProperty(value = "operator")
    private String operator;

    /*
     * The label value
     */
    @JsonProperty(value = "values")
    private List<String> values;

    /**
     * Get the key property: Key is the label key that the selector applies to.
     *
     * @return the key value.
     */
    public String key() {
        return this.key;
    }

    /**
     * Set the key property: Key is the label key that the selector applies to.
     *
     * @param key the key value to set.
     * @return the MatchExpressionsProperties object itself.
     */
    public MatchExpressionsProperties withKey(String key) {
        this.key = key;
        return this;
    }

    /**
     * Get the operator property: The Operator field represents a key's relationship to a set of values. Valid operators
     * are In, NotIn, Exists and DoesNotExist.
     *
     * @return the operator value.
     */
    public String operator() {
        return this.operator;
    }

    /**
     * Set the operator property: The Operator field represents a key's relationship to a set of values. Valid operators
     * are In, NotIn, Exists and DoesNotExist.
     *
     * @param operator the operator value to set.
     * @return the MatchExpressionsProperties object itself.
     */
    public MatchExpressionsProperties withOperator(String operator) {
        this.operator = operator;
        return this;
    }

    /**
     * Get the values property: The label value.
     *
     * @return the values value.
     */
    public List<String> values() {
        return this.values;
    }

    /**
     * Set the values property: The label value.
     *
     * @param values the values value to set.
     * @return the MatchExpressionsProperties object itself.
     */
    public MatchExpressionsProperties withValues(List<String> values) {
        this.values = values;
        return this;
    }

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