-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Expand file tree
/
Copy pathOptOutAddResponseItem.cs
More file actions
41 lines (36 loc) · 1.66 KB
/
OptOutAddResponseItem.cs
File metadata and controls
41 lines (36 loc) · 1.66 KB
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
namespace Azure.Communication.Sms.Models
{
/// <summary> The OptOutAddResponseItem. </summary>
public struct OptOutAddResponseItem
{
/// <summary> Initializes a new instance of <see cref="OptOutAddResponseItem"/>. </summary>
/// <param name="to"> The recipient phone number (in E.164 format). </param>
/// <param name="httpStatusCode"></param>
/// <exception cref="ArgumentNullException"> <paramref name="to"/> is null. </exception>
internal OptOutAddResponseItem(string to, int httpStatusCode)
{
Argument.AssertNotNull(to, nameof(to));
To = to;
HttpStatusCode = httpStatusCode;
}
/// <summary> Initializes a new instance of <see cref="OptOutAddResponseItem"/>. </summary>
/// <param name="to"> The recipient phone number (in E.164 format). </param>
/// <param name="httpStatusCode"></param>
/// <param name="errorMessage"> Optional error message in case of 4xx/5xx errors. </param>
internal OptOutAddResponseItem(string to, int httpStatusCode, string errorMessage)
{
To = to;
HttpStatusCode = httpStatusCode;
ErrorMessage = errorMessage;
}
/// <summary> The recipient phone number (in E.164 format). </summary>
public string To { get; }
/// <summary> Gets the http status code. </summary>
public int HttpStatusCode { get; }
/// <summary> Optional error message in case of 4xx/5xx errors. </summary>
public string ErrorMessage { get; }
}
}