react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
29 lines (26 loc) • 1.1 kB
text/typescript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/barcode/BarcodeUseCase.yaml
import { FindAndPickScanningMode } from '../../ui_v2/barcode/FindAndPickScanningModeUseCase';
import { MultipleScanningMode } from '../../ui_v2/barcode/MultipleScanningModeUseCase';
import { SingleScanningMode } from '../../ui_v2/barcode/SingleScanningModeUseCase';
/**
Configuration of the barcode scanner screen's behavior.
*/
export type BarcodeUseCase = SingleScanningMode | MultipleScanningMode | FindAndPickScanningMode;
/** @internal */
export namespace BarcodeUseCase {
/** @internal */
export function From(source: { [key: string]: any }): BarcodeUseCase {
const _type = source._type;
switch (_type) {
case 'SingleScanningMode':
return new SingleScanningMode(source);
case 'MultipleScanningMode':
return new MultipleScanningMode(source);
case 'FindAndPickScanningMode':
return new FindAndPickScanningMode(source);
default:
throw `Unknown child class name: ${_type}`;
}
}
}