ScannerVision Web Server

<back to all web services

BrotherTemplateQuestionResponse

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

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

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 QuestionRequestDto extends RequestBase implements IConvertible
{
    String? TemplateGuid;
    String? QuestionGuid;
    String? Parent;
    String? FolderBrowser;

    QuestionRequestDto({this.TemplateGuid,this.QuestionGuid,this.Parent,this.FolderBrowser});
    QuestionRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

class BrotherTemplateQuestionResponse extends QuestionRequestDto implements IConvertible
{
    IClientQuestion? Question;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Question': JsonConverters.toJson(Question,'IClientQuestion',context!)
    });

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

TypeContext _ctx = TypeContext(library: 'dmsshow.kyocerasolutions.cz', types: <String, TypeInfo> {
    'Brand': TypeInfo(TypeOf.Enum, enumValues:Brand.values),
    'DtoBase': TypeInfo(TypeOf.Class, create:() => DtoBase()),
    'RequestBase': TypeInfo(TypeOf.Class, create:() => RequestBase()),
    'QuestionRequestDto': TypeInfo(TypeOf.Class, create:() => QuestionRequestDto()),
    'IClientQuestion': TypeInfo(TypeOf.Interface),
    'BrotherTemplateQuestionResponse': TypeInfo(TypeOf.Class, create:() => BrotherTemplateQuestionResponse()),
});

Dart BrotherTemplateQuestionResponse DTOs

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

HTTP + CSV

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

POST /{Brand}/templates/{TemplateGuid}/submit HTTP/1.1 
Host: dmsshow.kyocerasolutions.cz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"TemplateGuid":"String","QuestionGuid":"String","Parent":"String","FolderBrowser":"String","Brand":"Desktop"}