-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
WorkerWeightedAllocation.cs
32 lines (27 loc) · 1.3 KB
/
WorkerWeightedAllocation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Core;
namespace Azure.Communication.JobRouter
{
/// <summary> Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. </summary>
public partial class WorkerWeightedAllocation
{
/// <summary> Initializes a new instance of WorkerWeightedAllocation. </summary>
/// <param name="weight"> The percentage of this weight, expressed as a fraction of 1. </param>
/// <param name="workerSelectors"> A collection of worker selectors that will be applied if this allocation is selected. </param>
internal WorkerWeightedAllocation(double weight, IReadOnlyList<RouterWorkerSelector> workerSelectors)
{
Weight = weight;
WorkerSelectors = workerSelectors;
}
/// <summary> The percentage of this weight, expressed as a fraction of 1. </summary>
public double Weight { get; }
/// <summary> A collection of worker selectors that will be applied if this allocation is selected. </summary>
public IReadOnlyList<RouterWorkerSelector> WorkerSelectors { get; }
}
}