react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
56 lines (49 loc) • 1.7 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ToJsonConfiguration = exports.ImageSerializationModeValues = void 0;
var _utils = require("../../utils/utils");
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from core/schemas/JSONSerializationTypes.yaml
/**
Configuration used to serialize an object to json.
*/
class ToJsonConfiguration extends _utils.PartiallyConstructible {
/**
Serialize images in the object to json. If false, then fields that contain images are not serialized.
Default is true
*/
serializeImages = true;
/**
Image serialization mode.
Default is REFERENCE
*/
imageSerializationMode = 'REFERENCE';
/** @param source {@displayType `DeepPartial<ToJsonConfiguration>`} */
constructor(source = {}) {
super();
if (source.serializeImages !== undefined) {
this.serializeImages = source.serializeImages;
}
if (source.imageSerializationMode !== undefined) {
this.imageSerializationMode = source.imageSerializationMode;
}
}
serialize(config = new ToJsonConfiguration()) {
return {
serializeImages: this.serializeImages,
imageSerializationMode: this.imageSerializationMode
};
}
}
/**
Image serialization mode. Applicable only when serializeImages is true.
- `REFERENCE`:
Images are serialized as references to native resources.
- `BUFFER`:
Images are serialized as base64 encoded buffers.
*/
exports.ToJsonConfiguration = ToJsonConfiguration;
const ImageSerializationModeValues = exports.ImageSerializationModeValues = ['REFERENCE', 'BUFFER'];
//# sourceMappingURL=JsonSerializationTypes.js.map