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