Input.fromJson constructor

Input.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Input.fromJson(Map<String, dynamic> json) {
  return Input(
    audioSelectorGroups:
        (json['audioSelectorGroups'] as Map<String, dynamic>?)?.map((k, e) =>
            MapEntry(
                k, AudioSelectorGroup.fromJson(e as Map<String, dynamic>))),
    audioSelectors: (json['audioSelectors'] as Map<String, dynamic>?)?.map(
        (k, e) =>
            MapEntry(k, AudioSelector.fromJson(e as Map<String, dynamic>))),
    captionSelectors: (json['captionSelectors'] as Map<String, dynamic>?)
        ?.map((k, e) =>
            MapEntry(k, CaptionSelector.fromJson(e as Map<String, dynamic>))),
    crop: json['crop'] != null
        ? Rectangle.fromJson(json['crop'] as Map<String, dynamic>)
        : null,
    deblockFilter: (json['deblockFilter'] as String?)?.toInputDeblockFilter(),
    decryptionSettings: json['decryptionSettings'] != null
        ? InputDecryptionSettings.fromJson(
            json['decryptionSettings'] as Map<String, dynamic>)
        : null,
    denoiseFilter: (json['denoiseFilter'] as String?)?.toInputDenoiseFilter(),
    fileInput: json['fileInput'] as String?,
    filterEnable: (json['filterEnable'] as String?)?.toInputFilterEnable(),
    filterStrength: json['filterStrength'] as int?,
    imageInserter: json['imageInserter'] != null
        ? ImageInserter.fromJson(
            json['imageInserter'] as Map<String, dynamic>)
        : null,
    inputClippings: (json['inputClippings'] as List?)
        ?.whereNotNull()
        .map((e) => InputClipping.fromJson(e as Map<String, dynamic>))
        .toList(),
    inputScanType: (json['inputScanType'] as String?)?.toInputScanType(),
    position: json['position'] != null
        ? Rectangle.fromJson(json['position'] as Map<String, dynamic>)
        : null,
    programNumber: json['programNumber'] as int?,
    psiControl: (json['psiControl'] as String?)?.toInputPsiControl(),
    supplementalImps: (json['supplementalImps'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    timecodeSource:
        (json['timecodeSource'] as String?)?.toInputTimecodeSource(),
    timecodeStart: json['timecodeStart'] as String?,
    videoSelector: json['videoSelector'] != null
        ? VideoSelector.fromJson(
            json['videoSelector'] as Map<String, dynamic>)
        : null,
  );
}