Go-to-Light Service 4.0.0.2397 - 121 - API License to Cloud Demo

<back to all web services

DefineAreas

Requires Authentication
The following routes are available for this service:
All Verbs/DefineAreas/{Areas}
import 'package:servicestack/servicestack.dart';

class AreaContent implements IConvertible
{
    int? ID;
    String? LCAddress;
    int? PixelStart;
    int? PixelStop;
    int? AreaID;
    int? Pos;
    bool? Reverse;

    AreaContent({this.ID,this.LCAddress,this.PixelStart,this.PixelStop,this.AreaID,this.Pos,this.Reverse});
    AreaContent.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ID = json['ID'];
        LCAddress = json['LCAddress'];
        PixelStart = json['PixelStart'];
        PixelStop = json['PixelStop'];
        AreaID = json['AreaID'];
        Pos = json['Pos'];
        Reverse = json['Reverse'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ID': ID,
        'LCAddress': LCAddress,
        'PixelStart': PixelStart,
        'PixelStop': PixelStop,
        'AreaID': AreaID,
        'Pos': Pos,
        'Reverse': Reverse
    };

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

class Area implements IConvertible
{
    int? AreaID;
    String? Label;
    int? StockroomID;
    List<AreaContent>? Content = [];
    int? NumberOfPixels;

    Area({this.AreaID,this.Label,this.StockroomID,this.Content,this.NumberOfPixels});
    Area.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AreaID = json['AreaID'];
        Label = json['Label'];
        StockroomID = json['StockroomID'];
        Content = JsonConverters.fromJson(json['Content'],'List<AreaContent>',context!);
        NumberOfPixels = json['NumberOfPixels'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AreaID': AreaID,
        'Label': Label,
        'StockroomID': StockroomID,
        'Content': JsonConverters.toJson(Content,'List<AreaContent>',context!),
        'NumberOfPixels': NumberOfPixels
    };

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

class DefineAreas implements IConvertible
{
    /**
    * Areas
    */
    // @ApiMember(Description="Areas", IsRequired=true)
    List<Area>? Areas = [];

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

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

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

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

TypeContext _ctx = TypeContext(library: 'clouddemo.pickeos.com', types: <String, TypeInfo> {
    'AreaContent': TypeInfo(TypeOf.Class, create:() => AreaContent()),
    'Area': TypeInfo(TypeOf.Class, create:() => Area()),
    'List<AreaContent>': TypeInfo(TypeOf.Class, create:() => <AreaContent>[]),
    'DefineAreas': TypeInfo(TypeOf.Class, create:() => DefineAreas()),
    'List<Area>': TypeInfo(TypeOf.Class, create:() => <Area>[]),
});

Dart DefineAreas 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 /DefineAreas/{Areas} HTTP/1.1 
Host: clouddemo.pickeos.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Areas":[{"AreaID":0,"Label":"String","StockroomID":0,"Content":[{"ID":0,"LCAddress":"String","PixelStart":0,"PixelStop":0,"AreaID":0,"Pos":0,"Reverse":false}],"NumberOfPixels":1}]}