Project.fromMap constructor

Project.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Project.fromMap(Map<String, dynamic> map) {
  return Project(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    name: map['name'].toString(),
    description: map['description'].toString(),
    teamId: map['teamId'].toString(),
    logo: map['logo'].toString(),
    url: map['url'].toString(),
    legalName: map['legalName'].toString(),
    legalCountry: map['legalCountry'].toString(),
    legalState: map['legalState'].toString(),
    legalCity: map['legalCity'].toString(),
    legalAddress: map['legalAddress'].toString(),
    legalTaxId: map['legalTaxId'].toString(),
    authDuration: map['authDuration'],
    authLimit: map['authLimit'],
    authSessionsLimit: map['authSessionsLimit'],
    authPasswordHistory: map['authPasswordHistory'],
    authPasswordDictionary: map['authPasswordDictionary'],
    authPersonalDataCheck: map['authPersonalDataCheck'],
    authDisposableEmails: map['authDisposableEmails'],
    authCanonicalEmails: map['authCanonicalEmails'],
    authFreeEmails: map['authFreeEmails'],
    authMockNumbers: List<MockNumber>.from(
        map['authMockNumbers'].map((p) => MockNumber.fromMap(p))),
    authSessionAlerts: map['authSessionAlerts'],
    authMembershipsUserName: map['authMembershipsUserName'],
    authMembershipsUserEmail: map['authMembershipsUserEmail'],
    authMembershipsMfa: map['authMembershipsMfa'],
    authInvalidateSessions: map['authInvalidateSessions'],
    oAuthProviders: List<AuthProvider>.from(
        map['oAuthProviders'].map((p) => AuthProvider.fromMap(p))),
    platforms: List.from(map['platforms'] ?? []),
    webhooks:
        List<Webhook>.from(map['webhooks'].map((p) => Webhook.fromMap(p))),
    keys: List<Key>.from(map['keys'].map((p) => Key.fromMap(p))),
    devKeys: List<DevKey>.from(map['devKeys'].map((p) => DevKey.fromMap(p))),
    smtpEnabled: map['smtpEnabled'],
    smtpSenderName: map['smtpSenderName'].toString(),
    smtpSenderEmail: map['smtpSenderEmail'].toString(),
    smtpReplyTo: map['smtpReplyTo'].toString(),
    smtpHost: map['smtpHost'].toString(),
    smtpPort: map['smtpPort'],
    smtpUsername: map['smtpUsername'].toString(),
    smtpPassword: map['smtpPassword'].toString(),
    smtpSecure: map['smtpSecure'].toString(),
    pingCount: map['pingCount'],
    pingedAt: map['pingedAt'].toString(),
    labels: List.from(map['labels'] ?? []),
    status: map['status'].toString(),
    authEmailPassword: map['authEmailPassword'],
    authUsersAuthMagicURL: map['authUsersAuthMagicURL'],
    authEmailOtp: map['authEmailOtp'],
    authAnonymous: map['authAnonymous'],
    authInvites: map['authInvites'],
    authJWT: map['authJWT'],
    authPhone: map['authPhone'],
    serviceStatusForAccount: map['serviceStatusForAccount'],
    serviceStatusForAvatars: map['serviceStatusForAvatars'],
    serviceStatusForDatabases: map['serviceStatusForDatabases'],
    serviceStatusForTablesdb: map['serviceStatusForTablesdb'],
    serviceStatusForLocale: map['serviceStatusForLocale'],
    serviceStatusForHealth: map['serviceStatusForHealth'],
    serviceStatusForProject: map['serviceStatusForProject'],
    serviceStatusForStorage: map['serviceStatusForStorage'],
    serviceStatusForTeams: map['serviceStatusForTeams'],
    serviceStatusForUsers: map['serviceStatusForUsers'],
    serviceStatusForVcs: map['serviceStatusForVcs'],
    serviceStatusForSites: map['serviceStatusForSites'],
    serviceStatusForFunctions: map['serviceStatusForFunctions'],
    serviceStatusForProxy: map['serviceStatusForProxy'],
    serviceStatusForGraphql: map['serviceStatusForGraphql'],
    serviceStatusForMigrations: map['serviceStatusForMigrations'],
    serviceStatusForMessaging: map['serviceStatusForMessaging'],
    protocolStatusForRest: map['protocolStatusForRest'],
    protocolStatusForGraphql: map['protocolStatusForGraphql'],
    protocolStatusForWebsocket: map['protocolStatusForWebsocket'],
    region: map['region'].toString(),
    billingLimits: BillingLimits.fromMap(map['billingLimits']),
    blocks: List<Block>.from(map['blocks'].map((p) => Block.fromMap(p))),
    consoleAccessedAt: map['consoleAccessedAt'].toString(),
  );
}