capacitor-plugin-scanbot-barcode-scanner-sdk
Version:
Scanbot Barcode Scanner SDK for Capacitor
90 lines (85 loc) • 3.82 kB
JavaScript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from xplatforms/schemas/barcode_scanner/SdkConfiguration.yaml
/**
Initialize configuration for the Scanbot SDK.
*/
export class SdkConfiguration {
/** @param source {@displayType `DeepPartial<SdkConfiguration>`} */
constructor(source = {}) {
/**
Optional boolean flag to enable logging. See the "Logging" section below.
Default is false
*/
this.loggingEnabled = false;
/**
Optional boolean flag that enables Scanbot SDK Core native logging (default is false, Android only).
Default is false
*/
this.enableNativeLogging = false;
/**
Optional directory as file URI to override the default storage base directory of the Scanbot SDK. Refer to the section "Storage" for more details.
*/
this.storageBaseDirectory = null;
/**
Optional file encryption mode, 'AES128' or 'AES256'.
*/
this.fileEncryptionMode = null;
/**
Optional file encryption password. Refer to the section "Storage Encryption" for more details.
*/
this.fileEncryptionPassword = null;
/**
If set to `true`, PerformanceHintApi is enabled, which lead to increase of performance due of increased use of top CPU cores (Android only), also increase battery usage.
Default is true
*/
this.performanceHintApi = true;
/**
If set to `true`, GPU Acceleration will be enabled for Barcode Scanner, Document Scanner and Generic Document Recognizer (Android only).
Default is true
*/
this.allowGpuAcceleration = true;
/**
Enables/disables XNNPACK acceleration for TensorFlow ML models, which provides highly optimized implementations of floating-point neural network operators (Android only).
Default is true
*/
this.allowXnnpackAcceleration = true;
if (source.licenseKey !== undefined) {
this.licenseKey = source.licenseKey;
}
else {
throw new Error('licenseKey must be present in constructor argument');
}
if (source.loggingEnabled !== undefined) {
this.loggingEnabled = source.loggingEnabled;
}
if (source.enableNativeLogging !== undefined) {
this.enableNativeLogging = source.enableNativeLogging;
}
if (source.storageBaseDirectory !== undefined) {
this.storageBaseDirectory = source.storageBaseDirectory != null ? source.storageBaseDirectory : null;
}
if (source.fileEncryptionMode !== undefined) {
this.fileEncryptionMode =
source.fileEncryptionMode != null
? FileEncryptionModeValues.includes(source.fileEncryptionMode)
? source.fileEncryptionMode
: null
: null;
}
if (source.fileEncryptionPassword !== undefined) {
this.fileEncryptionPassword = source.fileEncryptionPassword != null ? source.fileEncryptionPassword : null;
}
if (source.performanceHintApi !== undefined) {
this.performanceHintApi = source.performanceHintApi;
}
if (source.allowGpuAcceleration !== undefined) {
this.allowGpuAcceleration = source.allowGpuAcceleration;
}
if (source.allowXnnpackAcceleration !== undefined) {
this.allowXnnpackAcceleration = source.allowXnnpackAcceleration;
}
}
}
/** @hidden */
export const FileEncryptionModeValues = ['AES128', 'AES256'];
//# sourceMappingURL=SdkConfiguration.js.map