ScannerVision Web Server

<back to all web services

JsonServerInformationRequest

Requires Authentication
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

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

    Map<String, dynamic> toJson() => {};
    getTypeName() => "JsonDto";
    TypeContext? context = _ctx;
}

class JsonRequestDto extends JsonDto implements IConvertible
{
    String? ClientCode;
    String? ClientRegistrationCode;
    String? Token;

    JsonRequestDto({this.ClientCode,this.ClientRegistrationCode,this.Token});
    JsonRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class JsonServerInformationRequest extends JsonRequestDto implements IConvertible
{
    String? ClientHostName;
    String? UserName;
    bool? IsPro;
    String? ClientId;

    JsonServerInformationRequest({this.ClientHostName,this.UserName,this.IsPro,this.ClientId});
    JsonServerInformationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ClientHostName': ClientHostName,
        'UserName': UserName,
        'IsPro': IsPro,
        'ClientId': ClientId
    });

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

class JsonServerInformationResponse extends JsonDto implements IConvertible
{
    String? ClientIpAddress;
    String? ClientGuid;
    String? ClientName;
    String? ClientId;
    String? UserHomeFolder;
    String? UserEmail;
    String? ServerVersion;
    bool? AllowUpdate;
    String? FtpUsername;
    String? FtpPassword;
    String? AdminUsername;
    String? AdminPassword;
    int? FtpPort;
    List<String>? SupportedDocumentFormats;
    String? HpnVersion;

    JsonServerInformationResponse({this.ClientIpAddress,this.ClientGuid,this.ClientName,this.ClientId,this.UserHomeFolder,this.UserEmail,this.ServerVersion,this.AllowUpdate,this.FtpUsername,this.FtpPassword,this.AdminUsername,this.AdminPassword,this.FtpPort,this.SupportedDocumentFormats,this.HpnVersion});
    JsonServerInformationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ClientIpAddress = json['ClientIpAddress'];
        ClientGuid = json['ClientGuid'];
        ClientName = json['ClientName'];
        ClientId = json['ClientId'];
        UserHomeFolder = json['UserHomeFolder'];
        UserEmail = json['UserEmail'];
        ServerVersion = json['ServerVersion'];
        AllowUpdate = json['AllowUpdate'];
        FtpUsername = json['FtpUsername'];
        FtpPassword = json['FtpPassword'];
        AdminUsername = json['AdminUsername'];
        AdminPassword = json['AdminPassword'];
        FtpPort = json['FtpPort'];
        SupportedDocumentFormats = JsonConverters.fromJson(json['SupportedDocumentFormats'],'List<String>',context!);
        HpnVersion = json['HpnVersion'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ClientIpAddress': ClientIpAddress,
        'ClientGuid': ClientGuid,
        'ClientName': ClientName,
        'ClientId': ClientId,
        'UserHomeFolder': UserHomeFolder,
        'UserEmail': UserEmail,
        'ServerVersion': ServerVersion,
        'AllowUpdate': AllowUpdate,
        'FtpUsername': FtpUsername,
        'FtpPassword': FtpPassword,
        'AdminUsername': AdminUsername,
        'AdminPassword': AdminPassword,
        'FtpPort': FtpPort,
        'SupportedDocumentFormats': JsonConverters.toJson(SupportedDocumentFormats,'List<String>',context!),
        'HpnVersion': HpnVersion
    });

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

TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
    'JsonDto': TypeInfo(TypeOf.Class, create:() => JsonDto()),
    'JsonRequestDto': TypeInfo(TypeOf.Class, create:() => JsonRequestDto()),
    'JsonServerInformationRequest': TypeInfo(TypeOf.Class, create:() => JsonServerInformationRequest()),
    'JsonServerInformationResponse': TypeInfo(TypeOf.Class, create:() => JsonServerInformationResponse()),
});

Dart JsonServerInformationRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /json/reply/JsonServerInformationRequest HTTP/1.1 
Host: buildmax.org 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ClientHostName":"String","UserName":"String","IsPro":false,"ClientId":"String","ClientCode":"String","ClientRegistrationCode":"String","Token":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ClientIpAddress":"String","ClientGuid":"String","ClientName":"String","ClientId":"String","UserHomeFolder":"String","UserEmail":"String","ServerVersion":"String","AllowUpdate":false,"FtpUsername":"String","FtpPassword":"String","AdminUsername":"String","AdminPassword":"String","FtpPort":0,"SupportedDocumentFormats":["String"],"HpnVersion":"String"}