// 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;

/** Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode. */
@Fluent
public final class ScoringRuleOptionsInternal {
    /*
     * (Optional) Set batch size when AllowScoringBatchOfWorkers is set to true. Defaults to 20 if not configured.
     */
    @JsonProperty(value = "batchSize")
    private Integer batchSize;

    /*
     * (Optional) List of extra parameters from the job that will be sent as part of the payload to scoring rule.
     * If not set, the job's labels (sent in the payload as `job`) and the job's worker selectors (sent in the payload
     * as `selectors`)
     * are added to the payload of the scoring rule by default.
     * Note: Worker labels are always sent with scoring payload.
     */
    @JsonProperty(value = "scoringParameters")
    private List<ScoringRuleParameterSelectorInternal> scoringParameters;

    /*
     * (Optional)
     * If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as
     * `workers`.
     * By default, set to false and the parameter name for the worker labels will be sent as `worker`.
     * Note: If enabled, use BatchSize to set batch size.
     */
    @JsonProperty(value = "allowScoringBatchOfWorkers")
    private Boolean allowScoringBatchOfWorkers;

    /*
     * (Optional)
     * If false, will sort scores by ascending order. By default, set to true.
     */
    @JsonProperty(value = "descendingOrder")
    private Boolean descendingOrder;

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

    /**
     * Get the batchSize property: (Optional) Set batch size when AllowScoringBatchOfWorkers is set to true. Defaults to
     * 20 if not configured.
     *
     * @return the batchSize value.
     */
    public Integer getBatchSize() {
        return this.batchSize;
    }

    /**
     * Set the batchSize property: (Optional) Set batch size when AllowScoringBatchOfWorkers is set to true. Defaults to
     * 20 if not configured.
     *
     * @param batchSize the batchSize value to set.
     * @return the ScoringRuleOptionsInternal object itself.
     */
    public ScoringRuleOptionsInternal setBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
        return this;
    }

    /**
     * Get the scoringParameters property: (Optional) List of extra parameters from the job that will be sent as part of
     * the payload to scoring rule. If not set, the job's labels (sent in the payload as `job`) and the job's worker
     * selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note:
     * Worker labels are always sent with scoring payload.
     *
     * @return the scoringParameters value.
     */
    public List<ScoringRuleParameterSelectorInternal> getScoringParameters() {
        return this.scoringParameters;
    }

    /**
     * Set the scoringParameters property: (Optional) List of extra parameters from the job that will be sent as part of
     * the payload to scoring rule. If not set, the job's labels (sent in the payload as `job`) and the job's worker
     * selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note:
     * Worker labels are always sent with scoring payload.
     *
     * @param scoringParameters the scoringParameters value to set.
     * @return the ScoringRuleOptionsInternal object itself.
     */
    public ScoringRuleOptionsInternal setScoringParameters(
            List<ScoringRuleParameterSelectorInternal> scoringParameters) {
        this.scoringParameters = scoringParameters;
        return this;
    }

    /**
     * Get the allowScoringBatchOfWorkers property: (Optional) If set to true, will score workers in batches, and the
     * parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name
     * for the worker labels will be sent as `worker`. Note: If enabled, use BatchSize to set batch size.
     *
     * @return the allowScoringBatchOfWorkers value.
     */
    public Boolean isAllowScoringBatchOfWorkers() {
        return this.allowScoringBatchOfWorkers;
    }

    /**
     * Set the allowScoringBatchOfWorkers property: (Optional) If set to true, will score workers in batches, and the
     * parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name
     * for the worker labels will be sent as `worker`. Note: If enabled, use BatchSize to set batch size.
     *
     * @param allowScoringBatchOfWorkers the allowScoringBatchOfWorkers value to set.
     * @return the ScoringRuleOptionsInternal object itself.
     */
    public ScoringRuleOptionsInternal setAllowScoringBatchOfWorkers(Boolean allowScoringBatchOfWorkers) {
        this.allowScoringBatchOfWorkers = allowScoringBatchOfWorkers;
        return this;
    }

    /**
     * Get the descendingOrder property: (Optional) If false, will sort scores by ascending order. By default, set to
     * true.
     *
     * @return the descendingOrder value.
     */
    public Boolean isDescendingOrder() {
        return this.descendingOrder;
    }

    /**
     * Set the descendingOrder property: (Optional) If false, will sort scores by ascending order. By default, set to
     * true.
     *
     * @param descendingOrder the descendingOrder value to set.
     * @return the ScoringRuleOptionsInternal object itself.
     */
    public ScoringRuleOptionsInternal setDescendingOrder(Boolean descendingOrder) {
        this.descendingOrder = descendingOrder;
        return this;
    }
}
