File tree 1 file changed +53
-0
lines changed
Src/Notion.Client/Models/Filters
1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ using Newtonsoft . Json ;
2
+
3
+ namespace Notion . Client
4
+ {
5
+ public class StatusFilter : SinglePropertyFilter , IRollupSubPropertyFilter
6
+ {
7
+ [ JsonProperty ( "status" ) ]
8
+ public Condition Status { get ; set ; }
9
+
10
+ public StatusFilter (
11
+ string propertyName ,
12
+ string equal = null ,
13
+ string doesNotEqual = null ,
14
+ bool ? isEmpty = null ,
15
+ bool ? isNotEmpty = null )
16
+ {
17
+ Property = propertyName ;
18
+ Status = new Condition (
19
+ equal : equal ,
20
+ doesNotEqual : doesNotEqual ,
21
+ isEmpty : isEmpty ,
22
+ isNotEmpty : isNotEmpty
23
+ ) ;
24
+ }
25
+
26
+ public class Condition
27
+ {
28
+ [ JsonProperty ( "equals" ) ]
29
+ public string Equal { get ; set ; }
30
+
31
+ [ JsonProperty ( "does_not_equal" ) ]
32
+ public string DoesNotEqual { get ; set ; }
33
+
34
+ [ JsonProperty ( "is_empty" ) ]
35
+ public bool ? IsEmpty { get ; set ; }
36
+
37
+ [ JsonProperty ( "is_not_empty" ) ]
38
+ public bool ? IsNotEmpty { get ; set ; }
39
+
40
+ public Condition (
41
+ string equal = null ,
42
+ string doesNotEqual = null ,
43
+ bool ? isEmpty = null ,
44
+ bool ? isNotEmpty = null )
45
+ {
46
+ Equal = equal ;
47
+ DoesNotEqual = doesNotEqual ;
48
+ IsEmpty = isEmpty ;
49
+ IsNotEmpty = isNotEmpty ;
50
+ }
51
+ }
52
+ }
53
+ }
You can’t perform that action at this time.
0 commit comments