11package io.appwrite.models
22
3+ import com.google.gson.annotations.SerializedName
4+
35/* *
46 * AttributeFloat
57 */
@@ -8,48 +10,56 @@ data class AttributeFloat(
810 * Attribute Key.
911 *
1012 */
13+ @SerializedName(" key" )
1114 val key : String ,
1215
1316 /* *
1417 * Attribute type.
1518 *
1619 */
20+ @SerializedName(" type" )
1721 val type : String ,
1822
1923 /* *
2024 * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
2125 *
2226 */
27+ @SerializedName(" status" )
2328 val status : String ,
2429
2530 /* *
2631 * Is attribute required?
2732 *
2833 */
34+ @SerializedName(" required" )
2935 val required : Boolean ,
3036
3137 /* *
3238 * Is attribute an array?
3339 *
3440 */
41+ @SerializedName(" array" )
3542 var array : Boolean? ,
3643
3744 /* *
3845 * Minimum value to enforce for new documents.
3946 *
4047 */
48+ @SerializedName(" min" )
4149 var min : Double? ,
4250
4351 /* *
4452 * Maximum value to enforce for new documents.
4553 *
4654 */
55+ @SerializedName(" max" )
4756 var max : Double? ,
4857
4958 /* *
5059 * Default value for attribute when not provided. Cannot be set when attribute is required.
5160 *
5261 */
62+ @SerializedName(" default" )
5363 var default : Double?
5464) {
5565 companion object {
@@ -60,9 +70,9 @@ data class AttributeFloat(
6070 status = map[" status" ] as String ,
6171 required = map[" required" ] as Boolean ,
6272 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()
6676 )
6777 }
6878
0 commit comments