/
UrlField.purs
93 lines (49 loc) · 2.41 KB
/
UrlField.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
module Control.Google.Apps.Contacts.UrlField (
deleteUrlField,
getAddress,
getLabel,
isPrimary,
setAddress,
setAsPrimary,
setLabelWithField,
setLabelWithString
) where
import Prelude (Unit, unit)
import Effect (Effect)
import Foreign (Foreign)
import Data.Google.Apps.Contacts.Field as ContactsField
import Data.Google.Apps.Contacts.UrlField as ContactsUrlField
foreign import deleteUrlFieldImpl :: ContactsUrlField.UrlField -> Effect Unit
-- | Deletes this URL field.
deleteUrlField :: ContactsUrlField.UrlField -> Effect Unit
deleteUrlField p' = deleteUrlFieldImpl p'
foreign import getAddressImpl :: ContactsUrlField.UrlField -> Effect String
-- | Get the address for this field.
getAddress :: ContactsUrlField.UrlField -> Effect String
getAddress p' = getAddressImpl p'
foreign import getLabelImpl :: ContactsUrlField.UrlField -> Effect Foreign
-- | Gets the label for this field.
getLabel :: ContactsUrlField.UrlField -> Effect Foreign
getLabel p' = getLabelImpl p'
foreign import isPrimaryImpl :: ContactsUrlField.UrlField -> Effect Boolean
-- | Gets whether this is the primary field value.
isPrimary :: ContactsUrlField.UrlField -> Effect Boolean
isPrimary p' = isPrimaryImpl p'
foreign import setAddressImpl :: String -> ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
-- | Sets the address of this field.
setAddress :: String -> ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
setAddress address p' = setAddressImpl address p'
foreign import setAsPrimaryImpl :: ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
-- | Sets this field to primary.
setAsPrimary :: ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
setAsPrimary p' = setAsPrimaryImpl p'
foreign import setLabelWithFieldImpl :: ContactsField.FieldForeign -> ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
-- Some type is not directly accessible in the runtime.
-- TODO: Implement this
-- setLabelWithField :: ContactsField.Field -> ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
setLabelWithField :: Unit
setLabelWithField = unit
foreign import setLabelWithStringImpl :: String -> ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
-- | Sets the label of this field.
setLabelWithString :: String -> ContactsUrlField.UrlField -> Effect ContactsUrlField.UrlField
setLabelWithString label p' = setLabelWithStringImpl label p'