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

package com.azure.communication.jobrouter.implementation.models;

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

/** Contains the weight percentage and queue selectors to be applied if selected for weighted distributions. */
@Fluent
public final class QueueWeightedAllocationInternal {
    /*
     * The percentage of this weight, expressed as a fraction of 1.
     */
    @JsonProperty(value = "weight", required = true)
    private double weight;

    /*
     * A collection of queue selectors that will be applied if this allocation is selected.
     */
    @JsonProperty(value = "queueSelectors", required = true)
    private List<RouterQueueSelectorInternal> queueSelectors;

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

    /**
     * Get the weight property: The percentage of this weight, expressed as a fraction of 1.
     *
     * @return the weight value.
     */
    public double getWeight() {
        return this.weight;
    }

    /**
     * Set the weight property: The percentage of this weight, expressed as a fraction of 1.
     *
     * @param weight the weight value to set.
     * @return the QueueWeightedAllocationInternal object itself.
     */
    public QueueWeightedAllocationInternal setWeight(double weight) {
        this.weight = weight;
        return this;
    }

    /**
     * Get the queueSelectors property: A collection of queue selectors that will be applied if this allocation is
     * selected.
     *
     * @return the queueSelectors value.
     */
    public List<RouterQueueSelectorInternal> getQueueSelectors() {
        return this.queueSelectors;
    }

    /**
     * Set the queueSelectors property: A collection of queue selectors that will be applied if this allocation is
     * selected.
     *
     * @param queueSelectors the queueSelectors value to set.
     * @return the QueueWeightedAllocationInternal object itself.
     */
    public QueueWeightedAllocationInternal setQueueSelectors(List<RouterQueueSelectorInternal> queueSelectors) {
        this.queueSelectors = queueSelectors;
        return this;
    }
}
