Use to encode Message to json
Map<String, String?> toJson() => { 'type': type.toStringValue(), 'payload': payload, 'responseToken': responseToken, };