core.Map<core.String, core.dynamic> toJson() => { if (commandType != null) 'commandType': commandType!, if (payload != null) 'payload': payload!, };