Skip to content

Commit 7c1c0cf

Browse files
committed
fix version
1 parent 664c878 commit 7c1c0cf

15 files changed

+974
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repositories {
3838
Next, add the dependency to your project's `build.gradle(.kts)` file:
3939

4040
```groovy
41-
implementation("io.appwrite:sdk-for-android:0.3.1")
41+
implementation("io.appwrite:sdk-for-android:0.3.0")
4242
```
4343

4444
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
4949
<dependency>
5050
<groupId>io.appwrite</groupId>
5151
<artifactId>sdk-for-android</artifactId>
52-
<version>0.3.1</version>
52+
<version>0.3.0</version>
5353
</dependency>
5454
</dependencies>
5555
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'io.github.gradle-nexus.publish-plugin'
33
// Top-level build file where you can add configuration options common to all sub-projects/modules.
44
buildscript {
55
ext.kotlin_version = "1.5.31"
6-
version "0.3.1"
6+
version "0.3.0"
77
repositories {
88
maven { url "https://plugins.gradle.org/m2/" }
99
google()
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package io.appwrite.models
2+
3+
/**
4+
* AttributeBoolean
5+
*/
6+
data class AttributeBoolean(
7+
/**
8+
* Attribute Key.
9+
*
10+
*/
11+
val key: String,
12+
13+
/**
14+
* Attribute type.
15+
*
16+
*/
17+
val type: String,
18+
19+
/**
20+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
21+
*
22+
*/
23+
val status: String,
24+
25+
/**
26+
* Is attribute required?
27+
*
28+
*/
29+
val required: Boolean,
30+
31+
/**
32+
* Is attribute an array?
33+
*
34+
*/
35+
var array: Boolean? = ,
36+
37+
/**
38+
* Default value for attribute when not provided. Cannot be set when attribute is required.
39+
*
40+
*/
41+
var default: Boolean? =
42+
) {
43+
companion object {
44+
@Suppress("UNCHECKED_CAST")
45+
fun from(map: Map<String, Any>) = AttributeBoolean(
46+
key = map["key"] as String,
47+
type = map["type"] as String,
48+
status = map["status"] as String,
49+
required = map["required"] as Boolean,
50+
array = map["array"] as? Boolean,
51+
default = map["default"] as? Boolean
52+
)
53+
}
54+
55+
fun toMap(): Map<String, Any> = mapOf(
56+
"key" to key as Any,
57+
"type" to type as Any,
58+
"status" to status as Any,
59+
"required" to required as Any,
60+
"array" to array as Any,
61+
"default" to default as Any
62+
)
63+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package io.appwrite.models
2+
3+
/**
4+
* AttributeEmail
5+
*/
6+
data class AttributeEmail(
7+
/**
8+
* Attribute Key.
9+
*
10+
*/
11+
val key: String,
12+
13+
/**
14+
* Attribute type.
15+
*
16+
*/
17+
val type: String,
18+
19+
/**
20+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
21+
*
22+
*/
23+
val status: String,
24+
25+
/**
26+
* Is attribute required?
27+
*
28+
*/
29+
val required: Boolean,
30+
31+
/**
32+
* Is attribute an array?
33+
*
34+
*/
35+
var array: Boolean? = ,
36+
37+
/**
38+
* String format.
39+
*
40+
*/
41+
val format: String,
42+
43+
/**
44+
* Default value for attribute when not provided. Cannot be set when attribute is required.
45+
*
46+
*/
47+
var default: String? =
48+
) {
49+
companion object {
50+
@Suppress("UNCHECKED_CAST")
51+
fun from(map: Map<String, Any>) = AttributeEmail(
52+
key = map["key"] as String,
53+
type = map["type"] as String,
54+
status = map["status"] as String,
55+
required = map["required"] as Boolean,
56+
array = map["array"] as? Boolean,
57+
format = map["format"] as String,
58+
default = map["default"] as? String
59+
)
60+
}
61+
62+
fun toMap(): Map<String, Any> = mapOf(
63+
"key" to key as Any,
64+
"type" to type as Any,
65+
"status" to status as Any,
66+
"required" to required as Any,
67+
"array" to array as Any,
68+
"format" to format as Any,
69+
"default" to default as Any
70+
)
71+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package io.appwrite.models
2+
3+
/**
4+
* AttributeEnum
5+
*/
6+
data class AttributeEnum(
7+
/**
8+
* Attribute Key.
9+
*
10+
*/
11+
val key: String,
12+
13+
/**
14+
* Attribute type.
15+
*
16+
*/
17+
val type: String,
18+
19+
/**
20+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
21+
*
22+
*/
23+
val status: String,
24+
25+
/**
26+
* Is attribute required?
27+
*
28+
*/
29+
val required: Boolean,
30+
31+
/**
32+
* Is attribute an array?
33+
*
34+
*/
35+
var array: Boolean? = ,
36+
37+
/**
38+
* Array of elements in enumerated type.
39+
*
40+
*/
41+
val elements: List<Any>,
42+
43+
/**
44+
* String format.
45+
*
46+
*/
47+
val format: String,
48+
49+
/**
50+
* Default value for attribute when not provided. Cannot be set when attribute is required.
51+
*
52+
*/
53+
var default: String? =
54+
) {
55+
companion object {
56+
@Suppress("UNCHECKED_CAST")
57+
fun from(map: Map<String, Any>) = AttributeEnum(
58+
key = map["key"] as String,
59+
type = map["type"] as String,
60+
status = map["status"] as String,
61+
required = map["required"] as Boolean,
62+
array = map["array"] as? Boolean,
63+
elements = map["elements"] as List<Any>,
64+
format = map["format"] as String,
65+
default = map["default"] as? String
66+
)
67+
}
68+
69+
fun toMap(): Map<String, Any> = mapOf(
70+
"key" to key as Any,
71+
"type" to type as Any,
72+
"status" to status as Any,
73+
"required" to required as Any,
74+
"array" to array as Any,
75+
"elements" to elements as Any,
76+
"format" to format as Any,
77+
"default" to default as Any
78+
)
79+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package io.appwrite.models
2+
3+
/**
4+
* AttributeFloat
5+
*/
6+
data class AttributeFloat(
7+
/**
8+
* Attribute Key.
9+
*
10+
*/
11+
val key: String,
12+
13+
/**
14+
* Attribute type.
15+
*
16+
*/
17+
val type: String,
18+
19+
/**
20+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
21+
*
22+
*/
23+
val status: String,
24+
25+
/**
26+
* Is attribute required?
27+
*
28+
*/
29+
val required: Boolean,
30+
31+
/**
32+
* Is attribute an array?
33+
*
34+
*/
35+
var array: Boolean? = ,
36+
37+
/**
38+
* Minimum value to enforce for new documents.
39+
*
40+
*/
41+
var min: Double? = ,
42+
43+
/**
44+
* Maximum value to enforce for new documents.
45+
*
46+
*/
47+
var max: Double? = ,
48+
49+
/**
50+
* Default value for attribute when not provided. Cannot be set when attribute is required.
51+
*
52+
*/
53+
var default: Double? =
54+
) {
55+
companion object {
56+
@Suppress("UNCHECKED_CAST")
57+
fun from(map: Map<String, Any>) = AttributeFloat(
58+
key = map["key"] as String,
59+
type = map["type"] as String,
60+
status = map["status"] as String,
61+
required = map["required"] as Boolean,
62+
array = map["array"] as? Boolean,
63+
min = map["min"] as? Double,
64+
max = map["max"] as? Double,
65+
default = map["default"] as? Double
66+
)
67+
}
68+
69+
fun toMap(): Map<String, Any> = mapOf(
70+
"key" to key as Any,
71+
"type" to type as Any,
72+
"status" to status as Any,
73+
"required" to required as Any,
74+
"array" to array as Any,
75+
"min" to min as Any,
76+
"max" to max as Any,
77+
"default" to default as Any
78+
)
79+
}

0 commit comments

Comments
 (0)