Partager via


ScoringRuleOptions Class

Definition

Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode.

public class ScoringRuleOptions
public class ScoringRuleOptions : System.ClientModel.Primitives.IJsonModel<Azure.Communication.JobRouter.ScoringRuleOptions>, System.ClientModel.Primitives.IPersistableModel<Azure.Communication.JobRouter.ScoringRuleOptions>
type ScoringRuleOptions = class
type ScoringRuleOptions = class
    interface IJsonModel<ScoringRuleOptions>
    interface IPersistableModel<ScoringRuleOptions>
Public Class ScoringRuleOptions
Public Class ScoringRuleOptions
Implements IJsonModel(Of ScoringRuleOptions), IPersistableModel(Of ScoringRuleOptions)
Inheritance
ScoringRuleOptions
Implements

Constructors

ScoringRuleOptions()

Initializes a new instance of ScoringRuleOptions.

Properties

BatchSize

Set batch size when AllowScoringBatchOfWorkers is set to true. Defaults to 20 if not configured.

DescendingOrder

If false, will sort scores by ascending order. By default, set to true.

IsBatchScoringEnabled

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.

ScoringParameters

List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as job) and a 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.

Explicit Interface Implementations

IJsonModel<ScoringRuleOptions>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ScoringRuleOptions>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ScoringRuleOptions>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ScoringRuleOptions>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ScoringRuleOptions>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to