Condividi tramite


WorkerWeightedAllocation Class

Definition

Contains the weight percentage and worker selectors to be applied if selected for weighted distributions.

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

Constructors

WorkerWeightedAllocation(Double, IEnumerable<RouterWorkerSelector>)

Initializes a new instance of WorkerWeightedAllocation.

Properties

Weight

The percentage of this weight, expressed as a fraction of 1.

WorkerSelectors

A collection of worker selectors that will be applied if this allocation is selected.

Explicit Interface Implementations

IJsonModel<WorkerWeightedAllocation>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<WorkerWeightedAllocation>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<WorkerWeightedAllocation>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<WorkerWeightedAllocation>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<WorkerWeightedAllocation>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to