UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

58 lines (54 loc) 1.66 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/mrz/MRZScannerUIResult.yaml import { GenericDocument } from '../../documents/GenericDocument'; import { ToJsonConfiguration } from '../../utils/json/JsonSerializationTypes'; import { PartiallyConstructible } from '../../utils/utils'; /** Configuration of the MRZ RTU UI result. */ export class MrzScannerUiResult extends PartiallyConstructible { /** Raw string value of MRZ. */ /** Generic document containing MRZ data. */ /** @param source {@displayType `DeepPartial<MrzScannerUiResult>`} */ constructor(source = {}) { super(); if (source.rawMRZ !== undefined) { this.rawMRZ = source.rawMRZ; } else { throw new Error('rawMRZ must be present in constructor argument'); } if (source.mrzDocument !== undefined) { this.mrzDocument = source.mrzDocument != null ? new GenericDocument(source.mrzDocument) : null; } else { throw new Error('mrzDocument must be present in constructor argument'); } } async serialize(config = new ToJsonConfiguration()) { return { rawMRZ: this.rawMRZ, mrzDocument: this.mrzDocument != null ? await this.mrzDocument.serialize(config) : null }; } _released = false; release() { if (this._released) { return; } { if (this.mrzDocument != null) { this.mrzDocument.release(); } } this._released = true; } async encodeImages() { if (this.mrzDocument != null) { await this.mrzDocument.encodeImages(); } } } //# sourceMappingURL=MRZScannerUIResult.js.map