All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.communication.jobrouter.models.CreateClassificationPolicyOptions Maven / Gradle / Ivy

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.communication.jobrouter.models;

import com.azure.core.annotation.Fluent;

import java.util.List;

/** Request options for Create ClassificationPolicy.
 * ClassificationPolicy: A container for the rules that govern how jobs are classified.
 */
@Fluent
public final class CreateClassificationPolicyOptions {
    /**
     * Unique identifier of this policy.
     */
    private final String classificationPolicyId;

    /**
     * Friendly name of this policy.
     */
    private String name;

    /**
     * The fallback queue to select if the queue selector doesn't find a match.
     */
    private String fallbackQueueId;

    /**
     * The queue selectors to resolve a queue for a given job.
     */
    private List queueSelectors;

    /**
     * A rule of one of the following types:
     *
     *  StaticRule:  A rule providing static rules that always return the same result, regardless of input.
     *  DirectMapRule:  A rule that return the same labels as the input labels.
     *  ExpressionRule: A rule providing inline expression rules.
     *  AzureFunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.
     */
    private RouterRule prioritizationRule;

    /**
     * The worker label selectors to attach to a given job.
     */
    private List workerSelectors;

    /**
     * Constructor for CreateClassificationPolicyOptions
     * @param classificationPolicyId ClassificationPolicy id
     */
    public CreateClassificationPolicyOptions(String classificationPolicyId) {
        this.classificationPolicyId = classificationPolicyId;
    }

    /**
     * Returns classification policy id.
     * @return id
     */
    public String getClassificationPolicyId() {
        return this.classificationPolicyId;
    }

    /**
     * Returns classification policy name.
     * @return name
     */
    public String getName() {
        return this.name;
    }

    /**
     * Sets ClassificationPolicy name.
     * @param name CreateClassificationPolicyOptions name
     * @return this
     */
    public CreateClassificationPolicyOptions setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Returns fallback queue id.
     * @return fallbackQueueId
     */
    public String getFallbackQueueId() {
        return this.fallbackQueueId;
    }

    /**
     * Sets ClassificationPolicy fallbackQueueId.
     * @param fallbackQueueId CreateClassificationPolicyOptions fallbackQueueId
     * @return this
     */
    public CreateClassificationPolicyOptions setFallbackQueueId(String fallbackQueueId) {
        this.fallbackQueueId = fallbackQueueId;
        return this;
    }

    /**
     * Returns list of {@link QueueSelectorAttachment}s
     * @return queueSelectors
     */
    public List getQueueSelectors() {
        return this.queueSelectors;
    }

    /**
     * Sets ClassificationPolicy queueSelectors.
     * @param queueSelectors CreateClassificationPolicyOptions list of {@link WorkerSelectorAttachment}s
     * @return this
     */
    public CreateClassificationPolicyOptions setQueueSelectors(List queueSelectors) {
        this.queueSelectors = queueSelectors;
        return this;
    }

    /**
     * Returns prioritizationRule.
     * @return prioritizationRule
     */
    public RouterRule getPrioritizationRule() {
        return this.prioritizationRule;
    }

    /**
     * Sets ClassificationPolicy prioritizationRule.
     * @param prioritizationRule CreateClassificationPolicyOptions prioritizationRule
     * @return this
     */
    public CreateClassificationPolicyOptions setPrioritizationRule(RouterRule prioritizationRule) {
        this.prioritizationRule = prioritizationRule;
        return this;
    }

    /**
     * Returns list of {@link WorkerSelectorAttachment}s
     * @return workerSelectors
     */
    public List getWorkerSelectors() {
        return this.workerSelectors;
    }

    /**
     * Sets ClassificationPolicy workerSelectors.
     * @param workerSelectors CreateClassificationPolicyOptions list of {@link WorkerSelectorAttachment}s
     * @return this
     */
    public CreateClassificationPolicyOptions setWorkerSelectors(List workerSelectors) {
        this.workerSelectors = workerSelectors;
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy