diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 8767c005..111cb3d4 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up .NET
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
+ uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: '6'
diff --git a/Appwrite/Appwrite.csproj b/Appwrite/Appwrite.csproj
index 51965b44..54772716 100644
--- a/Appwrite/Appwrite.csproj
+++ b/Appwrite/Appwrite.csproj
@@ -2,7 +2,7 @@
netstandard2.0;net462
Appwrite
- 6.0.0
+ 6.1.0
Appwrite Team
Appwrite Team
@@ -20,7 +20,7 @@
-
+
diff --git a/Appwrite/Client.cs b/Appwrite/Client.cs
index 9b456828..4754333e 100644
--- a/Appwrite/Client.cs
+++ b/Appwrite/Client.cs
@@ -76,11 +76,11 @@ public Client(
_headers = new Dictionary()
{
{ "content-type", "application/json" },
- { "user-agent" , $"AppwriteDotNetSDK/6.0.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
+ { "user-agent" , $"AppwriteDotNetSDK/6.1.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
{ "x-sdk-name", ".NET" },
{ "x-sdk-platform", "server" },
{ "x-sdk-language", "dotnet" },
- { "x-sdk-version", "6.0.0"},
+ { "x-sdk-version", "6.1.0"},
{ "X-Appwrite-Response-Format", "1.9.5" }
};
diff --git a/Appwrite/Enums/DatabaseStatus.cs b/Appwrite/Enums/DatabaseStatus.cs
index cd8892d2..dc8860a1 100644
--- a/Appwrite/Enums/DatabaseStatus.cs
+++ b/Appwrite/Enums/DatabaseStatus.cs
@@ -13,6 +13,17 @@ public DatabaseStatus(string value)
public static DatabaseStatus Provisioning => new DatabaseStatus("provisioning");
public static DatabaseStatus Ready => new DatabaseStatus("ready");
+ public static DatabaseStatus Inactive => new DatabaseStatus("inactive");
+ public static DatabaseStatus Paused => new DatabaseStatus("paused");
public static DatabaseStatus Failed => new DatabaseStatus("failed");
+ public static DatabaseStatus Deleting => new DatabaseStatus("deleting");
+ public static DatabaseStatus Deleted => new DatabaseStatus("deleted");
+ public static DatabaseStatus Restoring => new DatabaseStatus("restoring");
+ public static DatabaseStatus Scaling => new DatabaseStatus("scaling");
+ public static DatabaseStatus Upgrading => new DatabaseStatus("upgrading");
+ public static DatabaseStatus Migrating => new DatabaseStatus("migrating");
+ public static DatabaseStatus Pausing => new DatabaseStatus("pausing");
+ public static DatabaseStatus Resuming => new DatabaseStatus("resuming");
+ public static DatabaseStatus FailingOver => new DatabaseStatus("failing-over");
}
}
diff --git a/Appwrite/Enums/DatabaseType.cs b/Appwrite/Enums/DatabaseType.cs
index 11b4916b..5a559464 100644
--- a/Appwrite/Enums/DatabaseType.cs
+++ b/Appwrite/Enums/DatabaseType.cs
@@ -15,5 +15,8 @@ public DatabaseType(string value)
public static DatabaseType Tablesdb => new DatabaseType("tablesdb");
public static DatabaseType Documentsdb => new DatabaseType("documentsdb");
public static DatabaseType Vectorsdb => new DatabaseType("vectorsdb");
+ public static DatabaseType Mysql => new DatabaseType("mysql");
+ public static DatabaseType Postgresql => new DatabaseType("postgresql");
+ public static DatabaseType Mongodb => new DatabaseType("mongodb");
}
}
diff --git a/Appwrite/Enums/OrganizationKeyScopes.cs b/Appwrite/Enums/OrganizationKeyScopes.cs
index 8802f0fa..8e848a17 100644
--- a/Appwrite/Enums/OrganizationKeyScopes.cs
+++ b/Appwrite/Enums/OrganizationKeyScopes.cs
@@ -17,6 +17,8 @@ public OrganizationKeyScopes(string value)
public static OrganizationKeyScopes DevKeysWrite => new OrganizationKeyScopes("devKeys.write");
public static OrganizationKeyScopes OrganizationKeysRead => new OrganizationKeyScopes("organization.keys.read");
public static OrganizationKeyScopes OrganizationKeysWrite => new OrganizationKeyScopes("organization.keys.write");
+ public static OrganizationKeyScopes OrganizationInstallationsRead => new OrganizationKeyScopes("organization.installations.read");
+ public static OrganizationKeyScopes OrganizationInstallationsWrite => new OrganizationKeyScopes("organization.installations.write");
public static OrganizationKeyScopes OrganizationMembershipsRead => new OrganizationKeyScopes("organization.memberships.read");
public static OrganizationKeyScopes OrganizationMembershipsWrite => new OrganizationKeyScopes("organization.memberships.write");
public static OrganizationKeyScopes OrganizationRead => new OrganizationKeyScopes("organization.read");
diff --git a/Appwrite/Enums/ProjectKeyScopes.cs b/Appwrite/Enums/ProjectKeyScopes.cs
index 9ccbd816..e728151f 100644
--- a/Appwrite/Enums/ProjectKeyScopes.cs
+++ b/Appwrite/Enums/ProjectKeyScopes.cs
@@ -106,11 +106,14 @@ public ProjectKeyScopes(string value)
public static ProjectKeyScopes DedicatedDatabasesExecute => new ProjectKeyScopes("dedicatedDatabases.execute");
public static ProjectKeyScopes DomainsRead => new ProjectKeyScopes("domains.read");
public static ProjectKeyScopes DomainsWrite => new ProjectKeyScopes("domains.write");
+ public static ProjectKeyScopes WafRulesRead => new ProjectKeyScopes("wafRules.read");
+ public static ProjectKeyScopes WafRulesWrite => new ProjectKeyScopes("wafRules.write");
public static ProjectKeyScopes EventsRead => new ProjectKeyScopes("events.read");
public static ProjectKeyScopes AppsRead => new ProjectKeyScopes("apps.read");
public static ProjectKeyScopes AppsWrite => new ProjectKeyScopes("apps.write");
public static ProjectKeyScopes Oauth2Read => new ProjectKeyScopes("oauth2.read");
public static ProjectKeyScopes Oauth2Write => new ProjectKeyScopes("oauth2.write");
+ public static ProjectKeyScopes Oauth2Introspect => new ProjectKeyScopes("oauth2.introspect");
public static ProjectKeyScopes UsageRead => new ProjectKeyScopes("usage.read");
}
}
diff --git a/Appwrite/Models/ActivityEvent.cs b/Appwrite/Models/ActivityEvent.cs
index e0864a01..04af514f 100644
--- a/Appwrite/Models/ActivityEvent.cs
+++ b/Appwrite/Models/ActivityEvent.cs
@@ -53,6 +53,33 @@ public class ActivityEvent
[JsonPropertyName("country")]
public string Country { get; private set; }
+ [JsonPropertyName("continentCode")]
+ public string ContinentCode { get; private set; }
+
+ [JsonPropertyName("city")]
+ public string City { get; private set; }
+
+ [JsonPropertyName("subdivisions")]
+ public string Subdivisions { get; private set; }
+
+ [JsonPropertyName("isp")]
+ public string Isp { get; private set; }
+
+ [JsonPropertyName("autonomousSystemNumber")]
+ public string AutonomousSystemNumber { get; private set; }
+
+ [JsonPropertyName("autonomousSystemOrganization")]
+ public string AutonomousSystemOrganization { get; private set; }
+
+ [JsonPropertyName("connectionType")]
+ public string ConnectionType { get; private set; }
+
+ [JsonPropertyName("connectionUsageType")]
+ public string ConnectionUsageType { get; private set; }
+
+ [JsonPropertyName("connectionOrganization")]
+ public string ConnectionOrganization { get; private set; }
+
[JsonPropertyName("time")]
public string Time { get; private set; }
@@ -65,6 +92,12 @@ public class ActivityEvent
[JsonPropertyName("hostname")]
public string Hostname { get; private set; }
+ [JsonPropertyName("sdk")]
+ public string Sdk { get; private set; }
+
+ [JsonPropertyName("sdkVersion")]
+ public string SdkVersion { get; private set; }
+
public ActivityEvent(
string id,
string actorType,
@@ -80,10 +113,21 @@ public ActivityEvent(
string ip,
string mode,
string country,
+ string continentCode,
+ string city,
+ string subdivisions,
+ string isp,
+ string autonomousSystemNumber,
+ string autonomousSystemOrganization,
+ string connectionType,
+ string connectionUsageType,
+ string connectionOrganization,
string time,
string projectId,
string teamId,
- string hostname
+ string hostname,
+ string sdk,
+ string sdkVersion
)
{
Id = id;
@@ -100,10 +144,21 @@ string hostname
Ip = ip;
Mode = mode;
Country = country;
+ ContinentCode = continentCode;
+ City = city;
+ Subdivisions = subdivisions;
+ Isp = isp;
+ AutonomousSystemNumber = autonomousSystemNumber;
+ AutonomousSystemOrganization = autonomousSystemOrganization;
+ ConnectionType = connectionType;
+ ConnectionUsageType = connectionUsageType;
+ ConnectionOrganization = connectionOrganization;
Time = time;
ProjectId = projectId;
TeamId = teamId;
Hostname = hostname;
+ Sdk = sdk;
+ SdkVersion = sdkVersion;
}
public static ActivityEvent From(Dictionary map) => new ActivityEvent(
@@ -121,10 +176,21 @@ string hostname
ip: map["ip"].ToString(),
mode: map["mode"].ToString(),
country: map["country"].ToString(),
+ continentCode: map["continentCode"].ToString(),
+ city: map["city"].ToString(),
+ subdivisions: map["subdivisions"].ToString(),
+ isp: map["isp"].ToString(),
+ autonomousSystemNumber: map["autonomousSystemNumber"].ToString(),
+ autonomousSystemOrganization: map["autonomousSystemOrganization"].ToString(),
+ connectionType: map["connectionType"].ToString(),
+ connectionUsageType: map["connectionUsageType"].ToString(),
+ connectionOrganization: map["connectionOrganization"].ToString(),
time: map["time"].ToString(),
projectId: map["projectId"].ToString(),
teamId: map["teamId"].ToString(),
- hostname: map["hostname"].ToString()
+ hostname: map["hostname"].ToString(),
+ sdk: map["sdk"].ToString(),
+ sdkVersion: map["sdkVersion"].ToString()
);
public Dictionary ToMap() => new Dictionary()
@@ -143,10 +209,21 @@ string hostname
{ "ip", Ip },
{ "mode", Mode },
{ "country", Country },
+ { "continentCode", ContinentCode },
+ { "city", City },
+ { "subdivisions", Subdivisions },
+ { "isp", Isp },
+ { "autonomousSystemNumber", AutonomousSystemNumber },
+ { "autonomousSystemOrganization", AutonomousSystemOrganization },
+ { "connectionType", ConnectionType },
+ { "connectionUsageType", ConnectionUsageType },
+ { "connectionOrganization", ConnectionOrganization },
{ "time", Time },
{ "projectId", ProjectId },
{ "teamId", TeamId },
- { "hostname", Hostname }
+ { "hostname", Hostname },
+ { "sdk", Sdk },
+ { "sdkVersion", SdkVersion }
};
}
}
diff --git a/Appwrite/Models/App.cs b/Appwrite/Models/App.cs
new file mode 100644
index 00000000..866d9629
--- /dev/null
+++ b/Appwrite/Models/App.cs
@@ -0,0 +1,208 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class App
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("name")]
+ public string Name { get; private set; }
+
+ [JsonPropertyName("description")]
+ public string Description { get; private set; }
+
+ [JsonPropertyName("clientUri")]
+ public string ClientUri { get; private set; }
+
+ [JsonPropertyName("logoUri")]
+ public string LogoUri { get; private set; }
+
+ [JsonPropertyName("privacyPolicyUrl")]
+ public string PrivacyPolicyUrl { get; private set; }
+
+ [JsonPropertyName("termsUrl")]
+ public string TermsUrl { get; private set; }
+
+ [JsonPropertyName("contacts")]
+ public List Contacts { get; private set; }
+
+ [JsonPropertyName("tagline")]
+ public string Tagline { get; private set; }
+
+ [JsonPropertyName("tags")]
+ public List Tags { get; private set; }
+
+ [JsonPropertyName("labels")]
+ public List Labels { get; private set; }
+
+ [JsonPropertyName("images")]
+ public List Images { get; private set; }
+
+ [JsonPropertyName("supportUrl")]
+ public string SupportUrl { get; private set; }
+
+ [JsonPropertyName("dataDeletionUrl")]
+ public string DataDeletionUrl { get; private set; }
+
+ [JsonPropertyName("redirectUris")]
+ public List RedirectUris { get; private set; }
+
+ [JsonPropertyName("postLogoutRedirectUris")]
+ public List PostLogoutRedirectUris { get; private set; }
+
+ [JsonPropertyName("enabled")]
+ public bool Enabled { get; private set; }
+
+ [JsonPropertyName("type")]
+ public string Type { get; private set; }
+
+ [JsonPropertyName("deviceFlow")]
+ public bool DeviceFlow { get; private set; }
+
+ [JsonPropertyName("teamId")]
+ public string TeamId { get; private set; }
+
+ [JsonPropertyName("userId")]
+ public string UserId { get; private set; }
+
+ [JsonPropertyName("installationScopes")]
+ public List InstallationScopes { get; private set; }
+
+ [JsonPropertyName("installationRedirectUrl")]
+ public string InstallationRedirectUrl { get; private set; }
+
+ [JsonPropertyName("secrets")]
+ public List Secrets { get; private set; }
+
+ public App(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string name,
+ string description,
+ string clientUri,
+ string logoUri,
+ string privacyPolicyUrl,
+ string termsUrl,
+ List contacts,
+ string tagline,
+ List tags,
+ List labels,
+ List images,
+ string supportUrl,
+ string dataDeletionUrl,
+ List redirectUris,
+ List postLogoutRedirectUris,
+ bool enabled,
+ string type,
+ bool deviceFlow,
+ string teamId,
+ string userId,
+ List installationScopes,
+ string installationRedirectUrl,
+ List secrets
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ Name = name;
+ Description = description;
+ ClientUri = clientUri;
+ LogoUri = logoUri;
+ PrivacyPolicyUrl = privacyPolicyUrl;
+ TermsUrl = termsUrl;
+ Contacts = contacts;
+ Tagline = tagline;
+ Tags = tags;
+ Labels = labels;
+ Images = images;
+ SupportUrl = supportUrl;
+ DataDeletionUrl = dataDeletionUrl;
+ RedirectUris = redirectUris;
+ PostLogoutRedirectUris = postLogoutRedirectUris;
+ Enabled = enabled;
+ Type = type;
+ DeviceFlow = deviceFlow;
+ TeamId = teamId;
+ UserId = userId;
+ InstallationScopes = installationScopes;
+ InstallationRedirectUrl = installationRedirectUrl;
+ Secrets = secrets;
+ }
+
+ public static App From(Dictionary map) => new App(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ name: map["name"].ToString(),
+ description: map["description"].ToString(),
+ clientUri: map["clientUri"].ToString(),
+ logoUri: map["logoUri"].ToString(),
+ privacyPolicyUrl: map["privacyPolicyUrl"].ToString(),
+ termsUrl: map["termsUrl"].ToString(),
+ contacts: map["contacts"].ConvertToList(),
+ tagline: map["tagline"].ToString(),
+ tags: map["tags"].ConvertToList(),
+ labels: map["labels"].ConvertToList(),
+ images: map["images"].ConvertToList(),
+ supportUrl: map["supportUrl"].ToString(),
+ dataDeletionUrl: map["dataDeletionUrl"].ToString(),
+ redirectUris: map["redirectUris"].ConvertToList(),
+ postLogoutRedirectUris: map["postLogoutRedirectUris"].ConvertToList(),
+ enabled: (bool)map["enabled"],
+ type: map["type"].ToString(),
+ deviceFlow: (bool)map["deviceFlow"],
+ teamId: map["teamId"].ToString(),
+ userId: map["userId"].ToString(),
+ installationScopes: map["installationScopes"].ConvertToList(),
+ installationRedirectUrl: map["installationRedirectUrl"].ToString(),
+ secrets: map["secrets"].ConvertToList>().Select(it => Appwrite.Models.AppSecret.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "name", Name },
+ { "description", Description },
+ { "clientUri", ClientUri },
+ { "logoUri", LogoUri },
+ { "privacyPolicyUrl", PrivacyPolicyUrl },
+ { "termsUrl", TermsUrl },
+ { "contacts", Contacts },
+ { "tagline", Tagline },
+ { "tags", Tags },
+ { "labels", Labels },
+ { "images", Images },
+ { "supportUrl", SupportUrl },
+ { "dataDeletionUrl", DataDeletionUrl },
+ { "redirectUris", RedirectUris },
+ { "postLogoutRedirectUris", PostLogoutRedirectUris },
+ { "enabled", Enabled },
+ { "type", Type },
+ { "deviceFlow", DeviceFlow },
+ { "teamId", TeamId },
+ { "userId", UserId },
+ { "installationScopes", InstallationScopes },
+ { "installationRedirectUrl", InstallationRedirectUrl },
+ { "secrets", Secrets?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppInstallation.cs b/Appwrite/Models/AppInstallation.cs
new file mode 100644
index 00000000..3e80b8dd
--- /dev/null
+++ b/Appwrite/Models/AppInstallation.cs
@@ -0,0 +1,96 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppInstallation
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("appId")]
+ public string AppId { get; private set; }
+
+ [JsonPropertyName("teamId")]
+ public string TeamId { get; private set; }
+
+ [JsonPropertyName("scopes")]
+ public List Scopes { get; private set; }
+
+ [JsonPropertyName("authorizationDetails")]
+ public object AuthorizationDetails { get; private set; }
+
+ [JsonPropertyName("createdById")]
+ public string CreatedById { get; private set; }
+
+ [JsonPropertyName("createdByName")]
+ public string CreatedByName { get; private set; }
+
+ [JsonPropertyName("lastAccessedAt")]
+ public string? LastAccessedAt { get; private set; }
+
+ public AppInstallation(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string appId,
+ string teamId,
+ List scopes,
+ object authorizationDetails,
+ string createdById,
+ string createdByName,
+ string? lastAccessedAt
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ AppId = appId;
+ TeamId = teamId;
+ Scopes = scopes;
+ AuthorizationDetails = authorizationDetails;
+ CreatedById = createdById;
+ CreatedByName = createdByName;
+ LastAccessedAt = lastAccessedAt;
+ }
+
+ public static AppInstallation From(Dictionary map) => new AppInstallation(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ appId: map["appId"].ToString(),
+ teamId: map["teamId"].ToString(),
+ scopes: map["scopes"].ConvertToList(),
+ authorizationDetails: map["authorizationDetails"],
+ createdById: map["createdById"].ToString(),
+ createdByName: map["createdByName"].ToString(),
+ lastAccessedAt: map.TryGetValue("lastAccessedAt", out var lastAccessedAt) ? lastAccessedAt?.ToString() : null
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "appId", AppId },
+ { "teamId", TeamId },
+ { "scopes", Scopes },
+ { "authorizationDetails", AuthorizationDetails },
+ { "createdById", CreatedById },
+ { "createdByName", CreatedByName },
+ { "lastAccessedAt", LastAccessedAt }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppInstallationList.cs b/Appwrite/Models/AppInstallationList.cs
new file mode 100644
index 00000000..a5c8b4a0
--- /dev/null
+++ b/Appwrite/Models/AppInstallationList.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppInstallationList
+ {
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("installations")]
+ public List Installations { get; private set; }
+
+ public AppInstallationList(
+ long total,
+ List installations
+ )
+ {
+ Total = total;
+ Installations = installations;
+ }
+
+ public static AppInstallationList From(Dictionary map) => new AppInstallationList(
+ total: Convert.ToInt64(map["total"]),
+ installations: map["installations"].ConvertToList>().Select(it => Appwrite.Models.AppInstallation.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "total", Total },
+ { "installations", Installations?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppKey.cs b/Appwrite/Models/AppKey.cs
new file mode 100644
index 00000000..ba98c012
--- /dev/null
+++ b/Appwrite/Models/AppKey.cs
@@ -0,0 +1,89 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppKey
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("appId")]
+ public string AppId { get; private set; }
+
+ [JsonPropertyName("secret")]
+ public string Secret { get; private set; }
+
+ [JsonPropertyName("hint")]
+ public string Hint { get; private set; }
+
+ [JsonPropertyName("createdById")]
+ public string CreatedById { get; private set; }
+
+ [JsonPropertyName("createdByName")]
+ public string CreatedByName { get; private set; }
+
+ [JsonPropertyName("lastAccessedAt")]
+ public string? LastAccessedAt { get; private set; }
+
+ public AppKey(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string appId,
+ string secret,
+ string hint,
+ string createdById,
+ string createdByName,
+ string? lastAccessedAt
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ AppId = appId;
+ Secret = secret;
+ Hint = hint;
+ CreatedById = createdById;
+ CreatedByName = createdByName;
+ LastAccessedAt = lastAccessedAt;
+ }
+
+ public static AppKey From(Dictionary map) => new AppKey(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ appId: map["appId"].ToString(),
+ secret: map["secret"].ToString(),
+ hint: map["hint"].ToString(),
+ createdById: map["createdById"].ToString(),
+ createdByName: map["createdByName"].ToString(),
+ lastAccessedAt: map.TryGetValue("lastAccessedAt", out var lastAccessedAt) ? lastAccessedAt?.ToString() : null
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "appId", AppId },
+ { "secret", Secret },
+ { "hint", Hint },
+ { "createdById", CreatedById },
+ { "createdByName", CreatedByName },
+ { "lastAccessedAt", LastAccessedAt }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppKeyList.cs b/Appwrite/Models/AppKeyList.cs
new file mode 100644
index 00000000..ea0a40b2
--- /dev/null
+++ b/Appwrite/Models/AppKeyList.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppKeyList
+ {
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("keys")]
+ public List Keys { get; private set; }
+
+ public AppKeyList(
+ long total,
+ List keys
+ )
+ {
+ Total = total;
+ Keys = keys;
+ }
+
+ public static AppKeyList From(Dictionary map) => new AppKeyList(
+ total: Convert.ToInt64(map["total"]),
+ keys: map["keys"].ConvertToList>().Select(it => Appwrite.Models.AppKey.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "total", Total },
+ { "keys", Keys?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppScope.cs b/Appwrite/Models/AppScope.cs
new file mode 100644
index 00000000..8426fc01
--- /dev/null
+++ b/Appwrite/Models/AppScope.cs
@@ -0,0 +1,61 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppScope
+ {
+ [JsonPropertyName("value")]
+ public string Value { get; private set; }
+
+ [JsonPropertyName("description")]
+ public string Description { get; private set; }
+
+ [JsonPropertyName("type")]
+ public string Type { get; private set; }
+
+ [JsonPropertyName("category")]
+ public string Category { get; private set; }
+
+ [JsonPropertyName("deprecated")]
+ public bool Deprecated { get; private set; }
+
+ public AppScope(
+ string @value,
+ string description,
+ string type,
+ string category,
+ bool deprecated
+ )
+ {
+ Value = @value;
+ Description = description;
+ Type = type;
+ Category = category;
+ Deprecated = deprecated;
+ }
+
+ public static AppScope From(Dictionary map) => new AppScope(
+ @value: map["value"].ToString(),
+ description: map["description"].ToString(),
+ type: map["type"].ToString(),
+ category: map["category"].ToString(),
+ deprecated: (bool)map["deprecated"]
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "value", Value },
+ { "description", Description },
+ { "type", Type },
+ { "category", Category },
+ { "deprecated", Deprecated }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppScopeList.cs b/Appwrite/Models/AppScopeList.cs
new file mode 100644
index 00000000..f284b002
--- /dev/null
+++ b/Appwrite/Models/AppScopeList.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppScopeList
+ {
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("scopes")]
+ public List Scopes { get; private set; }
+
+ public AppScopeList(
+ long total,
+ List scopes
+ )
+ {
+ Total = total;
+ Scopes = scopes;
+ }
+
+ public static AppScopeList From(Dictionary map) => new AppScopeList(
+ total: Convert.ToInt64(map["total"]),
+ scopes: map["scopes"].ConvertToList>().Select(it => Appwrite.Models.AppScope.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "total", Total },
+ { "scopes", Scopes?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppSecret.cs b/Appwrite/Models/AppSecret.cs
new file mode 100644
index 00000000..3c7f9156
--- /dev/null
+++ b/Appwrite/Models/AppSecret.cs
@@ -0,0 +1,89 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppSecret
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("appId")]
+ public string AppId { get; private set; }
+
+ [JsonPropertyName("secret")]
+ public string Secret { get; private set; }
+
+ [JsonPropertyName("hint")]
+ public string Hint { get; private set; }
+
+ [JsonPropertyName("createdById")]
+ public string CreatedById { get; private set; }
+
+ [JsonPropertyName("createdByName")]
+ public string CreatedByName { get; private set; }
+
+ [JsonPropertyName("lastAccessedAt")]
+ public string? LastAccessedAt { get; private set; }
+
+ public AppSecret(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string appId,
+ string secret,
+ string hint,
+ string createdById,
+ string createdByName,
+ string? lastAccessedAt
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ AppId = appId;
+ Secret = secret;
+ Hint = hint;
+ CreatedById = createdById;
+ CreatedByName = createdByName;
+ LastAccessedAt = lastAccessedAt;
+ }
+
+ public static AppSecret From(Dictionary map) => new AppSecret(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ appId: map["appId"].ToString(),
+ secret: map["secret"].ToString(),
+ hint: map["hint"].ToString(),
+ createdById: map["createdById"].ToString(),
+ createdByName: map["createdByName"].ToString(),
+ lastAccessedAt: map.TryGetValue("lastAccessedAt", out var lastAccessedAt) ? lastAccessedAt?.ToString() : null
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "appId", AppId },
+ { "secret", Secret },
+ { "hint", Hint },
+ { "createdById", CreatedById },
+ { "createdByName", CreatedByName },
+ { "lastAccessedAt", LastAccessedAt }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppSecretList.cs b/Appwrite/Models/AppSecretList.cs
new file mode 100644
index 00000000..9730bfae
--- /dev/null
+++ b/Appwrite/Models/AppSecretList.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppSecretList
+ {
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("secrets")]
+ public List Secrets { get; private set; }
+
+ public AppSecretList(
+ long total,
+ List secrets
+ )
+ {
+ Total = total;
+ Secrets = secrets;
+ }
+
+ public static AppSecretList From(Dictionary map) => new AppSecretList(
+ total: Convert.ToInt64(map["total"]),
+ secrets: map["secrets"].ConvertToList>().Select(it => Appwrite.Models.AppSecret.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "total", Total },
+ { "secrets", Secrets?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppSecretPlaintext.cs b/Appwrite/Models/AppSecretPlaintext.cs
new file mode 100644
index 00000000..0fe131b7
--- /dev/null
+++ b/Appwrite/Models/AppSecretPlaintext.cs
@@ -0,0 +1,89 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppSecretPlaintext
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("appId")]
+ public string AppId { get; private set; }
+
+ [JsonPropertyName("secret")]
+ public string Secret { get; private set; }
+
+ [JsonPropertyName("hint")]
+ public string Hint { get; private set; }
+
+ [JsonPropertyName("createdById")]
+ public string CreatedById { get; private set; }
+
+ [JsonPropertyName("createdByName")]
+ public string CreatedByName { get; private set; }
+
+ [JsonPropertyName("lastAccessedAt")]
+ public string? LastAccessedAt { get; private set; }
+
+ public AppSecretPlaintext(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string appId,
+ string secret,
+ string hint,
+ string createdById,
+ string createdByName,
+ string? lastAccessedAt
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ AppId = appId;
+ Secret = secret;
+ Hint = hint;
+ CreatedById = createdById;
+ CreatedByName = createdByName;
+ LastAccessedAt = lastAccessedAt;
+ }
+
+ public static AppSecretPlaintext From(Dictionary map) => new AppSecretPlaintext(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ appId: map["appId"].ToString(),
+ secret: map["secret"].ToString(),
+ hint: map["hint"].ToString(),
+ createdById: map["createdById"].ToString(),
+ createdByName: map["createdByName"].ToString(),
+ lastAccessedAt: map.TryGetValue("lastAccessedAt", out var lastAccessedAt) ? lastAccessedAt?.ToString() : null
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "appId", AppId },
+ { "secret", Secret },
+ { "hint", Hint },
+ { "createdById", CreatedById },
+ { "createdByName", CreatedByName },
+ { "lastAccessedAt", LastAccessedAt }
+ };
+ }
+}
diff --git a/Appwrite/Models/AppsList.cs b/Appwrite/Models/AppsList.cs
new file mode 100644
index 00000000..f54516e1
--- /dev/null
+++ b/Appwrite/Models/AppsList.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class AppsList
+ {
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("apps")]
+ public List Apps { get; private set; }
+
+ public AppsList(
+ long total,
+ List apps
+ )
+ {
+ Total = total;
+ Apps = apps;
+ }
+
+ public static AppsList From(Dictionary map) => new AppsList(
+ total: Convert.ToInt64(map["total"]),
+ apps: map["apps"].ConvertToList>().Select(it => Appwrite.Models.App.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "total", Total },
+ { "apps", Apps?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/AttributeBigint.cs b/Appwrite/Models/AttributeBigint.cs
index dc1feff9..416ef66c 100644
--- a/Appwrite/Models/AttributeBigint.cs
+++ b/Appwrite/Models/AttributeBigint.cs
@@ -18,7 +18,7 @@ public class AttributeBigint
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class AttributeBigint
public AttributeBigint(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public AttributeBigint(
public static AttributeBigint From(Dictionary map) => new AttributeBigint(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeBoolean.cs b/Appwrite/Models/AttributeBoolean.cs
index 1c955c6d..bd5b8b1e 100644
--- a/Appwrite/Models/AttributeBoolean.cs
+++ b/Appwrite/Models/AttributeBoolean.cs
@@ -18,7 +18,7 @@ public class AttributeBoolean
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class AttributeBoolean
public AttributeBoolean(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public AttributeBoolean(
public static AttributeBoolean From(Dictionary map) => new AttributeBoolean(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeDatetime.cs b/Appwrite/Models/AttributeDatetime.cs
index 4eeb1701..214f32e9 100644
--- a/Appwrite/Models/AttributeDatetime.cs
+++ b/Appwrite/Models/AttributeDatetime.cs
@@ -18,7 +18,7 @@ public class AttributeDatetime
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeDatetime
public AttributeDatetime(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeDatetime(
public static AttributeDatetime From(Dictionary map) => new AttributeDatetime(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeEmail.cs b/Appwrite/Models/AttributeEmail.cs
index 7ea11286..a3cb390d 100644
--- a/Appwrite/Models/AttributeEmail.cs
+++ b/Appwrite/Models/AttributeEmail.cs
@@ -18,7 +18,7 @@ public class AttributeEmail
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeEmail
public AttributeEmail(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeEmail(
public static AttributeEmail From(Dictionary map) => new AttributeEmail(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeEnum.cs b/Appwrite/Models/AttributeEnum.cs
index 474baaa6..387a4947 100644
--- a/Appwrite/Models/AttributeEnum.cs
+++ b/Appwrite/Models/AttributeEnum.cs
@@ -18,7 +18,7 @@ public class AttributeEnum
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class AttributeEnum
public AttributeEnum(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public AttributeEnum(
public static AttributeEnum From(Dictionary map) => new AttributeEnum(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeFloat.cs b/Appwrite/Models/AttributeFloat.cs
index 21353a09..ec166677 100644
--- a/Appwrite/Models/AttributeFloat.cs
+++ b/Appwrite/Models/AttributeFloat.cs
@@ -18,7 +18,7 @@ public class AttributeFloat
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class AttributeFloat
public AttributeFloat(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public AttributeFloat(
public static AttributeFloat From(Dictionary map) => new AttributeFloat(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeInteger.cs b/Appwrite/Models/AttributeInteger.cs
index 37718dce..db12d723 100644
--- a/Appwrite/Models/AttributeInteger.cs
+++ b/Appwrite/Models/AttributeInteger.cs
@@ -18,7 +18,7 @@ public class AttributeInteger
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class AttributeInteger
public AttributeInteger(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public AttributeInteger(
public static AttributeInteger From(Dictionary map) => new AttributeInteger(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeIp.cs b/Appwrite/Models/AttributeIp.cs
index 85368219..ca2d5275 100644
--- a/Appwrite/Models/AttributeIp.cs
+++ b/Appwrite/Models/AttributeIp.cs
@@ -18,7 +18,7 @@ public class AttributeIp
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeIp
public AttributeIp(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeIp(
public static AttributeIp From(Dictionary map) => new AttributeIp(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeLine.cs b/Appwrite/Models/AttributeLine.cs
index 8180fa75..4d7c00a6 100644
--- a/Appwrite/Models/AttributeLine.cs
+++ b/Appwrite/Models/AttributeLine.cs
@@ -18,7 +18,7 @@ public class AttributeLine
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class AttributeLine
public AttributeLine(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public AttributeLine(
public static AttributeLine From(Dictionary map) => new AttributeLine(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeLongtext.cs b/Appwrite/Models/AttributeLongtext.cs
index 0efc01f6..68026989 100644
--- a/Appwrite/Models/AttributeLongtext.cs
+++ b/Appwrite/Models/AttributeLongtext.cs
@@ -18,7 +18,7 @@ public class AttributeLongtext
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeLongtext
public AttributeLongtext(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeLongtext(
public static AttributeLongtext From(Dictionary map) => new AttributeLongtext(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeMediumtext.cs b/Appwrite/Models/AttributeMediumtext.cs
index e21bb3f3..9bd21121 100644
--- a/Appwrite/Models/AttributeMediumtext.cs
+++ b/Appwrite/Models/AttributeMediumtext.cs
@@ -18,7 +18,7 @@ public class AttributeMediumtext
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeMediumtext
public AttributeMediumtext(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeMediumtext(
public static AttributeMediumtext From(Dictionary map) => new AttributeMediumtext(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributePoint.cs b/Appwrite/Models/AttributePoint.cs
index 80256bd2..0d0baf53 100644
--- a/Appwrite/Models/AttributePoint.cs
+++ b/Appwrite/Models/AttributePoint.cs
@@ -18,7 +18,7 @@ public class AttributePoint
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class AttributePoint
public AttributePoint(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public AttributePoint(
public static AttributePoint From(Dictionary map) => new AttributePoint(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributePolygon.cs b/Appwrite/Models/AttributePolygon.cs
index 4934c95e..dc8dc60a 100644
--- a/Appwrite/Models/AttributePolygon.cs
+++ b/Appwrite/Models/AttributePolygon.cs
@@ -18,7 +18,7 @@ public class AttributePolygon
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class AttributePolygon
public AttributePolygon(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public AttributePolygon(
public static AttributePolygon From(Dictionary map) => new AttributePolygon(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeRelationship.cs b/Appwrite/Models/AttributeRelationship.cs
index b94014f8..3945bc1e 100644
--- a/Appwrite/Models/AttributeRelationship.cs
+++ b/Appwrite/Models/AttributeRelationship.cs
@@ -18,7 +18,7 @@ public class AttributeRelationship
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -56,7 +56,7 @@ public class AttributeRelationship
public AttributeRelationship(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -89,7 +89,7 @@ string side
public static AttributeRelationship From(Dictionary map) => new AttributeRelationship(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeString.cs b/Appwrite/Models/AttributeString.cs
index 28f3019a..23bfd3ae 100644
--- a/Appwrite/Models/AttributeString.cs
+++ b/Appwrite/Models/AttributeString.cs
@@ -18,7 +18,7 @@ public class AttributeString
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class AttributeString
public AttributeString(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public AttributeString(
public static AttributeString From(Dictionary map) => new AttributeString(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeText.cs b/Appwrite/Models/AttributeText.cs
index 79c8828c..231cf4a5 100644
--- a/Appwrite/Models/AttributeText.cs
+++ b/Appwrite/Models/AttributeText.cs
@@ -18,7 +18,7 @@ public class AttributeText
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeText
public AttributeText(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeText(
public static AttributeText From(Dictionary map) => new AttributeText(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeUrl.cs b/Appwrite/Models/AttributeUrl.cs
index 0114ec52..68b5ebb7 100644
--- a/Appwrite/Models/AttributeUrl.cs
+++ b/Appwrite/Models/AttributeUrl.cs
@@ -18,7 +18,7 @@ public class AttributeUrl
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class AttributeUrl
public AttributeUrl(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public AttributeUrl(
public static AttributeUrl From(Dictionary map) => new AttributeUrl(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/AttributeVarchar.cs b/Appwrite/Models/AttributeVarchar.cs
index 5d16aa0a..a3f407b0 100644
--- a/Appwrite/Models/AttributeVarchar.cs
+++ b/Appwrite/Models/AttributeVarchar.cs
@@ -18,7 +18,7 @@ public class AttributeVarchar
public string Type { get; private set; }
[JsonPropertyName("status")]
- public AttributeStatus Status { get; private set; }
+ public Appwrite.Enums.AttributeStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class AttributeVarchar
public AttributeVarchar(
string key,
string type,
- AttributeStatus status,
+ Appwrite.Enums.AttributeStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public AttributeVarchar(
public static AttributeVarchar From(Dictionary map) => new AttributeVarchar(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new AttributeStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.AttributeStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/BillingPlan.cs b/Appwrite/Models/BillingPlan.cs
index 0c05ee92..ac8c218e 100644
--- a/Appwrite/Models/BillingPlan.cs
+++ b/Appwrite/Models/BillingPlan.cs
@@ -47,6 +47,9 @@ public class BillingPlan
[JsonPropertyName("webhooks")]
public long Webhooks { get; private set; }
+ [JsonPropertyName("wafRules")]
+ public long WafRules { get; private set; }
+
[JsonPropertyName("projects")]
public long Projects { get; private set; }
@@ -207,7 +210,7 @@ public class BillingPlan
public BillingPlanLimits? Limits { get; private set; }
[JsonPropertyName("group")]
- public BillingPlanGroup Group { get; private set; }
+ public Appwrite.Enums.BillingPlanGroup Group { get; private set; }
[JsonPropertyName("program")]
public Program? Program { get; private set; }
@@ -228,6 +231,7 @@ public BillingPlan(
long screenshotsGenerated,
long members,
long webhooks,
+ long wafRules,
long projects,
long platforms,
long users,
@@ -281,7 +285,7 @@ public BillingPlan(
long buildSize,
bool databasesAllowEncrypt,
BillingPlanLimits? limits,
- BillingPlanGroup @group,
+ Appwrite.Enums.BillingPlanGroup @group,
Program? program,
BillingPlanDedicatedDatabaseLimits? dedicatedDatabases
)
@@ -298,6 +302,7 @@ public BillingPlan(
ScreenshotsGenerated = screenshotsGenerated;
Members = members;
Webhooks = webhooks;
+ WafRules = wafRules;
Projects = projects;
Platforms = platforms;
Users = users;
@@ -369,6 +374,7 @@ public BillingPlan(
screenshotsGenerated: Convert.ToInt64(map["screenshotsGenerated"]),
members: Convert.ToInt64(map["members"]),
webhooks: Convert.ToInt64(map["webhooks"]),
+ wafRules: Convert.ToInt64(map["wafRules"]),
projects: Convert.ToInt64(map["projects"]),
platforms: Convert.ToInt64(map["platforms"]),
users: Convert.ToInt64(map["users"]),
@@ -392,13 +398,13 @@ public BillingPlan(
domains: Convert.ToInt64(map["domains"]),
activityLogs: Convert.ToInt64(map["activityLogs"]),
usageLogs: Convert.ToInt64(map["usageLogs"]),
- usageLogsIntervals: map.TryGetValue("usageLogsIntervals", out var arrayRaw36) && arrayRaw36 != null
- ? arrayRaw36.ConvertToList()
+ usageLogsIntervals: map.TryGetValue("usageLogsIntervals", out var arrayRaw37) && arrayRaw37 != null
+ ? arrayRaw37.ConvertToList()
: null,
projectInactivityDays: Convert.ToInt64(map["projectInactivityDays"]),
alertLimit: Convert.ToInt64(map["alertLimit"]),
- usage: Appwrite.Models.UsageBillingPlan.From(map: map["usage"] is JsonElement jsonObj39 ? jsonObj39.Deserialize>()! : (Dictionary)map["usage"]),
- addons: Appwrite.Models.BillingPlanAddon.From(map: map["addons"] is JsonElement jsonObj40 ? jsonObj40.Deserialize>()! : (Dictionary)map["addons"]),
+ usage: Appwrite.Models.UsageBillingPlan.From(map: map["usage"] is JsonElement jsonObj40 ? jsonObj40.Deserialize>()! : (Dictionary)map["usage"]),
+ addons: Appwrite.Models.BillingPlanAddon.From(map: map["addons"] is JsonElement jsonObj41 ? jsonObj41.Deserialize>()! : (Dictionary)map["addons"]),
budgetCapEnabled: (bool)map["budgetCapEnabled"],
customSmtp: (bool)map["customSmtp"],
emailBranding: (bool)map["emailBranding"],
@@ -418,20 +424,20 @@ public BillingPlan(
supportsProjectSpecificRoles: (bool)map["supportsProjectSpecificRoles"],
backupsEnabled: (bool)map["backupsEnabled"],
usagePerProject: (bool)map["usagePerProject"],
- supportedAddons: Appwrite.Models.BillingPlanSupportedAddons.From(map: map["supportedAddons"] is JsonElement jsonObj60 ? jsonObj60.Deserialize>()! : (Dictionary)map["supportedAddons"]),
+ supportedAddons: Appwrite.Models.BillingPlanSupportedAddons.From(map: map["supportedAddons"] is JsonElement jsonObj61 ? jsonObj61.Deserialize>()! : (Dictionary)map["supportedAddons"]),
backupPolicies: Convert.ToInt64(map["backupPolicies"]),
deploymentSize: Convert.ToInt64(map["deploymentSize"]),
buildSize: Convert.ToInt64(map["buildSize"]),
databasesAllowEncrypt: (bool)map["databasesAllowEncrypt"],
- limits: map.TryGetValue("limits", out var objectRaw65) && objectRaw65 != null
- ? Appwrite.Models.BillingPlanLimits.From(map: objectRaw65 is JsonElement jsonObj65 ? jsonObj65.Deserialize>()! : (Dictionary)objectRaw65)
+ limits: map.TryGetValue("limits", out var objectRaw66) && objectRaw66 != null
+ ? Appwrite.Models.BillingPlanLimits.From(map: objectRaw66 is JsonElement jsonObj66 ? jsonObj66.Deserialize>()! : (Dictionary)objectRaw66)
: null,
- @group: new BillingPlanGroup(map["group"].ToString()!),
- program: map.TryGetValue("program", out var objectRaw67) && objectRaw67 != null
- ? Appwrite.Models.Program.From(map: objectRaw67 is JsonElement jsonObj67 ? jsonObj67.Deserialize>()! : (Dictionary)objectRaw67)
+ @group: new Appwrite.Enums.BillingPlanGroup(map["group"].ToString()!),
+ program: map.TryGetValue("program", out var objectRaw68) && objectRaw68 != null
+ ? Appwrite.Models.Program.From(map: objectRaw68 is JsonElement jsonObj68 ? jsonObj68.Deserialize>()! : (Dictionary)objectRaw68)
: null,
- dedicatedDatabases: map.TryGetValue("dedicatedDatabases", out var objectRaw68) && objectRaw68 != null
- ? Appwrite.Models.BillingPlanDedicatedDatabaseLimits.From(map: objectRaw68 is JsonElement jsonObj68 ? jsonObj68.Deserialize>()! : (Dictionary)objectRaw68)
+ dedicatedDatabases: map.TryGetValue("dedicatedDatabases", out var objectRaw69) && objectRaw69 != null
+ ? Appwrite.Models.BillingPlanDedicatedDatabaseLimits.From(map: objectRaw69 is JsonElement jsonObj69 ? jsonObj69.Deserialize>()! : (Dictionary)objectRaw69)
: null
);
@@ -449,6 +455,7 @@ public BillingPlan(
{ "screenshotsGenerated", ScreenshotsGenerated },
{ "members", Members },
{ "webhooks", Webhooks },
+ { "wafRules", WafRules },
{ "projects", Projects },
{ "platforms", Platforms },
{ "users", Users },
diff --git a/Appwrite/Models/ColumnBigint.cs b/Appwrite/Models/ColumnBigint.cs
index d4408c40..22b344bd 100644
--- a/Appwrite/Models/ColumnBigint.cs
+++ b/Appwrite/Models/ColumnBigint.cs
@@ -18,7 +18,7 @@ public class ColumnBigint
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class ColumnBigint
public ColumnBigint(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public ColumnBigint(
public static ColumnBigint From(Dictionary map) => new ColumnBigint(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnBoolean.cs b/Appwrite/Models/ColumnBoolean.cs
index 57fcb64e..f6fb093a 100644
--- a/Appwrite/Models/ColumnBoolean.cs
+++ b/Appwrite/Models/ColumnBoolean.cs
@@ -18,7 +18,7 @@ public class ColumnBoolean
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class ColumnBoolean
public ColumnBoolean(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public ColumnBoolean(
public static ColumnBoolean From(Dictionary map) => new ColumnBoolean(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnDatetime.cs b/Appwrite/Models/ColumnDatetime.cs
index 1baefc45..3eb55e51 100644
--- a/Appwrite/Models/ColumnDatetime.cs
+++ b/Appwrite/Models/ColumnDatetime.cs
@@ -18,7 +18,7 @@ public class ColumnDatetime
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnDatetime
public ColumnDatetime(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnDatetime(
public static ColumnDatetime From(Dictionary map) => new ColumnDatetime(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnEmail.cs b/Appwrite/Models/ColumnEmail.cs
index 9a907a84..96a5a952 100644
--- a/Appwrite/Models/ColumnEmail.cs
+++ b/Appwrite/Models/ColumnEmail.cs
@@ -18,7 +18,7 @@ public class ColumnEmail
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnEmail
public ColumnEmail(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnEmail(
public static ColumnEmail From(Dictionary map) => new ColumnEmail(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnEnum.cs b/Appwrite/Models/ColumnEnum.cs
index f99c8f3f..9686f6f8 100644
--- a/Appwrite/Models/ColumnEnum.cs
+++ b/Appwrite/Models/ColumnEnum.cs
@@ -18,7 +18,7 @@ public class ColumnEnum
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class ColumnEnum
public ColumnEnum(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public ColumnEnum(
public static ColumnEnum From(Dictionary map) => new ColumnEnum(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnFloat.cs b/Appwrite/Models/ColumnFloat.cs
index 75e6c747..98636303 100644
--- a/Appwrite/Models/ColumnFloat.cs
+++ b/Appwrite/Models/ColumnFloat.cs
@@ -18,7 +18,7 @@ public class ColumnFloat
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class ColumnFloat
public ColumnFloat(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public ColumnFloat(
public static ColumnFloat From(Dictionary map) => new ColumnFloat(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnInteger.cs b/Appwrite/Models/ColumnInteger.cs
index 52b99cd7..21b6d927 100644
--- a/Appwrite/Models/ColumnInteger.cs
+++ b/Appwrite/Models/ColumnInteger.cs
@@ -18,7 +18,7 @@ public class ColumnInteger
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class ColumnInteger
public ColumnInteger(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public ColumnInteger(
public static ColumnInteger From(Dictionary map) => new ColumnInteger(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnIp.cs b/Appwrite/Models/ColumnIp.cs
index dac7ded9..ce1e4675 100644
--- a/Appwrite/Models/ColumnIp.cs
+++ b/Appwrite/Models/ColumnIp.cs
@@ -18,7 +18,7 @@ public class ColumnIp
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnIp
public ColumnIp(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnIp(
public static ColumnIp From(Dictionary map) => new ColumnIp(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnLine.cs b/Appwrite/Models/ColumnLine.cs
index a941803d..2f22e9d2 100644
--- a/Appwrite/Models/ColumnLine.cs
+++ b/Appwrite/Models/ColumnLine.cs
@@ -18,7 +18,7 @@ public class ColumnLine
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class ColumnLine
public ColumnLine(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public ColumnLine(
public static ColumnLine From(Dictionary map) => new ColumnLine(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnLongtext.cs b/Appwrite/Models/ColumnLongtext.cs
index 304da072..68bad03d 100644
--- a/Appwrite/Models/ColumnLongtext.cs
+++ b/Appwrite/Models/ColumnLongtext.cs
@@ -18,7 +18,7 @@ public class ColumnLongtext
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnLongtext
public ColumnLongtext(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnLongtext(
public static ColumnLongtext From(Dictionary map) => new ColumnLongtext(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnMediumtext.cs b/Appwrite/Models/ColumnMediumtext.cs
index f54b9e3c..6a16f369 100644
--- a/Appwrite/Models/ColumnMediumtext.cs
+++ b/Appwrite/Models/ColumnMediumtext.cs
@@ -18,7 +18,7 @@ public class ColumnMediumtext
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnMediumtext
public ColumnMediumtext(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnMediumtext(
public static ColumnMediumtext From(Dictionary map) => new ColumnMediumtext(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnPoint.cs b/Appwrite/Models/ColumnPoint.cs
index 55968a40..77450962 100644
--- a/Appwrite/Models/ColumnPoint.cs
+++ b/Appwrite/Models/ColumnPoint.cs
@@ -18,7 +18,7 @@ public class ColumnPoint
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class ColumnPoint
public ColumnPoint(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public ColumnPoint(
public static ColumnPoint From(Dictionary map) => new ColumnPoint(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnPolygon.cs b/Appwrite/Models/ColumnPolygon.cs
index 6ed47a6c..8d5c7256 100644
--- a/Appwrite/Models/ColumnPolygon.cs
+++ b/Appwrite/Models/ColumnPolygon.cs
@@ -18,7 +18,7 @@ public class ColumnPolygon
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -41,7 +41,7 @@ public class ColumnPolygon
public ColumnPolygon(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -64,7 +64,7 @@ public ColumnPolygon(
public static ColumnPolygon From(Dictionary map) => new ColumnPolygon(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnRelationship.cs b/Appwrite/Models/ColumnRelationship.cs
index 6cf3d2dc..fb9d77a2 100644
--- a/Appwrite/Models/ColumnRelationship.cs
+++ b/Appwrite/Models/ColumnRelationship.cs
@@ -18,7 +18,7 @@ public class ColumnRelationship
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -56,7 +56,7 @@ public class ColumnRelationship
public ColumnRelationship(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -89,7 +89,7 @@ string side
public static ColumnRelationship From(Dictionary map) => new ColumnRelationship(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnString.cs b/Appwrite/Models/ColumnString.cs
index f4bdbff9..974ff69a 100644
--- a/Appwrite/Models/ColumnString.cs
+++ b/Appwrite/Models/ColumnString.cs
@@ -18,7 +18,7 @@ public class ColumnString
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class ColumnString
public ColumnString(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public ColumnString(
public static ColumnString From(Dictionary map) => new ColumnString(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnText.cs b/Appwrite/Models/ColumnText.cs
index 75cdc4a5..da4d9806 100644
--- a/Appwrite/Models/ColumnText.cs
+++ b/Appwrite/Models/ColumnText.cs
@@ -18,7 +18,7 @@ public class ColumnText
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnText
public ColumnText(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnText(
public static ColumnText From(Dictionary map) => new ColumnText(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnUrl.cs b/Appwrite/Models/ColumnUrl.cs
index 092029b0..7250ade6 100644
--- a/Appwrite/Models/ColumnUrl.cs
+++ b/Appwrite/Models/ColumnUrl.cs
@@ -18,7 +18,7 @@ public class ColumnUrl
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -44,7 +44,7 @@ public class ColumnUrl
public ColumnUrl(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -69,7 +69,7 @@ public ColumnUrl(
public static ColumnUrl From(Dictionary map) => new ColumnUrl(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/ColumnVarchar.cs b/Appwrite/Models/ColumnVarchar.cs
index f37860b7..7659a677 100644
--- a/Appwrite/Models/ColumnVarchar.cs
+++ b/Appwrite/Models/ColumnVarchar.cs
@@ -18,7 +18,7 @@ public class ColumnVarchar
public string Type { get; private set; }
[JsonPropertyName("status")]
- public ColumnStatus Status { get; private set; }
+ public Appwrite.Enums.ColumnStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public class ColumnVarchar
public ColumnVarchar(
string key,
string type,
- ColumnStatus status,
+ Appwrite.Enums.ColumnStatus status,
string error,
bool required,
bool? array,
@@ -74,7 +74,7 @@ public ColumnVarchar(
public static ColumnVarchar From(Dictionary map) => new ColumnVarchar(
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new ColumnStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.ColumnStatus(map["status"].ToString()!),
error: map["error"].ToString(),
required: (bool)map["required"],
array: map.TryGetValue("array", out var boolRaw6) && boolRaw6 != null
diff --git a/Appwrite/Models/Database.cs b/Appwrite/Models/Database.cs
index 31822325..c1ade276 100644
--- a/Appwrite/Models/Database.cs
+++ b/Appwrite/Models/Database.cs
@@ -27,16 +27,25 @@ public class Database
public bool Enabled { get; private set; }
[JsonPropertyName("type")]
- public DatabaseType Type { get; private set; }
+ public Appwrite.Enums.DatabaseType Type { get; private set; }
[JsonPropertyName("status")]
- public DatabaseStatus? Status { get; private set; }
+ public Appwrite.Enums.DatabaseStatus? Status { get; private set; }
+
+ [JsonPropertyName("engine")]
+ public string? Engine { get; private set; }
+
+ [JsonPropertyName("specification")]
+ public string? Specification { get; private set; }
+
+ [JsonPropertyName("replicas")]
+ public long? Replicas { get; private set; }
[JsonPropertyName("policies")]
- public List Policies { get; private set; }
+ public List? Policies { get; private set; }
[JsonPropertyName("archives")]
- public List Archives { get; private set; }
+ public List? Archives { get; private set; }
public Database(
string id,
@@ -44,10 +53,13 @@ public Database(
string createdAt,
string updatedAt,
bool enabled,
- DatabaseType type,
- DatabaseStatus? status,
- List policies,
- List archives
+ Appwrite.Enums.DatabaseType type,
+ Appwrite.Enums.DatabaseStatus? status,
+ string? engine,
+ string? specification,
+ long? replicas,
+ List? policies,
+ List? archives
)
{
Id = id;
@@ -57,6 +69,9 @@ List archives
Enabled = enabled;
Type = type;
Status = status;
+ Engine = engine;
+ Specification = specification;
+ Replicas = replicas;
Policies = policies;
Archives = archives;
}
@@ -67,14 +82,23 @@ List archives
createdAt: map["$createdAt"].ToString(),
updatedAt: map["$updatedAt"].ToString(),
enabled: (bool)map["enabled"],
- type: new DatabaseType(map["type"].ToString()!),
+ type: new Appwrite.Enums.DatabaseType(map["type"].ToString()!),
status: map.TryGetValue("status", out var enumRaw7)
? enumRaw7 == null
? null
- : new DatabaseStatus(enumRaw7.ToString()!)
+ : new Appwrite.Enums.DatabaseStatus(enumRaw7.ToString()!)
: null,
- policies: map["policies"].ConvertToList>().Select(it => Appwrite.Models.BackupPolicy.From(map: it)).ToList(),
- archives: map["archives"].ConvertToList>().Select(it => Appwrite.Models.BackupArchive.From(map: it)).ToList()
+ engine: map.TryGetValue("engine", out var engine) ? engine?.ToString() : null,
+ specification: map.TryGetValue("specification", out var specification) ? specification?.ToString() : null,
+ replicas: map.TryGetValue("replicas", out var numberRaw10) && numberRaw10 != null
+ ? Convert.ToInt64(numberRaw10)
+ : null,
+ policies: map.TryGetValue("policies", out var arrayRaw11) && arrayRaw11 != null
+ ? arrayRaw11.ConvertToList>().Select(it => Appwrite.Models.BackupPolicy.From(map: it)).ToList()
+ : null,
+ archives: map.TryGetValue("archives", out var arrayRaw12) && arrayRaw12 != null
+ ? arrayRaw12.ConvertToList>().Select(it => Appwrite.Models.BackupArchive.From(map: it)).ToList()
+ : null
);
public Dictionary ToMap() => new Dictionary()
@@ -86,6 +110,9 @@ List archives
{ "enabled", Enabled },
{ "type", Type.Value },
{ "status", Status?.Value },
+ { "engine", Engine },
+ { "specification", Specification },
+ { "replicas", Replicas },
{ "policies", Policies?.Select(it => it.ToMap()).ToList() },
{ "archives", Archives?.Select(it => it.ToMap()).ToList() }
};
diff --git a/Appwrite/Models/DatabaseStatus.cs b/Appwrite/Models/DatabaseStatus.cs
new file mode 100644
index 00000000..e5abcad2
--- /dev/null
+++ b/Appwrite/Models/DatabaseStatus.cs
@@ -0,0 +1,82 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DatabaseStatus
+ {
+ [JsonPropertyName("health")]
+ public string Health { get; private set; }
+
+ [JsonPropertyName("ready")]
+ public bool Ready { get; private set; }
+
+ [JsonPropertyName("engine")]
+ public string Engine { get; private set; }
+
+ [JsonPropertyName("version")]
+ public string Version { get; private set; }
+
+ [JsonPropertyName("uptime")]
+ public long Uptime { get; private set; }
+
+ [JsonPropertyName("connections")]
+ public DatabaseStatusConnections Connections { get; private set; }
+
+ [JsonPropertyName("replicas")]
+ public List Replicas { get; private set; }
+
+ [JsonPropertyName("volumes")]
+ public List Volumes { get; private set; }
+
+ public DatabaseStatus(
+ string health,
+ bool ready,
+ string engine,
+ string version,
+ long uptime,
+ DatabaseStatusConnections connections,
+ List replicas,
+ List volumes
+ )
+ {
+ Health = health;
+ Ready = ready;
+ Engine = engine;
+ Version = version;
+ Uptime = uptime;
+ Connections = connections;
+ Replicas = replicas;
+ Volumes = volumes;
+ }
+
+ public static DatabaseStatus From(Dictionary map) => new DatabaseStatus(
+ health: map["health"].ToString(),
+ ready: (bool)map["ready"],
+ engine: map["engine"].ToString(),
+ version: map["version"].ToString(),
+ uptime: Convert.ToInt64(map["uptime"]),
+ connections: Appwrite.Models.DatabaseStatusConnections.From(map: map["connections"] is JsonElement jsonObj6 ? jsonObj6.Deserialize>()! : (Dictionary)map["connections"]),
+ replicas: map["replicas"].ConvertToList>().Select(it => Appwrite.Models.DatabaseStatusReplica.From(map: it)).ToList(),
+ volumes: map["volumes"].ConvertToList>().Select(it => Appwrite.Models.DatabaseStatusVolume.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "health", Health },
+ { "ready", Ready },
+ { "engine", Engine },
+ { "version", Version },
+ { "uptime", Uptime },
+ { "connections", Connections?.ToMap() },
+ { "replicas", Replicas?.Select(it => it.ToMap()).ToList() },
+ { "volumes", Volumes?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/DatabaseStatusConnections.cs b/Appwrite/Models/DatabaseStatusConnections.cs
new file mode 100644
index 00000000..4a1de49a
--- /dev/null
+++ b/Appwrite/Models/DatabaseStatusConnections.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DatabaseStatusConnections
+ {
+ [JsonPropertyName("current")]
+ public long Current { get; private set; }
+
+ [JsonPropertyName("max")]
+ public long Max { get; private set; }
+
+ public DatabaseStatusConnections(
+ long current,
+ long max
+ )
+ {
+ Current = current;
+ Max = max;
+ }
+
+ public static DatabaseStatusConnections From(Dictionary map) => new DatabaseStatusConnections(
+ current: Convert.ToInt64(map["current"]),
+ max: Convert.ToInt64(map["max"])
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "current", Current },
+ { "max", Max }
+ };
+ }
+}
diff --git a/Appwrite/Models/DatabaseStatusReplica.cs b/Appwrite/Models/DatabaseStatusReplica.cs
new file mode 100644
index 00000000..b5b8442b
--- /dev/null
+++ b/Appwrite/Models/DatabaseStatusReplica.cs
@@ -0,0 +1,56 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DatabaseStatusReplica
+ {
+ [JsonPropertyName("index")]
+ public long Index { get; private set; }
+
+ [JsonPropertyName("role")]
+ public string Role { get; private set; }
+
+ [JsonPropertyName("healthy")]
+ public bool Healthy { get; private set; }
+
+ [JsonPropertyName("lagSeconds")]
+ public double? LagSeconds { get; private set; }
+
+ public DatabaseStatusReplica(
+ long index,
+ string role,
+ bool healthy,
+ double? lagSeconds
+ )
+ {
+ Index = index;
+ Role = role;
+ Healthy = healthy;
+ LagSeconds = lagSeconds;
+ }
+
+ public static DatabaseStatusReplica From(Dictionary map) => new DatabaseStatusReplica(
+ index: Convert.ToInt64(map["index"]),
+ role: map["role"].ToString(),
+ healthy: (bool)map["healthy"],
+ lagSeconds: map.TryGetValue("lagSeconds", out var numberRaw4) && numberRaw4 != null
+ ? Convert.ToDouble(numberRaw4)
+ : null
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "index", Index },
+ { "role", Role },
+ { "healthy", Healthy },
+ { "lagSeconds", LagSeconds }
+ };
+ }
+}
diff --git a/Appwrite/Models/DatabaseStatusVolume.cs b/Appwrite/Models/DatabaseStatusVolume.cs
new file mode 100644
index 00000000..8fe63d8a
--- /dev/null
+++ b/Appwrite/Models/DatabaseStatusVolume.cs
@@ -0,0 +1,54 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DatabaseStatusVolume
+ {
+ [JsonPropertyName("path")]
+ public string Path { get; private set; }
+
+ [JsonPropertyName("usedPercent")]
+ public string UsedPercent { get; private set; }
+
+ [JsonPropertyName("available")]
+ public string Available { get; private set; }
+
+ [JsonPropertyName("mounted")]
+ public bool Mounted { get; private set; }
+
+ public DatabaseStatusVolume(
+ string @path,
+ string usedPercent,
+ string available,
+ bool mounted
+ )
+ {
+ Path = @path;
+ UsedPercent = usedPercent;
+ Available = available;
+ Mounted = mounted;
+ }
+
+ public static DatabaseStatusVolume From(Dictionary map) => new DatabaseStatusVolume(
+ @path: map["path"].ToString(),
+ usedPercent: map["usedPercent"].ToString(),
+ available: map["available"].ToString(),
+ mounted: (bool)map["mounted"]
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "path", Path },
+ { "usedPercent", UsedPercent },
+ { "available", Available },
+ { "mounted", Mounted }
+ };
+ }
+}
diff --git a/Appwrite/Models/DedicatedDatabase.cs b/Appwrite/Models/DedicatedDatabase.cs
new file mode 100644
index 00000000..23c8fd07
--- /dev/null
+++ b/Appwrite/Models/DedicatedDatabase.cs
@@ -0,0 +1,369 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DedicatedDatabase
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("projectId")]
+ public string ProjectId { get; private set; }
+
+ [JsonPropertyName("name")]
+ public string Name { get; private set; }
+
+ [JsonPropertyName("api")]
+ public string Api { get; private set; }
+
+ [JsonPropertyName("engine")]
+ public string Engine { get; private set; }
+
+ [JsonPropertyName("version")]
+ public string Version { get; private set; }
+
+ [JsonPropertyName("specification")]
+ public string Specification { get; private set; }
+
+ [JsonPropertyName("backend")]
+ public string Backend { get; private set; }
+
+ [JsonPropertyName("hostname")]
+ public string Hostname { get; private set; }
+
+ [JsonPropertyName("connectionPort")]
+ public long ConnectionPort { get; private set; }
+
+ [JsonPropertyName("connectionUser")]
+ public string ConnectionUser { get; private set; }
+
+ [JsonPropertyName("connectionPassword")]
+ public string ConnectionPassword { get; private set; }
+
+ [JsonPropertyName("connectionString")]
+ public string ConnectionString { get; private set; }
+
+ [JsonPropertyName("ssl")]
+ public bool Ssl { get; private set; }
+
+ [JsonPropertyName("status")]
+ public string Status { get; private set; }
+
+ [JsonPropertyName("containerStatus")]
+ public string ContainerStatus { get; private set; }
+
+ [JsonPropertyName("lastAccessedAt")]
+ public string? LastAccessedAt { get; private set; }
+
+ [JsonPropertyName("idleUntil")]
+ public string? IdleUntil { get; private set; }
+
+ [JsonPropertyName("lifecycleState")]
+ public string LifecycleState { get; private set; }
+
+ [JsonPropertyName("idleTimeoutMinutes")]
+ public long IdleTimeoutMinutes { get; private set; }
+
+ [JsonPropertyName("cpu")]
+ public long Cpu { get; private set; }
+
+ [JsonPropertyName("memory")]
+ public long Memory { get; private set; }
+
+ [JsonPropertyName("storage")]
+ public long Storage { get; private set; }
+
+ [JsonPropertyName("storageClass")]
+ public string StorageClass { get; private set; }
+
+ [JsonPropertyName("storageMaxGb")]
+ public long StorageMaxGb { get; private set; }
+
+ [JsonPropertyName("nodePool")]
+ public string NodePool { get; private set; }
+
+ [JsonPropertyName("replicas")]
+ public long Replicas { get; private set; }
+
+ [JsonPropertyName("syncMode")]
+ public string SyncMode { get; private set; }
+
+ [JsonPropertyName("crossRegionReplicas")]
+ public long CrossRegionReplicas { get; private set; }
+
+ [JsonPropertyName("networkMaxConnections")]
+ public long NetworkMaxConnections { get; private set; }
+
+ [JsonPropertyName("networkIdleTimeoutSeconds")]
+ public long NetworkIdleTimeoutSeconds { get; private set; }
+
+ [JsonPropertyName("networkIPAllowlist")]
+ public List NetworkIPAllowlist { get; private set; }
+
+ [JsonPropertyName("backupEnabled")]
+ public bool BackupEnabled { get; private set; }
+
+ [JsonPropertyName("pitr")]
+ public bool Pitr { get; private set; }
+
+ [JsonPropertyName("pitrRetentionDays")]
+ public long PitrRetentionDays { get; private set; }
+
+ [JsonPropertyName("storageAutoscaling")]
+ public bool StorageAutoscaling { get; private set; }
+
+ [JsonPropertyName("storageAutoscalingThresholdPercent")]
+ public long StorageAutoscalingThresholdPercent { get; private set; }
+
+ [JsonPropertyName("storageAutoscalingMaxGb")]
+ public long StorageAutoscalingMaxGb { get; private set; }
+
+ [JsonPropertyName("maintenanceWindowDay")]
+ public string MaintenanceWindowDay { get; private set; }
+
+ [JsonPropertyName("maintenanceWindowHourUtc")]
+ public long MaintenanceWindowHourUtc { get; private set; }
+
+ [JsonPropertyName("metricsEnabled")]
+ public bool MetricsEnabled { get; private set; }
+
+ [JsonPropertyName("sqlApiEnabled")]
+ public bool SqlApiEnabled { get; private set; }
+
+ [JsonPropertyName("sqlApiAllowedStatements")]
+ public List SqlApiAllowedStatements { get; private set; }
+
+ [JsonPropertyName("sqlApiMaxRows")]
+ public long SqlApiMaxRows { get; private set; }
+
+ [JsonPropertyName("sqlApiMaxBytes")]
+ public long SqlApiMaxBytes { get; private set; }
+
+ [JsonPropertyName("sqlApiTimeoutSeconds")]
+ public long SqlApiTimeoutSeconds { get; private set; }
+
+ [JsonPropertyName("error")]
+ public string Error { get; private set; }
+
+ public DedicatedDatabase(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string projectId,
+ string name,
+ string api,
+ string engine,
+ string version,
+ string specification,
+ string backend,
+ string hostname,
+ long connectionPort,
+ string connectionUser,
+ string connectionPassword,
+ string connectionString,
+ bool ssl,
+ string status,
+ string containerStatus,
+ string? lastAccessedAt,
+ string? idleUntil,
+ string lifecycleState,
+ long idleTimeoutMinutes,
+ long cpu,
+ long memory,
+ long storage,
+ string storageClass,
+ long storageMaxGb,
+ string nodePool,
+ long replicas,
+ string syncMode,
+ long crossRegionReplicas,
+ long networkMaxConnections,
+ long networkIdleTimeoutSeconds,
+ List networkIPAllowlist,
+ bool backupEnabled,
+ bool pitr,
+ long pitrRetentionDays,
+ bool storageAutoscaling,
+ long storageAutoscalingThresholdPercent,
+ long storageAutoscalingMaxGb,
+ string maintenanceWindowDay,
+ long maintenanceWindowHourUtc,
+ bool metricsEnabled,
+ bool sqlApiEnabled,
+ List sqlApiAllowedStatements,
+ long sqlApiMaxRows,
+ long sqlApiMaxBytes,
+ long sqlApiTimeoutSeconds,
+ string error
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ ProjectId = projectId;
+ Name = name;
+ Api = api;
+ Engine = engine;
+ Version = version;
+ Specification = specification;
+ Backend = backend;
+ Hostname = hostname;
+ ConnectionPort = connectionPort;
+ ConnectionUser = connectionUser;
+ ConnectionPassword = connectionPassword;
+ ConnectionString = connectionString;
+ Ssl = ssl;
+ Status = status;
+ ContainerStatus = containerStatus;
+ LastAccessedAt = lastAccessedAt;
+ IdleUntil = idleUntil;
+ LifecycleState = lifecycleState;
+ IdleTimeoutMinutes = idleTimeoutMinutes;
+ Cpu = cpu;
+ Memory = memory;
+ Storage = storage;
+ StorageClass = storageClass;
+ StorageMaxGb = storageMaxGb;
+ NodePool = nodePool;
+ Replicas = replicas;
+ SyncMode = syncMode;
+ CrossRegionReplicas = crossRegionReplicas;
+ NetworkMaxConnections = networkMaxConnections;
+ NetworkIdleTimeoutSeconds = networkIdleTimeoutSeconds;
+ NetworkIPAllowlist = networkIPAllowlist;
+ BackupEnabled = backupEnabled;
+ Pitr = pitr;
+ PitrRetentionDays = pitrRetentionDays;
+ StorageAutoscaling = storageAutoscaling;
+ StorageAutoscalingThresholdPercent = storageAutoscalingThresholdPercent;
+ StorageAutoscalingMaxGb = storageAutoscalingMaxGb;
+ MaintenanceWindowDay = maintenanceWindowDay;
+ MaintenanceWindowHourUtc = maintenanceWindowHourUtc;
+ MetricsEnabled = metricsEnabled;
+ SqlApiEnabled = sqlApiEnabled;
+ SqlApiAllowedStatements = sqlApiAllowedStatements;
+ SqlApiMaxRows = sqlApiMaxRows;
+ SqlApiMaxBytes = sqlApiMaxBytes;
+ SqlApiTimeoutSeconds = sqlApiTimeoutSeconds;
+ Error = error;
+ }
+
+ public static DedicatedDatabase From(Dictionary map) => new DedicatedDatabase(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ projectId: map["projectId"].ToString(),
+ name: map["name"].ToString(),
+ api: map["api"].ToString(),
+ engine: map["engine"].ToString(),
+ version: map["version"].ToString(),
+ specification: map["specification"].ToString(),
+ backend: map["backend"].ToString(),
+ hostname: map["hostname"].ToString(),
+ connectionPort: Convert.ToInt64(map["connectionPort"]),
+ connectionUser: map["connectionUser"].ToString(),
+ connectionPassword: map["connectionPassword"].ToString(),
+ connectionString: map["connectionString"].ToString(),
+ ssl: (bool)map["ssl"],
+ status: map["status"].ToString(),
+ containerStatus: map["containerStatus"].ToString(),
+ lastAccessedAt: map.TryGetValue("lastAccessedAt", out var lastAccessedAt) ? lastAccessedAt?.ToString() : null,
+ idleUntil: map.TryGetValue("idleUntil", out var idleUntil) ? idleUntil?.ToString() : null,
+ lifecycleState: map["lifecycleState"].ToString(),
+ idleTimeoutMinutes: Convert.ToInt64(map["idleTimeoutMinutes"]),
+ cpu: Convert.ToInt64(map["cpu"]),
+ memory: Convert.ToInt64(map["memory"]),
+ storage: Convert.ToInt64(map["storage"]),
+ storageClass: map["storageClass"].ToString(),
+ storageMaxGb: Convert.ToInt64(map["storageMaxGb"]),
+ nodePool: map["nodePool"].ToString(),
+ replicas: Convert.ToInt64(map["replicas"]),
+ syncMode: map["syncMode"].ToString(),
+ crossRegionReplicas: Convert.ToInt64(map["crossRegionReplicas"]),
+ networkMaxConnections: Convert.ToInt64(map["networkMaxConnections"]),
+ networkIdleTimeoutSeconds: Convert.ToInt64(map["networkIdleTimeoutSeconds"]),
+ networkIPAllowlist: map["networkIPAllowlist"].ConvertToList(),
+ backupEnabled: (bool)map["backupEnabled"],
+ pitr: (bool)map["pitr"],
+ pitrRetentionDays: Convert.ToInt64(map["pitrRetentionDays"]),
+ storageAutoscaling: (bool)map["storageAutoscaling"],
+ storageAutoscalingThresholdPercent: Convert.ToInt64(map["storageAutoscalingThresholdPercent"]),
+ storageAutoscalingMaxGb: Convert.ToInt64(map["storageAutoscalingMaxGb"]),
+ maintenanceWindowDay: map["maintenanceWindowDay"].ToString(),
+ maintenanceWindowHourUtc: Convert.ToInt64(map["maintenanceWindowHourUtc"]),
+ metricsEnabled: (bool)map["metricsEnabled"],
+ sqlApiEnabled: (bool)map["sqlApiEnabled"],
+ sqlApiAllowedStatements: map["sqlApiAllowedStatements"].ConvertToList(),
+ sqlApiMaxRows: Convert.ToInt64(map["sqlApiMaxRows"]),
+ sqlApiMaxBytes: Convert.ToInt64(map["sqlApiMaxBytes"]),
+ sqlApiTimeoutSeconds: Convert.ToInt64(map["sqlApiTimeoutSeconds"]),
+ error: map["error"].ToString()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "projectId", ProjectId },
+ { "name", Name },
+ { "api", Api },
+ { "engine", Engine },
+ { "version", Version },
+ { "specification", Specification },
+ { "backend", Backend },
+ { "hostname", Hostname },
+ { "connectionPort", ConnectionPort },
+ { "connectionUser", ConnectionUser },
+ { "connectionPassword", ConnectionPassword },
+ { "connectionString", ConnectionString },
+ { "ssl", Ssl },
+ { "status", Status },
+ { "containerStatus", ContainerStatus },
+ { "lastAccessedAt", LastAccessedAt },
+ { "idleUntil", IdleUntil },
+ { "lifecycleState", LifecycleState },
+ { "idleTimeoutMinutes", IdleTimeoutMinutes },
+ { "cpu", Cpu },
+ { "memory", Memory },
+ { "storage", Storage },
+ { "storageClass", StorageClass },
+ { "storageMaxGb", StorageMaxGb },
+ { "nodePool", NodePool },
+ { "replicas", Replicas },
+ { "syncMode", SyncMode },
+ { "crossRegionReplicas", CrossRegionReplicas },
+ { "networkMaxConnections", NetworkMaxConnections },
+ { "networkIdleTimeoutSeconds", NetworkIdleTimeoutSeconds },
+ { "networkIPAllowlist", NetworkIPAllowlist },
+ { "backupEnabled", BackupEnabled },
+ { "pitr", Pitr },
+ { "pitrRetentionDays", PitrRetentionDays },
+ { "storageAutoscaling", StorageAutoscaling },
+ { "storageAutoscalingThresholdPercent", StorageAutoscalingThresholdPercent },
+ { "storageAutoscalingMaxGb", StorageAutoscalingMaxGb },
+ { "maintenanceWindowDay", MaintenanceWindowDay },
+ { "maintenanceWindowHourUtc", MaintenanceWindowHourUtc },
+ { "metricsEnabled", MetricsEnabled },
+ { "sqlApiEnabled", SqlApiEnabled },
+ { "sqlApiAllowedStatements", SqlApiAllowedStatements },
+ { "sqlApiMaxRows", SqlApiMaxRows },
+ { "sqlApiMaxBytes", SqlApiMaxBytes },
+ { "sqlApiTimeoutSeconds", SqlApiTimeoutSeconds },
+ { "error", Error }
+ };
+ }
+}
diff --git a/Appwrite/Models/DedicatedDatabaseMember.cs b/Appwrite/Models/DedicatedDatabaseMember.cs
new file mode 100644
index 00000000..5a3875a8
--- /dev/null
+++ b/Appwrite/Models/DedicatedDatabaseMember.cs
@@ -0,0 +1,54 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DedicatedDatabaseMember
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("role")]
+ public string Role { get; private set; }
+
+ [JsonPropertyName("status")]
+ public string Status { get; private set; }
+
+ [JsonPropertyName("lagSeconds")]
+ public double LagSeconds { get; private set; }
+
+ public DedicatedDatabaseMember(
+ string id,
+ string role,
+ string status,
+ double lagSeconds
+ )
+ {
+ Id = id;
+ Role = role;
+ Status = status;
+ LagSeconds = lagSeconds;
+ }
+
+ public static DedicatedDatabaseMember From(Dictionary map) => new DedicatedDatabaseMember(
+ id: map["$id"].ToString(),
+ role: map["role"].ToString(),
+ status: map["status"].ToString(),
+ lagSeconds: Convert.ToDouble(map["lagSeconds"])
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "role", Role },
+ { "status", Status },
+ { "lagSeconds", LagSeconds }
+ };
+ }
+}
diff --git a/Appwrite/Models/DedicatedDatabaseReplicas.cs b/Appwrite/Models/DedicatedDatabaseReplicas.cs
new file mode 100644
index 00000000..caaa5990
--- /dev/null
+++ b/Appwrite/Models/DedicatedDatabaseReplicas.cs
@@ -0,0 +1,47 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DedicatedDatabaseReplicas
+ {
+ [JsonPropertyName("replicas")]
+ public long Replicas { get; private set; }
+
+ [JsonPropertyName("syncMode")]
+ public string SyncMode { get; private set; }
+
+ [JsonPropertyName("members")]
+ public List Members { get; private set; }
+
+ public DedicatedDatabaseReplicas(
+ long replicas,
+ string syncMode,
+ List members
+ )
+ {
+ Replicas = replicas;
+ SyncMode = syncMode;
+ Members = members;
+ }
+
+ public static DedicatedDatabaseReplicas From(Dictionary map) => new DedicatedDatabaseReplicas(
+ replicas: Convert.ToInt64(map["replicas"]),
+ syncMode: map["syncMode"].ToString(),
+ members: map["members"].ConvertToList>().Select(it => Appwrite.Models.DedicatedDatabaseMember.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "replicas", Replicas },
+ { "syncMode", SyncMode },
+ { "members", Members?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/DedicatedDatabaseSpecification.cs b/Appwrite/Models/DedicatedDatabaseSpecification.cs
new file mode 100644
index 00000000..0b815194
--- /dev/null
+++ b/Appwrite/Models/DedicatedDatabaseSpecification.cs
@@ -0,0 +1,89 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DedicatedDatabaseSpecification
+ {
+ [JsonPropertyName("slug")]
+ public string Slug { get; private set; }
+
+ [JsonPropertyName("name")]
+ public string Name { get; private set; }
+
+ [JsonPropertyName("price")]
+ public double Price { get; private set; }
+
+ [JsonPropertyName("cpu")]
+ public long Cpu { get; private set; }
+
+ [JsonPropertyName("memory")]
+ public long Memory { get; private set; }
+
+ [JsonPropertyName("maxConnections")]
+ public long MaxConnections { get; private set; }
+
+ [JsonPropertyName("includedStorage")]
+ public long IncludedStorage { get; private set; }
+
+ [JsonPropertyName("includedBandwidth")]
+ public long IncludedBandwidth { get; private set; }
+
+ [JsonPropertyName("enabled")]
+ public bool Enabled { get; private set; }
+
+ public DedicatedDatabaseSpecification(
+ string slug,
+ string name,
+ double price,
+ long cpu,
+ long memory,
+ long maxConnections,
+ long includedStorage,
+ long includedBandwidth,
+ bool enabled
+ )
+ {
+ Slug = slug;
+ Name = name;
+ Price = price;
+ Cpu = cpu;
+ Memory = memory;
+ MaxConnections = maxConnections;
+ IncludedStorage = includedStorage;
+ IncludedBandwidth = includedBandwidth;
+ Enabled = enabled;
+ }
+
+ public static DedicatedDatabaseSpecification From(Dictionary map) => new DedicatedDatabaseSpecification(
+ slug: map["slug"].ToString(),
+ name: map["name"].ToString(),
+ price: Convert.ToDouble(map["price"]),
+ cpu: Convert.ToInt64(map["cpu"]),
+ memory: Convert.ToInt64(map["memory"]),
+ maxConnections: Convert.ToInt64(map["maxConnections"]),
+ includedStorage: Convert.ToInt64(map["includedStorage"]),
+ includedBandwidth: Convert.ToInt64(map["includedBandwidth"]),
+ enabled: (bool)map["enabled"]
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "slug", Slug },
+ { "name", Name },
+ { "price", Price },
+ { "cpu", Cpu },
+ { "memory", Memory },
+ { "maxConnections", MaxConnections },
+ { "includedStorage", IncludedStorage },
+ { "includedBandwidth", IncludedBandwidth },
+ { "enabled", Enabled }
+ };
+ }
+}
diff --git a/Appwrite/Models/DedicatedDatabaseSpecificationList.cs b/Appwrite/Models/DedicatedDatabaseSpecificationList.cs
new file mode 100644
index 00000000..59c0336b
--- /dev/null
+++ b/Appwrite/Models/DedicatedDatabaseSpecificationList.cs
@@ -0,0 +1,47 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DedicatedDatabaseSpecificationList
+ {
+ [JsonPropertyName("specifications")]
+ public List Specifications { get; private set; }
+
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("pricing")]
+ public DedicatedDatabaseSpecificationPricing Pricing { get; private set; }
+
+ public DedicatedDatabaseSpecificationList(
+ List specifications,
+ long total,
+ DedicatedDatabaseSpecificationPricing pricing
+ )
+ {
+ Specifications = specifications;
+ Total = total;
+ Pricing = pricing;
+ }
+
+ public static DedicatedDatabaseSpecificationList From(Dictionary map) => new DedicatedDatabaseSpecificationList(
+ specifications: map["specifications"].ConvertToList>().Select(it => Appwrite.Models.DedicatedDatabaseSpecification.From(map: it)).ToList(),
+ total: Convert.ToInt64(map["total"]),
+ pricing: Appwrite.Models.DedicatedDatabaseSpecificationPricing.From(map: map["pricing"] is JsonElement jsonObj3 ? jsonObj3.Deserialize>()! : (Dictionary)map["pricing"])
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "specifications", Specifications?.Select(it => it.ToMap()).ToList() },
+ { "total", Total },
+ { "pricing", Pricing?.ToMap() }
+ };
+ }
+}
diff --git a/Appwrite/Models/DedicatedDatabaseSpecificationPricing.cs b/Appwrite/Models/DedicatedDatabaseSpecificationPricing.cs
new file mode 100644
index 00000000..ccf587aa
--- /dev/null
+++ b/Appwrite/Models/DedicatedDatabaseSpecificationPricing.cs
@@ -0,0 +1,61 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class DedicatedDatabaseSpecificationPricing
+ {
+ [JsonPropertyName("storageOverageRate")]
+ public double StorageOverageRate { get; private set; }
+
+ [JsonPropertyName("bandwidthOverageRate")]
+ public double BandwidthOverageRate { get; private set; }
+
+ [JsonPropertyName("replicaRate")]
+ public double ReplicaRate { get; private set; }
+
+ [JsonPropertyName("crossRegionReplicaRate")]
+ public double CrossRegionReplicaRate { get; private set; }
+
+ [JsonPropertyName("pitrRate")]
+ public double PitrRate { get; private set; }
+
+ public DedicatedDatabaseSpecificationPricing(
+ double storageOverageRate,
+ double bandwidthOverageRate,
+ double replicaRate,
+ double crossRegionReplicaRate,
+ double pitrRate
+ )
+ {
+ StorageOverageRate = storageOverageRate;
+ BandwidthOverageRate = bandwidthOverageRate;
+ ReplicaRate = replicaRate;
+ CrossRegionReplicaRate = crossRegionReplicaRate;
+ PitrRate = pitrRate;
+ }
+
+ public static DedicatedDatabaseSpecificationPricing From(Dictionary map) => new DedicatedDatabaseSpecificationPricing(
+ storageOverageRate: Convert.ToDouble(map["storageOverageRate"]),
+ bandwidthOverageRate: Convert.ToDouble(map["bandwidthOverageRate"]),
+ replicaRate: Convert.ToDouble(map["replicaRate"]),
+ crossRegionReplicaRate: Convert.ToDouble(map["crossRegionReplicaRate"]),
+ pitrRate: Convert.ToDouble(map["pitrRate"])
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "storageOverageRate", StorageOverageRate },
+ { "bandwidthOverageRate", BandwidthOverageRate },
+ { "replicaRate", ReplicaRate },
+ { "crossRegionReplicaRate", CrossRegionReplicaRate },
+ { "pitrRate", PitrRate }
+ };
+ }
+}
diff --git a/Appwrite/Models/Deployment.cs b/Appwrite/Models/Deployment.cs
index 6a3786b2..79f43f76 100644
--- a/Appwrite/Models/Deployment.cs
+++ b/Appwrite/Models/Deployment.cs
@@ -54,7 +54,7 @@ public class Deployment
public string ScreenshotDark { get; private set; }
[JsonPropertyName("status")]
- public DeploymentStatus Status { get; private set; }
+ public Appwrite.Enums.DeploymentStatus Status { get; private set; }
[JsonPropertyName("buildLogs")]
public string BuildLogs { get; private set; }
@@ -107,7 +107,7 @@ public Deployment(
bool activate,
string screenshotLight,
string screenshotDark,
- DeploymentStatus status,
+ Appwrite.Enums.DeploymentStatus status,
string buildLogs,
long buildDuration,
string providerRepositoryName,
@@ -166,7 +166,7 @@ string providerBranchUrl
activate: (bool)map["activate"],
screenshotLight: map["screenshotLight"].ToString(),
screenshotDark: map["screenshotDark"].ToString(),
- status: new DeploymentStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.DeploymentStatus(map["status"].ToString()!),
buildLogs: map["buildLogs"].ToString(),
buildDuration: Convert.ToInt64(map["buildDuration"]),
providerRepositoryName: map["providerRepositoryName"].ToString(),
diff --git a/Appwrite/Models/Execution.cs b/Appwrite/Models/Execution.cs
index 04c39e47..2393dbc0 100644
--- a/Appwrite/Models/Execution.cs
+++ b/Appwrite/Models/Execution.cs
@@ -30,10 +30,10 @@ public class Execution
public string DeploymentId { get; private set; }
[JsonPropertyName("trigger")]
- public ExecutionTrigger Trigger { get; private set; }
+ public Appwrite.Enums.ExecutionTrigger Trigger { get; private set; }
[JsonPropertyName("status")]
- public ExecutionStatus Status { get; private set; }
+ public Appwrite.Enums.ExecutionStatus Status { get; private set; }
[JsonPropertyName("requestMethod")]
public string RequestMethod { get; private set; }
@@ -72,8 +72,8 @@ public Execution(
List permissions,
string functionId,
string deploymentId,
- ExecutionTrigger trigger,
- ExecutionStatus status,
+ Appwrite.Enums.ExecutionTrigger trigger,
+ Appwrite.Enums.ExecutionStatus status,
string requestMethod,
string requestPath,
List requestHeaders,
@@ -113,8 +113,8 @@ public Execution(
permissions: map["$permissions"].ConvertToList(),
functionId: map["functionId"].ToString(),
deploymentId: map["deploymentId"].ToString(),
- trigger: new ExecutionTrigger(map["trigger"].ToString()!),
- status: new ExecutionStatus(map["status"].ToString()!),
+ trigger: new Appwrite.Enums.ExecutionTrigger(map["trigger"].ToString()!),
+ status: new Appwrite.Enums.ExecutionStatus(map["status"].ToString()!),
requestMethod: map["requestMethod"].ToString(),
requestPath: map["requestPath"].ToString(),
requestHeaders: map["requestHeaders"].ConvertToList>().Select(it => Appwrite.Models.Headers.From(map: it)).ToList(),
diff --git a/Appwrite/Models/Index.cs b/Appwrite/Models/Index.cs
index 12f897d7..ddebe855 100644
--- a/Appwrite/Models/Index.cs
+++ b/Appwrite/Models/Index.cs
@@ -27,7 +27,7 @@ public class Index
public string Type { get; private set; }
[JsonPropertyName("status")]
- public IndexStatus Status { get; private set; }
+ public Appwrite.Enums.IndexStatus Status { get; private set; }
[JsonPropertyName("error")]
public string Error { get; private set; }
@@ -47,7 +47,7 @@ public Index(
string updatedAt,
string key,
string type,
- IndexStatus status,
+ Appwrite.Enums.IndexStatus status,
string error,
List attributes,
List lengths,
@@ -72,7 +72,7 @@ public Index(
updatedAt: map["$updatedAt"].ToString(),
key: map["key"].ToString(),
type: map["type"].ToString(),
- status: new IndexStatus(map["status"].ToString()!),
+ status: new Appwrite.Enums.IndexStatus(map["status"].ToString()!),
error: map["error"].ToString(),
attributes: map["attributes"].ConvertToList(),
lengths: map["lengths"].ConvertToList(),
diff --git a/Appwrite/Models/InsightCTA.cs b/Appwrite/Models/InsightCTA.cs
index 516cae98..3fa87ddf 100644
--- a/Appwrite/Models/InsightCTA.cs
+++ b/Appwrite/Models/InsightCTA.cs
@@ -40,7 +40,7 @@ object @params
label: map["label"].ToString(),
service: map["service"].ToString(),
method: map["method"].ToString(),
- @params: map["params"].ToString()
+ @params: map["params"]
);
public Dictionary ToMap() => new Dictionary()
diff --git a/Appwrite/Models/Message.cs b/Appwrite/Models/Message.cs
index b90570b6..7ef49fca 100644
--- a/Appwrite/Models/Message.cs
+++ b/Appwrite/Models/Message.cs
@@ -48,7 +48,7 @@ public class Message
public object Data { get; private set; }
[JsonPropertyName("status")]
- public MessageStatus Status { get; private set; }
+ public Appwrite.Enums.MessageStatus Status { get; private set; }
public Message(
string id,
@@ -63,7 +63,7 @@ public Message(
List? deliveryErrors,
long deliveredTotal,
object data,
- MessageStatus status
+ Appwrite.Enums.MessageStatus status
)
{
Id = id;
@@ -95,8 +95,8 @@ MessageStatus status
? arrayRaw10.ConvertToList()
: null,
deliveredTotal: Convert.ToInt64(map["deliveredTotal"]),
- data: map["data"].ToString(),
- status: new MessageStatus(map["status"].ToString()!)
+ data: map["data"],
+ status: new Appwrite.Enums.MessageStatus(map["status"].ToString()!)
);
public Dictionary ToMap() => new Dictionary()
diff --git a/Appwrite/Models/Oauth2Approve.cs b/Appwrite/Models/Oauth2Approve.cs
new file mode 100644
index 00000000..cbcd97db
--- /dev/null
+++ b/Appwrite/Models/Oauth2Approve.cs
@@ -0,0 +1,33 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class Oauth2Approve
+ {
+ [JsonPropertyName("redirectUrl")]
+ public string RedirectUrl { get; private set; }
+
+ public Oauth2Approve(
+ string redirectUrl
+ )
+ {
+ RedirectUrl = redirectUrl;
+ }
+
+ public static Oauth2Approve From(Dictionary map) => new Oauth2Approve(
+ redirectUrl: map["redirectUrl"].ToString()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "redirectUrl", RedirectUrl }
+ };
+ }
+}
diff --git a/Appwrite/Models/Oauth2Authorize.cs b/Appwrite/Models/Oauth2Authorize.cs
new file mode 100644
index 00000000..6ce3913c
--- /dev/null
+++ b/Appwrite/Models/Oauth2Authorize.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class Oauth2Authorize
+ {
+ [JsonPropertyName("grantId")]
+ public string GrantId { get; private set; }
+
+ [JsonPropertyName("redirectUrl")]
+ public string RedirectUrl { get; private set; }
+
+ public Oauth2Authorize(
+ string grantId,
+ string redirectUrl
+ )
+ {
+ GrantId = grantId;
+ RedirectUrl = redirectUrl;
+ }
+
+ public static Oauth2Authorize From(Dictionary map) => new Oauth2Authorize(
+ grantId: map["grantId"].ToString(),
+ redirectUrl: map["redirectUrl"].ToString()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "grantId", GrantId },
+ { "redirectUrl", RedirectUrl }
+ };
+ }
+}
diff --git a/Appwrite/Models/Oauth2Consent.cs b/Appwrite/Models/Oauth2Consent.cs
new file mode 100644
index 00000000..86c338b4
--- /dev/null
+++ b/Appwrite/Models/Oauth2Consent.cs
@@ -0,0 +1,96 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class Oauth2Consent
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("userId")]
+ public string UserId { get; private set; }
+
+ [JsonPropertyName("appId")]
+ public string AppId { get; private set; }
+
+ [JsonPropertyName("cimdUrl")]
+ public string CimdUrl { get; private set; }
+
+ [JsonPropertyName("scopes")]
+ public List Scopes { get; private set; }
+
+ [JsonPropertyName("resources")]
+ public List Resources { get; private set; }
+
+ [JsonPropertyName("authorizationDetails")]
+ public string AuthorizationDetails { get; private set; }
+
+ [JsonPropertyName("expire")]
+ public string Expire { get; private set; }
+
+ public Oauth2Consent(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string userId,
+ string appId,
+ string cimdUrl,
+ List scopes,
+ List resources,
+ string authorizationDetails,
+ string expire
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ UserId = userId;
+ AppId = appId;
+ CimdUrl = cimdUrl;
+ Scopes = scopes;
+ Resources = resources;
+ AuthorizationDetails = authorizationDetails;
+ Expire = expire;
+ }
+
+ public static Oauth2Consent From(Dictionary map) => new Oauth2Consent(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ userId: map["userId"].ToString(),
+ appId: map["appId"].ToString(),
+ cimdUrl: map["cimdUrl"].ToString(),
+ scopes: map["scopes"].ConvertToList(),
+ resources: map["resources"].ConvertToList(),
+ authorizationDetails: map["authorizationDetails"].ToString(),
+ expire: map["expire"].ToString()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "$id", Id },
+ { "$createdAt", CreatedAt },
+ { "$updatedAt", UpdatedAt },
+ { "userId", UserId },
+ { "appId", AppId },
+ { "cimdUrl", CimdUrl },
+ { "scopes", Scopes },
+ { "resources", Resources },
+ { "authorizationDetails", AuthorizationDetails },
+ { "expire", Expire }
+ };
+ }
+}
diff --git a/Appwrite/Models/Oauth2ConsentList.cs b/Appwrite/Models/Oauth2ConsentList.cs
new file mode 100644
index 00000000..cdeef9ff
--- /dev/null
+++ b/Appwrite/Models/Oauth2ConsentList.cs
@@ -0,0 +1,40 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class Oauth2ConsentList
+ {
+ [JsonPropertyName("total")]
+ public long Total { get; private set; }
+
+ [JsonPropertyName("consents")]
+ public List Consents { get; private set; }
+
+ public Oauth2ConsentList(
+ long total,
+ List consents
+ )
+ {
+ Total = total;
+ Consents = consents;
+ }
+
+ public static Oauth2ConsentList From(Dictionary map) => new Oauth2ConsentList(
+ total: Convert.ToInt64(map["total"]),
+ consents: map["consents"].ConvertToList>().Select(it => Appwrite.Models.Oauth2Consent.From(map: it)).ToList()
+ );
+
+ public Dictionary ToMap() => new Dictionary()
+ {
+ { "total", Total },
+ { "consents", Consents?.Select(it => it.ToMap()).ToList() }
+ };
+ }
+}
diff --git a/Appwrite/Models/Oauth2ConsentToken.cs b/Appwrite/Models/Oauth2ConsentToken.cs
new file mode 100644
index 00000000..40abe8da
--- /dev/null
+++ b/Appwrite/Models/Oauth2ConsentToken.cs
@@ -0,0 +1,103 @@
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Appwrite.Enums;
+using Appwrite.Extensions;
+
+namespace Appwrite.Models
+{
+ public class Oauth2ConsentToken
+ {
+ [JsonPropertyName("$id")]
+ public string Id { get; private set; }
+
+ [JsonPropertyName("$createdAt")]
+ public string CreatedAt { get; private set; }
+
+ [JsonPropertyName("$updatedAt")]
+ public string UpdatedAt { get; private set; }
+
+ [JsonPropertyName("consentId")]
+ public string ConsentId { get; private set; }
+
+ [JsonPropertyName("userId")]
+ public string UserId { get; private set; }
+
+ [JsonPropertyName("appId")]
+ public string AppId { get; private set; }
+
+ [JsonPropertyName("cimdUrl")]
+ public string CimdUrl { get; private set; }
+
+ [JsonPropertyName("scopes")]
+ public List Scopes { get; private set; }
+
+ [JsonPropertyName("resources")]
+ public List Resources { get; private set; }
+
+ [JsonPropertyName("authorizationDetails")]
+ public string AuthorizationDetails { get; private set; }
+
+ [JsonPropertyName("expire")]
+ public string Expire { get; private set; }
+
+ public Oauth2ConsentToken(
+ string id,
+ string createdAt,
+ string updatedAt,
+ string consentId,
+ string userId,
+ string appId,
+ string cimdUrl,
+ List scopes,
+ List resources,
+ string authorizationDetails,
+ string expire
+ )
+ {
+ Id = id;
+ CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
+ ConsentId = consentId;
+ UserId = userId;
+ AppId = appId;
+ CimdUrl = cimdUrl;
+ Scopes = scopes;
+ Resources = resources;
+ AuthorizationDetails = authorizationDetails;
+ Expire = expire;
+ }
+
+ public static Oauth2ConsentToken From(Dictionary map) => new Oauth2ConsentToken(
+ id: map["$id"].ToString(),
+ createdAt: map["$createdAt"].ToString(),
+ updatedAt: map["$updatedAt"].ToString(),
+ consentId: map["consentId"].ToString(),
+ userId: map["userId"].ToString(),
+ appId: map["appId"].ToString(),
+ cimdUrl: map["cimdUrl"].ToString(),
+ scopes: map["scopes"].ConvertToList(),
+ resources: map["resources"].ConvertToList(),
+ authorizationDetails: map["authorizationDetails"].ToString(),
+ expire: map["expire"].ToString()
+ );
+
+ public Dictionary ToMap() => new Dictionary