/
BooleanCondition.purs
118 lines (64 loc) · 3.87 KB
/
BooleanCondition.purs
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
module Control.Google.Apps.Spreadsheet.BooleanCondition (
getBackground,
getBackgroundObject,
getBold,
getCriteriaType,
getCriteriaValues,
getFontColor,
getFontColorObject,
getItalic,
getStrikethrough,
getUnderline
) where
import Prelude (Unit, unit)
import Effect (Effect)
import Foreign (Foreign)
import Data.Google.Apps.Spreadsheet.Color as SpreadsheetColor
import Data.Google.Apps.Spreadsheet.BooleanCriteria as SpreadsheetBooleanCriteria
import Data.Google.Apps.Spreadsheet.BooleanCondition as SpreadsheetBooleanCondition
foreign import getBackgroundImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect String
-- | Gets the background color string for this boolean condition.
getBackground :: SpreadsheetBooleanCondition.BooleanCondition -> Effect String
getBackground p' = getBackgroundImpl p'
foreign import getBackgroundObjectImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect SpreadsheetColor.Color
-- | Gets the background color for this boolean condition.
getBackgroundObject :: SpreadsheetBooleanCondition.BooleanCondition -> Effect SpreadsheetColor.Color
getBackgroundObject p' = getBackgroundObjectImpl p'
foreign import getBoldImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
-- | Returns true if this boolean condition bolds the text and returns false if
-- | this boolean condition removes bolding from the text.
getBold :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
getBold p' = getBoldImpl p'
foreign import getCriteriaTypeImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect SpreadsheetBooleanCriteria.BooleanCriteriaForeign
-- Some type is not directly accessible in the runtime.
-- TODO: Implement this
-- getCriteriaType :: SpreadsheetBooleanCondition.BooleanCondition -> Effect SpreadsheetBooleanCriteria.BooleanCriteria
getCriteriaType :: Unit
getCriteriaType = unit
foreign import getCriteriaValuesImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect (Array Foreign)
-- | Gets an array of arguments for the rule's criteria.
getCriteriaValues :: SpreadsheetBooleanCondition.BooleanCondition -> Effect (Array Foreign)
getCriteriaValues p' = getCriteriaValuesImpl p'
foreign import getFontColorImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect String
-- | Gets the font color string for this boolean condition.
getFontColor :: SpreadsheetBooleanCondition.BooleanCondition -> Effect String
getFontColor p' = getFontColorImpl p'
foreign import getFontColorObjectImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect SpreadsheetColor.Color
-- | Gets the font color for this boolean condition.
getFontColorObject :: SpreadsheetBooleanCondition.BooleanCondition -> Effect SpreadsheetColor.Color
getFontColorObject p' = getFontColorObjectImpl p'
foreign import getItalicImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
-- | Returns true if this boolean condition italicises the text and returns false
-- | if this boolean condition removes italics from the text.
getItalic :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
getItalic p' = getItalicImpl p'
foreign import getStrikethroughImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
-- | Returns true if this boolean condition strikes through the text and returns
-- | false if this boolean condition removes strikethrough from the text.
getStrikethrough :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
getStrikethrough p' = getStrikethroughImpl p'
foreign import getUnderlineImpl :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
-- | Returns true if this boolean condition underlines the text and returns false
-- | if this boolean condition removes underlining from the text.
getUnderline :: SpreadsheetBooleanCondition.BooleanCondition -> Effect Boolean
getUnderline p' = getUnderlineImpl p'