| All Verbs | /SaveArea/{Area} |
|---|
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 SaveArea implements IConvertible
{
/**
* Area
*/
// @ApiMember(Description="Area", IsRequired=true)
Area? Area;
SaveArea({this.Area});
SaveArea.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Area = JsonConverters.fromJson(json['Area'],'Area',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Area': JsonConverters.toJson(Area,'Area',context!)
};
getTypeName() => "SaveArea";
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>[]),
'SaveArea': TypeInfo(TypeOf.Class, create:() => SaveArea()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /SaveArea/{Area} HTTP/1.1
Host: clouddemo.pickeos.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Area:
{
AreaID: 0,
Label: String,
StockroomID: 0,
Content:
[
{
ID: 0,
LCAddress: String,
PixelStart: 0,
PixelStop: 0,
AreaID: 0,
Pos: 0,
Reverse: False
}
],
NumberOfPixels: 1
}
}