ScannerVision Web Server

<back to all web services

HpUploadRequest

Requires Authentication
The following routes are available for this service:
All Verbs/{Brand}/upload/{TemplateGuid}/{FileNameGuid}
All Verbs/{Brand}/upload/{TemplateGuid}/{FileNameGuid}/hpupload
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 UploadRequest extends RequestBase implements IConvertible
{
    String? TemplateGuid;
    String? FileNameGuid;

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

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

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

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

class HpUploadRequest extends UploadRequest implements IConvertible
{
    HpUploadRequest();
    HpUploadRequest.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() => "HpUploadRequest";
    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;
}

class UploadResponse extends ResponseBase implements IConvertible
{
    bool? InError;
    String? ErrorMessage;
    String? TemplateGuid;

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

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

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

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

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()),
    'UploadRequest': TypeInfo(TypeOf.Class, create:() => UploadRequest()),
    'HpUploadRequest': TypeInfo(TypeOf.Class, create:() => HpUploadRequest()),
    'ResponseBase': TypeInfo(TypeOf.Class, create:() => ResponseBase()),
    'UploadResponse': TypeInfo(TypeOf.Class, create:() => UploadResponse()),
});

Dart HpUploadRequest 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}/upload/{TemplateGuid}/{FileNameGuid} HTTP/1.1 
Host: buildmax.org 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

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

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