1
1
package io.appwrite.models
2
2
3
+ import com.google.gson.annotations.SerializedName
4
+
3
5
/* *
4
6
* AttributeFloat
5
7
*/
@@ -8,48 +10,56 @@ data class AttributeFloat(
8
10
* Attribute Key.
9
11
*
10
12
*/
13
+ @SerializedName(" key" )
11
14
val key : String ,
12
15
13
16
/* *
14
17
* Attribute type.
15
18
*
16
19
*/
20
+ @SerializedName(" type" )
17
21
val type : String ,
18
22
19
23
/* *
20
24
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
21
25
*
22
26
*/
27
+ @SerializedName(" status" )
23
28
val status : String ,
24
29
25
30
/* *
26
31
* Is attribute required?
27
32
*
28
33
*/
34
+ @SerializedName(" required" )
29
35
val required : Boolean ,
30
36
31
37
/* *
32
38
* Is attribute an array?
33
39
*
34
40
*/
41
+ @SerializedName(" array" )
35
42
var array : Boolean? ,
36
43
37
44
/* *
38
45
* Minimum value to enforce for new documents.
39
46
*
40
47
*/
48
+ @SerializedName(" min" )
41
49
var min : Double? ,
42
50
43
51
/* *
44
52
* Maximum value to enforce for new documents.
45
53
*
46
54
*/
55
+ @SerializedName(" max" )
47
56
var max : Double? ,
48
57
49
58
/* *
50
59
* Default value for attribute when not provided. Cannot be set when attribute is required.
51
60
*
52
61
*/
62
+ @SerializedName(" default" )
53
63
var default : Double?
54
64
) {
55
65
companion object {
@@ -60,9 +70,9 @@ data class AttributeFloat(
60
70
status = map[" status" ] as String ,
61
71
required = map[" required" ] as Boolean ,
62
72
array = map[" array" ] as ? Boolean ,
63
- min = (map[" min" ] as Number ).toDouble(),
64
- max = (map[" max" ] as Number ).toDouble(),
65
- default = (map[" default" ] as Number ).toDouble()
73
+ min = (map[" min" ] as ? Number )? .toDouble(),
74
+ max = (map[" max" ] as ? Number )? .toDouble(),
75
+ default = (map[" default" ] as ? Number )? .toDouble()
66
76
)
67
77
}
68
78
0 commit comments