toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'requestId': requestId,
      'requestType': requestType,
      'requesterId': requesterId,
      'description': description,
      if (context.isNotEmpty) 'context': context,
      'approverIds': approverIds,
      if (timeout != null) 'timeoutSeconds': timeout!.inSeconds,
      'policy': policy.name,
      'priority': priority.name,
      if (entityId != null) 'entityId': entityId,
      if (metadata.isNotEmpty) 'metadata': metadata,
    };