@@ -20,56 +20,60 @@ public class Notification
2020
2121 public class Android
2222 {
23+ /// <summary>
24+ /// 必填。
25+ /// </summary>
2326 [ JsonProperty ( "alert" ) ]
2427 public string Alert { get ; set ; }
2528
26- [ JsonProperty ( "title" ) ]
29+ [ JsonProperty ( "title" , NullValueHandling = NullValueHandling . Ignore ) ]
2730 public string Title { get ; set ; }
2831
29- [ JsonProperty ( "builder_id" ) ]
30- public int BuilderId { get ; set ; }
32+ [ JsonProperty ( "builder_id" , NullValueHandling = NullValueHandling . Ignore ) ]
33+ public int ? BuilderId { get ; set ; }
3134
32- [ JsonProperty ( "priority" ) ]
33- public int Priority { get ; set ; }
35+ [ JsonProperty ( "priority" , NullValueHandling = NullValueHandling . Ignore ) ]
36+ public int ? Priority { get ; set ; }
3437
35- [ JsonProperty ( "category" ) ]
38+ [ JsonProperty ( "category" , NullValueHandling = NullValueHandling . Ignore ) ]
3639 public string Category { get ; set ; }
3740
38- [ JsonProperty ( "style" ) ]
39- public int Style { get ; set ; }
41+ [ JsonProperty ( "style" , NullValueHandling = NullValueHandling . Ignore ) ]
42+ public int ? Style { get ; set ; }
4043
41- [ JsonProperty ( "alert_type" ) ]
42- public int AlertType { get ; set ; }
44+ [ JsonProperty ( "alert_type" , NullValueHandling = NullValueHandling . Ignore ) ]
45+ public int ? AlertType { get ; set ; }
4346
44- [ JsonProperty ( "big_text" ) ]
47+ [ JsonProperty ( "big_text" , NullValueHandling = NullValueHandling . Ignore ) ]
4548 public string BigText { get ; set ; }
4649
47- [ JsonProperty ( "inbox" ) ]
50+ [ JsonProperty ( "inbox" , NullValueHandling = NullValueHandling . Ignore ) ]
4851 public Dictionary < string , object > Inbox { get ; set ; }
4952
50- [ JsonProperty ( "big_pic_path" ) ]
53+ [ JsonProperty ( "big_pic_path" , NullValueHandling = NullValueHandling . Ignore ) ]
5154 public string BigPicturePath { get ; set ; }
5255
53- [ JsonProperty ( "extras" ) ]
56+ [ JsonProperty ( "extras" , NullValueHandling = NullValueHandling . Ignore ) ]
5457 public Dictionary < string , object > Extras { get ; set ; }
5558
5659 // VIP only - start
60+
5761 /// <summary>
5862 /// (VIP only)指定开发者想要打开的 Activity,值为 <activity> 节点的 "android:name" 属性值。
5963 /// </summary>
60- [ JsonProperty ( "url_activity" ) ]
64+ [ JsonProperty ( "url_activity" , NullValueHandling = NullValueHandling . Ignore ) ]
6165 public string URLActivity { get ; set ; }
6266
6367 /// <summary>
6468 /// (VIP only)指定打开 Activity 的方式,值为 Intent.java 中预定义的 "access flags" 的取值范围。
6569 /// </summary>
66- [ JsonProperty ( "url_flag" ) ]
70+ [ JsonProperty ( "url_flag" , NullValueHandling = NullValueHandling . Ignore ) ]
6771 public string URLFlag { get ; set ; }
6872
6973 /// <summary>
7074 /// (VIP only)指定开发者想要打开的 Activity,值为 <activity> -> <intent-filter> -> <action> 节点中的 "android:name" 属性值。
7175 /// </summary>
72- [ JsonProperty ( "uri_action" ) ]
76+ [ JsonProperty ( "uri_action" , NullValueHandling = NullValueHandling . Ignore ) ]
7377 public string URIAction { get ; set ; }
7478
7579 // VIP only - end
@@ -84,22 +88,25 @@ public class IOS
8488 [ JsonProperty ( "alert" ) ]
8589 public object Alert { get ; set ; }
8690
87- [ JsonProperty ( "sound" ) ]
91+ [ JsonProperty ( "sound" , NullValueHandling = NullValueHandling . Ignore ) ]
8892 public string Sound { get ; set ; }
8993
94+ /// <summary>
95+ /// 默认角标 +1。
96+ /// </summary>
9097 [ JsonProperty ( "badge" ) ]
9198 public string Badge { get ; set ; } = "+1" ;
9299
93- [ JsonProperty ( "content-available" ) ]
94- public bool ContentAvailable { get ; set ; }
100+ [ JsonProperty ( "content-available" , NullValueHandling = NullValueHandling . Ignore ) ]
101+ public bool ? ContentAvailable { get ; set ; }
95102
96- [ JsonProperty ( "mutable-content" ) ]
97- public bool MutableContent { get ; set ; }
103+ [ JsonProperty ( "mutable-content" , NullValueHandling = NullValueHandling . Ignore ) ]
104+ public bool ? MutableContent { get ; set ; }
98105
99- [ JsonProperty ( "category" ) ]
106+ [ JsonProperty ( "category" , NullValueHandling = NullValueHandling . Ignore ) ]
100107 public string Category { get ; set ; }
101108
102- [ JsonProperty ( "extras" ) ]
109+ [ JsonProperty ( "extras" , NullValueHandling = NullValueHandling . Ignore ) ]
103110 public Dictionary < string , object > Extras { get ; set ; }
104111 }
105112}
0 commit comments