capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
40 lines • 1.49 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/document/CroppingResult.yaml
import { ToJsonConfiguration } from '../../utils/json/JsonSerializationTypes';
import { PartiallyConstructible } from '../../utils/utils';
/**
Configuration of the cropping result.
*/
export class CroppingResult extends PartiallyConstructible {
/** @param source {@displayType `DeepPartial<CroppingResult>`} */
constructor(source = {}) {
super();
/**
The error message if a problem occurred.
*/
this.errorMessage = null;
if (source.documentUuid !== undefined) {
this.documentUuid = source.documentUuid;
}
else {
throw new Error('documentUuid must be present in constructor argument');
}
if (source.pageUuid !== undefined) {
this.pageUuid = source.pageUuid;
}
else {
throw new Error('pageUuid must be present in constructor argument');
}
if (source.errorMessage !== undefined) {
this.errorMessage = source.errorMessage != null ? source.errorMessage : null;
}
}
serialize(config = new ToJsonConfiguration()) {
return {
documentUuid: this.documentUuid,
pageUuid: this.pageUuid,
errorMessage: this.errorMessage != null ? this.errorMessage : null,
};
}
}
//# sourceMappingURL=CroppingResult.js.map