UNPKG

react-native-scanbot-barcode-scanner-sdk

Version:

Scanbot Barcode Scanner SDK React Native Plugin for Android and iOS

106 lines (95 loc) 3.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SdkConfiguration = exports.FileEncryptionModeValues = void 0; /// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from xplatforms/schemas/barcode_scanner/SdkConfiguration.yaml /** Initialize configuration for the Scanbot SDK. */ class SdkConfiguration { /** Your license key for the Scanbot SDK. See the "License Key" section below. */ /** Optional boolean flag to enable logging. See the "Logging" section below. Default is false */ loggingEnabled = false; /** Optional boolean flag that enables Scanbot SDK Core native logging (default is false, Android only). Default is false */ 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. */ storageBaseDirectory = null; /** Optional file encryption mode, 'AES128' or 'AES256'. */ fileEncryptionMode = null; /** Optional file encryption password. Refer to the section "Storage Encryption" for more details. */ 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 */ 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 */ 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 */ allowXnnpackAcceleration = true; /** @param source {@displayType `DeepPartial<SdkConfiguration>`} */ constructor(source = {}) { 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; } } } /** File encryption mode. - `AES128`: AES 128-bit encryption. - `AES256`: AES 256-bit encryption. */ exports.SdkConfiguration = SdkConfiguration; /** @hidden */ const FileEncryptionModeValues = exports.FileEncryptionModeValues = ['AES128', 'AES256']; //# sourceMappingURL=SdkConfiguration.js.map