-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ExceptionPolicy.cs
40 lines (33 loc) · 1.44 KB
/
ExceptionPolicy.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
// 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
{
public partial class ExceptionPolicy
{
/// <summary> Initializes a new instance of an exception policy. </summary>
/// <param name="exceptionPolicyId"> Id of an exception policy. </param>
/// <exception cref="ArgumentNullException"> <paramref name="exceptionPolicyId"/> is null. </exception>
public ExceptionPolicy(string exceptionPolicyId)
{
Argument.AssertNotNullOrWhiteSpace(exceptionPolicyId, nameof(exceptionPolicyId));
Id = exceptionPolicyId;
}
/// <summary> A collection of exception rules on the exception policy. </summary>
public IList<ExceptionRule> ExceptionRules { get; } = new List<ExceptionRule>();
/// <summary> Friendly name of this policy. </summary>
public string Name { get; set; }
/// <summary> The entity tag for this resource. </summary>
[CodeGenMember("Etag")]
public ETag ETag { get; internal set; }
/// <summary> Convert into a Utf8JsonRequestContent. </summary>
internal virtual RequestContent ToRequestContent()
{
var content = new Utf8JsonRequestContent();
content.JsonWriter.WriteObjectValue(this);
return content;
}
}
}