ScannerVision Web Server

<back to all web services

ShowScanSettings

Requires Authentication
The following routes are available for this service:
All Verbs/{Brand}/showscansettings/{TemplateGuid}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

enum Brand
{
    Desktop,
    Hp,
    Kyocera,
    NeaScan,
    Samsung,
    FujiXerox,
    Ta,
    Utax,
    Epson,
    ScanFront400,
    Sharp,
    Ricoh,
    FujiFilm,
}

class DtoBase implements IConvertible
{
    Brand? Brand;

    DtoBase({this.Brand});
    DtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Brand = JsonConverters.fromJson(json['Brand'],'Brand',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Brand': JsonConverters.toJson(Brand,'Brand',context!)
    };

    getTypeName() => "DtoBase";
    TypeContext? context = _ctx;
}

class RequestBase extends DtoBase implements IConvertible
{
    RequestBase();
    RequestBase.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "RequestBase";
    TypeContext? context = _ctx;
}

class ShowScanSettings extends RequestBase implements IConvertible
{
    String? TemplateGuid;

    ShowScanSettings({this.TemplateGuid});
    ShowScanSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        TemplateGuid = json['TemplateGuid'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'TemplateGuid': TemplateGuid
    });

    getTypeName() => "ShowScanSettings";
    TypeContext? context = _ctx;
}

class ResponseBase extends DtoBase implements IConvertible
{
    String? SelectedUiLanguage;
    String? svSession;
    String? Title;
    String? PageTip;
    bool? NewBrowser;
    bool? ScanFront400TA;
    bool? ScanFront400UTAX;

    ResponseBase({this.SelectedUiLanguage,this.svSession,this.Title,this.PageTip,this.NewBrowser,this.ScanFront400TA,this.ScanFront400UTAX});
    ResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        SelectedUiLanguage = json['SelectedUiLanguage'];
        svSession = json['svSession'];
        Title = json['Title'];
        PageTip = json['PageTip'];
        NewBrowser = json['NewBrowser'];
        ScanFront400TA = json['ScanFront400TA'];
        ScanFront400UTAX = json['ScanFront400UTAX'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'SelectedUiLanguage': SelectedUiLanguage,
        'svSession': svSession,
        'Title': Title,
        'PageTip': PageTip,
        'NewBrowser': NewBrowser,
        'ScanFront400TA': ScanFront400TA,
        'ScanFront400UTAX': ScanFront400UTAX
    });

    getTypeName() => "ResponseBase";
    TypeContext? context = _ctx;
}

abstract class ITemplateModificationInfo
{
    String? Guid;
    DateTime? TemplateModificationDateTime;
    DateTime? IconModificationDateTime;
}

abstract class IClientQuestion extends ITemplateQuestion
{
    String? QuestionGuid;
    String? ValueDisplayed;
    String? ValueReturned;
    bool? Answered;
    bool? RegexMatches;
    String? RegexHint;
}

enum TemplateType
{
    Workflow,
    FreeForm,
}

enum TemplateScheduleType
{
    Interval,
    Fixed,
}

abstract class ITemplateSchedule extends IInterface
{
    Duration? Time;
    Duration? EndTime;
    bool? NoEndTime;
    TemplateScheduleType? Type;
}

abstract class ICredentials extends IInterface
{
    String? Username;
    String? Password;
}

abstract class IRejection
{
    int? RejectAfter;
    String? RejectionPath;
    ICredentials? ShareCredentials;
}

abstract class IBadDocumentRejection extends IStatus
{
    String? RejectionPath;
    ICredentials? ShareCredentials;
}

enum PdfLoadResolution
{
    Default,
    Dpi100,
    Dpi150,
    Dpi200,
    Dpi300,
    Dpi400,
    Dpi500,
    Dpi600,
}

abstract class IGeneral extends IInterface
{
    String? Name;
    String? Description;
    String? Icon;
    ITemplateSchedule? Schedule;
    IRejection? Rejection;
    IBadDocumentRejection? BadDocumentRejection;
    PdfLoadResolution? PdfLoadResolution;
}

abstract class ICaptureSource extends IStatus
{
}

abstract class ICapture extends IInterface
{
    ReadOnlyCollection<ICaptureSource>? CaptureSources;
}

abstract class IStringMetadata extends IMetadata
{
    bool? IsSecure;
    String? SampleValue;
    String? Value;
}

abstract class IXmlMetadataImportTagMapping extends IInterface
{
    String? XPathExpression;
    IStringMetadata? Metadata;
}

abstract class IXmlMetadataImportNamespaceMapping extends IInterface
{
    String? Prefix;
    String? Name;
}

abstract class IXmlMetadataImport extends IStatus
{
    String? SampleDocumentName;
    ReadOnlyCollection<IXmlMetadataImportTagMapping>? TagMappings;
    ReadOnlyCollection<IXmlMetadataImportNamespaceMapping>? NamespaceMappings;
}

enum NotificationType
{
    FailureOnly,
    SuccessOnly,
    Always,
}

abstract class INotification extends IStatus
{
    String? Description;
    String? To;
    String? Subject;
    String? Body;
    String? Cc;
    String? Bcc;
    NotificationType? NotificationType;
}

abstract class INotifications extends IStatus
{
    ReadOnlyCollection<INotification>? Notifications;
}

abstract class IValidationError
{
    String? Property;
    String? ErrorMessage;
}

abstract class IValidationErrors
{
    ReadOnlyCollection<IValidationError>? Errors;
}

abstract class IValidator
{
    IValidationErrors? ValidationErrors;
    bool? IsValid;
}

abstract class ITemplate extends IStatus
{
    String? TemplateVersion;
    String? ScannerVisionVersion;
    String? Guid;
    String? BeginScript;
    String? EndScript;
    TemplateType? TemplateType;
    IGeneral? General;
    ICapture? Capture;
    IXmlMetadataImport? XmlMetadataImport;
    INotifications? Notifications;
    IValidator? Validator;
}

abstract class IClientTemplate
{
    String? Description;
    Uint8List? Icon;
    ITemplateModificationInfo? ModificationInfo;
    String? Name;
    List<IClientQuestion>? Questions;
    ITemplate? Template;
    String? TemplateGuid;
}

class ScanResponseBase extends ResponseBase implements IConvertible
{
    IClientTemplate? Template;
    List<IClientQuestion>? GlobalQuestions;
    bool? CanEnableScanButton;

    ScanResponseBase({this.Template,this.GlobalQuestions,this.CanEnableScanButton});
    ScanResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Template = JsonConverters.fromJson(json['Template'],'IClientTemplate',context!);
        GlobalQuestions = JsonConverters.fromJson(json['GlobalQuestions'],'List<IClientQuestion>',context!);
        CanEnableScanButton = json['CanEnableScanButton'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Template': JsonConverters.toJson(Template,'IClientTemplate',context!),
        'GlobalQuestions': JsonConverters.toJson(GlobalQuestions,'List<IClientQuestion>',context!),
        'CanEnableScanButton': CanEnableScanButton
    });

    getTypeName() => "ScanResponseBase";
    TypeContext? context = _ctx;
}

class GetTemplateResponse extends ScanResponseBase implements IConvertible
{
    String? ServerAddress;
    int? ServerPort;

    GetTemplateResponse({this.ServerAddress,this.ServerPort});
    GetTemplateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ServerAddress = json['ServerAddress'];
        ServerPort = json['ServerPort'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ServerAddress': ServerAddress,
        'ServerPort': ServerPort
    });

    getTypeName() => "GetTemplateResponse";
    TypeContext? context = _ctx;
}

enum ScanColour
{
    BlackAndWhite,
    Greyscale,
    Colour,
    Auto,
}

enum ScanOrientation
{
    Portrait,
    Landscape,
}

enum ScanResolution
{
    Dpi100,
    Dpi200,
    Dpi300,
    Dpi400,
    Dpi600,
}

enum ScanSide
{
    Simplex,
    Duplex,
}

enum ScanSize
{
    Auto,
    A3,
    A4,
    A5,
    B4,
    B5,
    Letter,
    Legal,
    Executive,
    Folio,
    AutoLong,
    A4R,
    A5R,
    A6R,
    B6R,
}

enum ScanSource
{
    Adf,
    Glass,
    Auto,
}

enum ScanType
{
    Text,
    Photo,
    TextAndPhoto,
}

enum BoolSetting
{
    True,
    False,
}

abstract class IScanSettings
{
    IScanSetting<ScanColour>? Colour;
    IScanSetting<ScanOrientation>? Orientation;
    IScanSetting<ScanResolution>? Resolution;
    IScanSetting<ScanSide>? Sides;
    IScanSetting<ScanSize>? Size;
    IScanSetting<ScanSource>? Source;
    IScanSetting<ScanType>? Type;
    IScanSetting<BoolSetting>? ScanContinuously;
    IScanSetting<BoolSetting>? MixedSizes;
}

class GetScanSettingsResponse extends GetTemplateResponse implements IConvertible
{
    IScanSettings? ScanSettings;
    String? ColourLabel;
    String? OrientationLabel;
    String? ResolutionLabel;
    String? SidesLabel;
    String? SizeLabel;
    String? SourceLabel;
    String? TypeLabel;
    String? ScanContinuouslyLabel;
    String? MixedSizesLabel;

    GetScanSettingsResponse({this.ScanSettings,this.ColourLabel,this.OrientationLabel,this.ResolutionLabel,this.SidesLabel,this.SizeLabel,this.SourceLabel,this.TypeLabel,this.ScanContinuouslyLabel,this.MixedSizesLabel});
    GetScanSettingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ScanSettings = JsonConverters.fromJson(json['ScanSettings'],'IScanSettings',context!);
        ColourLabel = json['ColourLabel'];
        OrientationLabel = json['OrientationLabel'];
        ResolutionLabel = json['ResolutionLabel'];
        SidesLabel = json['SidesLabel'];
        SizeLabel = json['SizeLabel'];
        SourceLabel = json['SourceLabel'];
        TypeLabel = json['TypeLabel'];
        ScanContinuouslyLabel = json['ScanContinuouslyLabel'];
        MixedSizesLabel = json['MixedSizesLabel'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ScanSettings': JsonConverters.toJson(ScanSettings,'IScanSettings',context!),
        'ColourLabel': ColourLabel,
        'OrientationLabel': OrientationLabel,
        'ResolutionLabel': ResolutionLabel,
        'SidesLabel': SidesLabel,
        'SizeLabel': SizeLabel,
        'SourceLabel': SourceLabel,
        'TypeLabel': TypeLabel,
        'ScanContinuouslyLabel': ScanContinuouslyLabel,
        'MixedSizesLabel': MixedSizesLabel
    });

    getTypeName() => "GetScanSettingsResponse";
    TypeContext? context = _ctx;
}

abstract class IScanSetting<T>
{
    bool? IsLocked;
    List<IScanSettingItem<T>>? Items;
    String? SelectedItem;
}

TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
    'Brand': TypeInfo(TypeOf.Enum, enumValues:Brand.values),
    'DtoBase': TypeInfo(TypeOf.Class, create:() => DtoBase()),
    'RequestBase': TypeInfo(TypeOf.Class, create:() => RequestBase()),
    'ShowScanSettings': TypeInfo(TypeOf.Class, create:() => ShowScanSettings()),
    'ResponseBase': TypeInfo(TypeOf.Class, create:() => ResponseBase()),
    'ITemplateModificationInfo': TypeInfo(TypeOf.Interface),
    'IClientQuestion': TypeInfo(TypeOf.Interface),
    'TemplateType': TypeInfo(TypeOf.Enum, enumValues:TemplateType.values),
    'TemplateScheduleType': TypeInfo(TypeOf.Enum, enumValues:TemplateScheduleType.values),
    'ITemplateSchedule': TypeInfo(TypeOf.Interface),
    'ICredentials': TypeInfo(TypeOf.Interface),
    'IRejection': TypeInfo(TypeOf.Interface),
    'IBadDocumentRejection': TypeInfo(TypeOf.Interface),
    'PdfLoadResolution': TypeInfo(TypeOf.Enum, enumValues:PdfLoadResolution.values),
    'IGeneral': TypeInfo(TypeOf.Interface),
    'ICaptureSource': TypeInfo(TypeOf.Interface),
    'ICapture': TypeInfo(TypeOf.Interface),
    'IStringMetadata': TypeInfo(TypeOf.Interface),
    'IXmlMetadataImportTagMapping': TypeInfo(TypeOf.Interface),
    'IXmlMetadataImportNamespaceMapping': TypeInfo(TypeOf.Interface),
    'IXmlMetadataImport': TypeInfo(TypeOf.Interface),
    'NotificationType': TypeInfo(TypeOf.Enum, enumValues:NotificationType.values),
    'INotification': TypeInfo(TypeOf.Interface),
    'INotifications': TypeInfo(TypeOf.Interface),
    'IValidationError': TypeInfo(TypeOf.Interface),
    'IValidationErrors': TypeInfo(TypeOf.Interface),
    'IValidator': TypeInfo(TypeOf.Interface),
    'ITemplate': TypeInfo(TypeOf.Interface),
    'IClientTemplate': TypeInfo(TypeOf.Interface),
    'ScanResponseBase': TypeInfo(TypeOf.Class, create:() => ScanResponseBase()),
    'List<IClientQuestion>': TypeInfo(TypeOf.Class, create:() => <IClientQuestion>[]),
    'GetTemplateResponse': TypeInfo(TypeOf.Class, create:() => GetTemplateResponse()),
    'ScanColour': TypeInfo(TypeOf.Enum, enumValues:ScanColour.values),
    'ScanOrientation': TypeInfo(TypeOf.Enum, enumValues:ScanOrientation.values),
    'ScanResolution': TypeInfo(TypeOf.Enum, enumValues:ScanResolution.values),
    'ScanSide': TypeInfo(TypeOf.Enum, enumValues:ScanSide.values),
    'ScanSize': TypeInfo(TypeOf.Enum, enumValues:ScanSize.values),
    'ScanSource': TypeInfo(TypeOf.Enum, enumValues:ScanSource.values),
    'ScanType': TypeInfo(TypeOf.Enum, enumValues:ScanType.values),
    'BoolSetting': TypeInfo(TypeOf.Enum, enumValues:BoolSetting.values),
    'IScanSettings': TypeInfo(TypeOf.Interface),
    'GetScanSettingsResponse': TypeInfo(TypeOf.Class, create:() => GetScanSettingsResponse()),
    'IScanSetting<T>': TypeInfo(TypeOf.Interface),
});

Dart ShowScanSettings DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Brand}/showscansettings/{TemplateGuid} HTTP/1.1 
Host: buildmax.org 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"TemplateGuid":"String","Brand":"Desktop"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{Unable to show example output for type 'GetScanSettingsResponse' using the custom 'other' filter}No parameterless constructor defined for this object.