-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
CreateQueueOptions.cs
57 lines (48 loc) · 2.26 KB
/
CreateQueueOptions.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.Communication.JobRouter
{
/// <summary>
/// Options for creating a queue.
/// </summary>
public class CreateQueueOptions
{
/// <summary>
/// Initializes a new instance of CreateQueueOptions.
/// </summary>
/// <param name="queueId"> Id of a queue. </param>
/// <param name="distributionPolicyId"> Id of a distribution policy that will determine how a job is distributed to workers. </param>
/// <exception cref="ArgumentNullException"> <paramref name="queueId"/> is null. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="distributionPolicyId"/> is null. </exception>
public CreateQueueOptions(string queueId, string distributionPolicyId)
{
Argument.AssertNotNullOrWhiteSpace(queueId, nameof(queueId));
Argument.AssertNotNullOrWhiteSpace(distributionPolicyId, nameof(distributionPolicyId));
QueueId = queueId;
DistributionPolicyId = distributionPolicyId;
}
/// <summary>
/// Id of a queue.
/// </summary>
public string QueueId { get; }
/// <summary>
/// The ID of the distribution policy that will determine how a job is distributed to workers.
/// </summary>
public string DistributionPolicyId { get; }
/// <summary> Friendly name of this queue. </summary>
public string Name { get; set; }
/// <summary> Id of an exception policy that determines various job escalation rules. </summary>
public string ExceptionPolicyId { get; set; }
/// <summary>
/// A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.
/// </summary>
public IDictionary<string, RouterValue> Labels { get; } = new Dictionary<string, RouterValue>();
/// <summary>
/// The content to send as the request conditions of the request.
/// </summary>
public RequestConditions RequestConditions { get; set; } = new();
}
}