-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: deserialize chat to enum value for bounce type
- Loading branch information
1 parent
65a4a8b
commit e730f55
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
namespace GreenArrow.Engine.Model.Events | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Runtime.Serialization; | ||
|
||
namespace GreenArrow.Engine.Model.Events | ||
{ | ||
/// <summary> | ||
/// The type of bounce. h for hard, s for soft, and o for other. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum BounceType | ||
{ | ||
/// <summary> | ||
/// Bounce for message that not be retried | ||
/// </summary> | ||
[EnumMember(Value = "h")] | ||
Hard = 'h', | ||
|
||
/// <summary> | ||
/// Bounce for message that can be retried | ||
/// </summary> | ||
[EnumMember(Value = "s")] | ||
Soft = 's', | ||
|
||
/// <summary> | ||
/// Other type of bounce | ||
/// </summary> | ||
[EnumMember(Value = "o")] | ||
Other = 'o', | ||
} | ||
} |