| 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>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<DefineAreas xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GoToLightAPI">
<Areas>
<Area>
<AreaID>0</AreaID>
<Content>
<AreaContent>
<AreaID>0</AreaID>
<ID>0</ID>
<LCAddress>String</LCAddress>
<PixelStart>0</PixelStart>
<PixelStop>0</PixelStop>
<Pos>0</Pos>
<Reverse>false</Reverse>
</AreaContent>
</Content>
<Label>String</Label>
<StockroomID>0</StockroomID>
</Area>
</Areas>
</DefineAreas>