toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.object != null) {
json[r'object'] = this.object;
} else {
json[r'object'] = null;
}
if (this.externalId != null) {
json[r'external_id'] = this.externalId;
} else {
json[r'external_id'] = null;
}
if (this.primaryEmailAddressId != null) {
json[r'primary_email_address_id'] = this.primaryEmailAddressId;
} else {
json[r'primary_email_address_id'] = null;
}
if (this.primaryPhoneNumberId != null) {
json[r'primary_phone_number_id'] = this.primaryPhoneNumberId;
} else {
json[r'primary_phone_number_id'] = null;
}
if (this.primaryWeb3WalletId != null) {
json[r'primary_web3_wallet_id'] = this.primaryWeb3WalletId;
} else {
json[r'primary_web3_wallet_id'] = null;
}
if (this.username != null) {
json[r'username'] = this.username;
} else {
json[r'username'] = null;
}
if (this.firstName != null) {
json[r'first_name'] = this.firstName;
} else {
json[r'first_name'] = null;
}
if (this.lastName != null) {
json[r'last_name'] = this.lastName;
} else {
json[r'last_name'] = null;
}
if (this.profileImageUrl != null) {
json[r'profile_image_url'] = this.profileImageUrl;
} else {
json[r'profile_image_url'] = null;
}
if (this.imageUrl != null) {
json[r'image_url'] = this.imageUrl;
} else {
json[r'image_url'] = null;
}
if (this.hasImage != null) {
json[r'has_image'] = this.hasImage;
} else {
json[r'has_image'] = null;
}
json[r'public_metadata'] = this.publicMetadata;
if (this.privateMetadata != null) {
json[r'private_metadata'] = this.privateMetadata;
} else {
json[r'private_metadata'] = null;
}
json[r'unsafe_metadata'] = this.unsafeMetadata;
json[r'email_addresses'] = this.emailAddresses;
json[r'phone_numbers'] = this.phoneNumbers;
json[r'web3_wallets'] = this.web3Wallets;
json[r'passkeys'] = this.passkeys;
if (this.passwordEnabled != null) {
json[r'password_enabled'] = this.passwordEnabled;
} else {
json[r'password_enabled'] = null;
}
if (this.twoFactorEnabled != null) {
json[r'two_factor_enabled'] = this.twoFactorEnabled;
} else {
json[r'two_factor_enabled'] = null;
}
if (this.totpEnabled != null) {
json[r'totp_enabled'] = this.totpEnabled;
} else {
json[r'totp_enabled'] = null;
}
if (this.backupCodeEnabled != null) {
json[r'backup_code_enabled'] = this.backupCodeEnabled;
} else {
json[r'backup_code_enabled'] = null;
}
if (this.mfaEnabledAt != null) {
json[r'mfa_enabled_at'] = this.mfaEnabledAt;
} else {
json[r'mfa_enabled_at'] = null;
}
if (this.mfaDisabledAt != null) {
json[r'mfa_disabled_at'] = this.mfaDisabledAt;
} else {
json[r'mfa_disabled_at'] = null;
}
json[r'external_accounts'] = this.externalAccounts;
json[r'saml_accounts'] = this.samlAccounts;
if (this.lastSignInAt != null) {
json[r'last_sign_in_at'] = this.lastSignInAt;
} else {
json[r'last_sign_in_at'] = null;
}
if (this.banned != null) {
json[r'banned'] = this.banned;
} else {
json[r'banned'] = null;
}
if (this.locked != null) {
json[r'locked'] = this.locked;
} else {
json[r'locked'] = null;
}
if (this.lockoutExpiresInSeconds != null) {
json[r'lockout_expires_in_seconds'] = this.lockoutExpiresInSeconds;
} else {
json[r'lockout_expires_in_seconds'] = null;
}
if (this.verificationAttemptsRemaining != null) {
json[r'verification_attempts_remaining'] =
this.verificationAttemptsRemaining;
} else {
json[r'verification_attempts_remaining'] = null;
}
if (this.updatedAt != null) {
json[r'updated_at'] = this.updatedAt;
} else {
json[r'updated_at'] = null;
}
if (this.createdAt != null) {
json[r'created_at'] = this.createdAt;
} else {
json[r'created_at'] = null;
}
if (this.deleteSelfEnabled != null) {
json[r'delete_self_enabled'] = this.deleteSelfEnabled;
} else {
json[r'delete_self_enabled'] = null;
}
if (this.createOrganizationEnabled != null) {
json[r'create_organization_enabled'] = this.createOrganizationEnabled;
} else {
json[r'create_organization_enabled'] = null;
}
if (this.createOrganizationsLimit != null) {
json[r'create_organizations_limit'] = this.createOrganizationsLimit;
} else {
json[r'create_organizations_limit'] = null;
}
if (this.lastActiveAt != null) {
json[r'last_active_at'] = this.lastActiveAt;
} else {
json[r'last_active_at'] = null;
}
if (this.legalAcceptedAt != null) {
json[r'legal_accepted_at'] = this.legalAcceptedAt;
} else {
json[r'legal_accepted_at'] = null;
}
return json;
}