factory CaptureOption.fromJson(Map<String, dynamic> json) { return CaptureOption( captureMode: (json['CaptureMode'] as String).toCaptureMode(), ); }