InputPassportElementErrorSource.fromJson constructor
a InputPassportElementErrorSource return type can be :
- InputPassportElementErrorSourceUnspecified
- InputPassportElementErrorSourceDataField
- InputPassportElementErrorSourceFrontSide
- InputPassportElementErrorSourceReverseSide
- InputPassportElementErrorSourceSelfie
- InputPassportElementErrorSourceTranslationFile
- InputPassportElementErrorSourceTranslationFiles
- InputPassportElementErrorSourceFile
- InputPassportElementErrorSourceFiles
Implementation
factory InputPassportElementErrorSource.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case InputPassportElementErrorSourceUnspecified.CONSTRUCTOR:
return InputPassportElementErrorSourceUnspecified.fromJson(json);
case InputPassportElementErrorSourceDataField.CONSTRUCTOR:
return InputPassportElementErrorSourceDataField.fromJson(json);
case InputPassportElementErrorSourceFrontSide.CONSTRUCTOR:
return InputPassportElementErrorSourceFrontSide.fromJson(json);
case InputPassportElementErrorSourceReverseSide.CONSTRUCTOR:
return InputPassportElementErrorSourceReverseSide.fromJson(json);
case InputPassportElementErrorSourceSelfie.CONSTRUCTOR:
return InputPassportElementErrorSourceSelfie.fromJson(json);
case InputPassportElementErrorSourceTranslationFile.CONSTRUCTOR:
return InputPassportElementErrorSourceTranslationFile.fromJson(json);
case InputPassportElementErrorSourceTranslationFiles.CONSTRUCTOR:
return InputPassportElementErrorSourceTranslationFiles.fromJson(json);
case InputPassportElementErrorSourceFile.CONSTRUCTOR:
return InputPassportElementErrorSourceFile.fromJson(json);
case InputPassportElementErrorSourceFiles.CONSTRUCTOR:
return InputPassportElementErrorSourceFiles.fromJson(json);
default:
return const InputPassportElementErrorSource();
}
}