Skip to content

Commit c5e0466

Browse files
committed
update changelog etc
1 parent f6d0bb3 commit c5e0466

27 files changed

Lines changed: 1634 additions & 0 deletions
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
using Appwrite.Enums;
8+
using Appwrite.Extensions;
9+
10+
namespace Appwrite.Models
11+
{
12+
public class AttributeLongtext
13+
{
14+
[JsonPropertyName("key")]
15+
public string Key { get; private set; }
16+
17+
[JsonPropertyName("type")]
18+
public string Type { get; private set; }
19+
20+
[JsonPropertyName("status")]
21+
public AttributeStatus Status { get; private set; }
22+
23+
[JsonPropertyName("error")]
24+
public string Error { get; private set; }
25+
26+
[JsonPropertyName("required")]
27+
public bool Required { get; private set; }
28+
29+
[JsonPropertyName("array")]
30+
public bool? Array { get; private set; }
31+
32+
[JsonPropertyName("$createdAt")]
33+
public string CreatedAt { get; private set; }
34+
35+
[JsonPropertyName("$updatedAt")]
36+
public string UpdatedAt { get; private set; }
37+
38+
[JsonPropertyName("default")]
39+
public string? Default { get; private set; }
40+
41+
public AttributeLongtext(
42+
string key,
43+
string type,
44+
AttributeStatus status,
45+
string error,
46+
bool required,
47+
bool? array,
48+
string createdAt,
49+
string updatedAt,
50+
string? xdefault
51+
) {
52+
Key = key;
53+
Type = type;
54+
Status = status;
55+
Error = error;
56+
Required = required;
57+
Array = array;
58+
CreatedAt = createdAt;
59+
UpdatedAt = updatedAt;
60+
Default = xdefault;
61+
}
62+
63+
public static AttributeLongtext From(Dictionary<string, object> map) => new AttributeLongtext(
64+
key: map["key"].ToString(),
65+
type: map["type"].ToString(),
66+
status: new AttributeStatus(map["status"].ToString()!),
67+
error: map["error"].ToString(),
68+
required: (bool)map["required"],
69+
array: (bool?)map["array"],
70+
createdAt: map["$createdAt"].ToString(),
71+
updatedAt: map["$updatedAt"].ToString(),
72+
xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null
73+
);
74+
75+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
76+
{
77+
{ "key", Key },
78+
{ "type", Type },
79+
{ "status", Status.Value },
80+
{ "error", Error },
81+
{ "required", Required },
82+
{ "array", Array },
83+
{ "$createdAt", CreatedAt },
84+
{ "$updatedAt", UpdatedAt },
85+
{ "default", Default }
86+
};
87+
}
88+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
using Appwrite.Enums;
8+
using Appwrite.Extensions;
9+
10+
namespace Appwrite.Models
11+
{
12+
public class AttributeMediumtext
13+
{
14+
[JsonPropertyName("key")]
15+
public string Key { get; private set; }
16+
17+
[JsonPropertyName("type")]
18+
public string Type { get; private set; }
19+
20+
[JsonPropertyName("status")]
21+
public AttributeStatus Status { get; private set; }
22+
23+
[JsonPropertyName("error")]
24+
public string Error { get; private set; }
25+
26+
[JsonPropertyName("required")]
27+
public bool Required { get; private set; }
28+
29+
[JsonPropertyName("array")]
30+
public bool? Array { get; private set; }
31+
32+
[JsonPropertyName("$createdAt")]
33+
public string CreatedAt { get; private set; }
34+
35+
[JsonPropertyName("$updatedAt")]
36+
public string UpdatedAt { get; private set; }
37+
38+
[JsonPropertyName("default")]
39+
public string? Default { get; private set; }
40+
41+
public AttributeMediumtext(
42+
string key,
43+
string type,
44+
AttributeStatus status,
45+
string error,
46+
bool required,
47+
bool? array,
48+
string createdAt,
49+
string updatedAt,
50+
string? xdefault
51+
) {
52+
Key = key;
53+
Type = type;
54+
Status = status;
55+
Error = error;
56+
Required = required;
57+
Array = array;
58+
CreatedAt = createdAt;
59+
UpdatedAt = updatedAt;
60+
Default = xdefault;
61+
}
62+
63+
public static AttributeMediumtext From(Dictionary<string, object> map) => new AttributeMediumtext(
64+
key: map["key"].ToString(),
65+
type: map["type"].ToString(),
66+
status: new AttributeStatus(map["status"].ToString()!),
67+
error: map["error"].ToString(),
68+
required: (bool)map["required"],
69+
array: (bool?)map["array"],
70+
createdAt: map["$createdAt"].ToString(),
71+
updatedAt: map["$updatedAt"].ToString(),
72+
xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null
73+
);
74+
75+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
76+
{
77+
{ "key", Key },
78+
{ "type", Type },
79+
{ "status", Status.Value },
80+
{ "error", Error },
81+
{ "required", Required },
82+
{ "array", Array },
83+
{ "$createdAt", CreatedAt },
84+
{ "$updatedAt", UpdatedAt },
85+
{ "default", Default }
86+
};
87+
}
88+
}

Appwrite/Models/AttributeText.cs

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
using Appwrite.Enums;
8+
using Appwrite.Extensions;
9+
10+
namespace Appwrite.Models
11+
{
12+
public class AttributeText
13+
{
14+
[JsonPropertyName("key")]
15+
public string Key { get; private set; }
16+
17+
[JsonPropertyName("type")]
18+
public string Type { get; private set; }
19+
20+
[JsonPropertyName("status")]
21+
public AttributeStatus Status { get; private set; }
22+
23+
[JsonPropertyName("error")]
24+
public string Error { get; private set; }
25+
26+
[JsonPropertyName("required")]
27+
public bool Required { get; private set; }
28+
29+
[JsonPropertyName("array")]
30+
public bool? Array { get; private set; }
31+
32+
[JsonPropertyName("$createdAt")]
33+
public string CreatedAt { get; private set; }
34+
35+
[JsonPropertyName("$updatedAt")]
36+
public string UpdatedAt { get; private set; }
37+
38+
[JsonPropertyName("default")]
39+
public string? Default { get; private set; }
40+
41+
public AttributeText(
42+
string key,
43+
string type,
44+
AttributeStatus status,
45+
string error,
46+
bool required,
47+
bool? array,
48+
string createdAt,
49+
string updatedAt,
50+
string? xdefault
51+
) {
52+
Key = key;
53+
Type = type;
54+
Status = status;
55+
Error = error;
56+
Required = required;
57+
Array = array;
58+
CreatedAt = createdAt;
59+
UpdatedAt = updatedAt;
60+
Default = xdefault;
61+
}
62+
63+
public static AttributeText From(Dictionary<string, object> map) => new AttributeText(
64+
key: map["key"].ToString(),
65+
type: map["type"].ToString(),
66+
status: new AttributeStatus(map["status"].ToString()!),
67+
error: map["error"].ToString(),
68+
required: (bool)map["required"],
69+
array: (bool?)map["array"],
70+
createdAt: map["$createdAt"].ToString(),
71+
updatedAt: map["$updatedAt"].ToString(),
72+
xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null
73+
);
74+
75+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
76+
{
77+
{ "key", Key },
78+
{ "type", Type },
79+
{ "status", Status.Value },
80+
{ "error", Error },
81+
{ "required", Required },
82+
{ "array", Array },
83+
{ "$createdAt", CreatedAt },
84+
{ "$updatedAt", UpdatedAt },
85+
{ "default", Default }
86+
};
87+
}
88+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
using Appwrite.Enums;
8+
using Appwrite.Extensions;
9+
10+
namespace Appwrite.Models
11+
{
12+
public class AttributeVarchar
13+
{
14+
[JsonPropertyName("key")]
15+
public string Key { get; private set; }
16+
17+
[JsonPropertyName("type")]
18+
public string Type { get; private set; }
19+
20+
[JsonPropertyName("status")]
21+
public AttributeStatus Status { get; private set; }
22+
23+
[JsonPropertyName("error")]
24+
public string Error { get; private set; }
25+
26+
[JsonPropertyName("required")]
27+
public bool Required { get; private set; }
28+
29+
[JsonPropertyName("array")]
30+
public bool? Array { get; private set; }
31+
32+
[JsonPropertyName("$createdAt")]
33+
public string CreatedAt { get; private set; }
34+
35+
[JsonPropertyName("$updatedAt")]
36+
public string UpdatedAt { get; private set; }
37+
38+
[JsonPropertyName("size")]
39+
public long Size { get; private set; }
40+
41+
[JsonPropertyName("default")]
42+
public string? Default { get; private set; }
43+
44+
public AttributeVarchar(
45+
string key,
46+
string type,
47+
AttributeStatus status,
48+
string error,
49+
bool required,
50+
bool? array,
51+
string createdAt,
52+
string updatedAt,
53+
long size,
54+
string? xdefault
55+
) {
56+
Key = key;
57+
Type = type;
58+
Status = status;
59+
Error = error;
60+
Required = required;
61+
Array = array;
62+
CreatedAt = createdAt;
63+
UpdatedAt = updatedAt;
64+
Size = size;
65+
Default = xdefault;
66+
}
67+
68+
public static AttributeVarchar From(Dictionary<string, object> map) => new AttributeVarchar(
69+
key: map["key"].ToString(),
70+
type: map["type"].ToString(),
71+
status: new AttributeStatus(map["status"].ToString()!),
72+
error: map["error"].ToString(),
73+
required: (bool)map["required"],
74+
array: (bool?)map["array"],
75+
createdAt: map["$createdAt"].ToString(),
76+
updatedAt: map["$updatedAt"].ToString(),
77+
size: Convert.ToInt64(map["size"]),
78+
xdefault: map.TryGetValue("default", out var xdefault) ? xdefault?.ToString() : null
79+
);
80+
81+
public Dictionary<string, object?> ToMap() => new Dictionary<string, object?>()
82+
{
83+
{ "key", Key },
84+
{ "type", Type },
85+
{ "status", Status.Value },
86+
{ "error", Error },
87+
{ "required", Required },
88+
{ "array", Array },
89+
{ "$createdAt", CreatedAt },
90+
{ "$updatedAt", UpdatedAt },
91+
{ "size", Size },
92+
{ "default", Default }
93+
};
94+
}
95+
}

0 commit comments

Comments
 (0)