toJson method

Map toJson()

Implementation

Map toJson() {
  var map = {};
  if (fullJson || availableAt != null) {
    map['availableAt'] = availableAt?.toUtc().toString();
  }
  if (fullJson || expiresAt != null) {
    map['expiresAt'] = expiresAt?.toUtc().toString();
  }
  if (fullJson || refreshAt != null) {
    map['refreshAt'] = refreshAt?.toUtc().toString();
  }
  if (fullJson || createdAt != null) {
    map[AtConstants.createdAt] = createdAt?.toUtc().toString();
  }
  if (fullJson || updatedAt != null) {
    map[AtConstants.updatedAt] = updatedAt?.toUtc().toString();
  }
  if (fullJson || isPublic) {
    map['isPublic'] = isPublic;
  }
  if (fullJson || ttl != null) {
    map[AtConstants.ttl] = ttl;
  }
  if (fullJson || ttb != null) {
    map[AtConstants.ttb] = ttb;
  }
  if (fullJson || ttr != null) {
    map[AtConstants.ttr] = ttr;
  }
  if (fullJson || ccd != null) {
    map[AtConstants.ccd] = ccd;
  }
  if (fullJson || isBinary) {
    map[AtConstants.isBinary] = isBinary;
  }
  if (fullJson || isEncrypted) {
    map[AtConstants.isEncrypted] = isEncrypted;
  }
  if (fullJson || dataSignature != null) {
    map[AtConstants.publicDataSignature] = dataSignature;
  }
  if (fullJson || sharedKeyStatus != null) {
    map[AtConstants.sharedKeyStatus] = sharedKeyStatus;
  }
  if (fullJson || sharedKeyEnc != null) {
    map[AtConstants.sharedKeyEncrypted] = sharedKeyEnc;
  }
  // ignore: deprecated_member_use_from_same_package
  if (fullJson || pubKeyCS != null) {
    // ignore: deprecated_member_use_from_same_package
    map[AtConstants.sharedWithPublicKeyCheckSum] = pubKeyCS;
  }
  if (fullJson || pubKeyHash != null) {
    map[AtConstants.sharedWithPublicKeyHash] = pubKeyHash?.toJson();
  }
  if (fullJson || encoding != null) {
    map[AtConstants.encoding] = encoding;
  }
  if (fullJson || encKeyName != null) {
    map[AtConstants.encryptingKeyName] = encKeyName;
  }
  if (fullJson || encAlgo != null) {
    map[AtConstants.encryptingAlgo] = encAlgo;
  }
  if (fullJson || ivNonce != null) {
    map[AtConstants.ivOrNonce] = ivNonce;
  }
  if (fullJson || skeEncKeyName != null) {
    map[AtConstants.sharedKeyEncryptedEncryptingKeyName] = skeEncKeyName;
  }
  if (fullJson || skeEncAlgo != null) {
    map[AtConstants.sharedKeyEncryptedEncryptingAlgo] = skeEncAlgo;
  }
  if (fullJson || namespaceAware) {
    map['namespaceAware'] = namespaceAware;
  }
  if (fullJson || isCached) {
    map['isCached'] = isCached;
  }
  return map;
}