| All Verbs | /MissionUpdateState/{MissionName}/{State} |
|---|
import 'package:servicestack/servicestack.dart';
enum MissionState
{
New,
PickingStarted,
PickingFinished,
PickingManuallyValidated,
RamasseFinished,
PackingFinished,
}
class MissionUpdateState implements IConvertible
{
/**
* Mission name
*/
// @ApiMember(Description="Mission name", IsRequired=true)
String? MissionName;
/**
* Mission state
*/
// @ApiMember(Description="Mission state", IsRequired=true)
MissionState? State;
MissionUpdateState({this.MissionName,this.State});
MissionUpdateState.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
MissionName = json['MissionName'];
State = JsonConverters.fromJson(json['State'],'MissionState',context!);
return this;
}
Map<String, dynamic> toJson() => {
'MissionName': MissionName,
'State': JsonConverters.toJson(State,'MissionState',context!)
};
getTypeName() => "MissionUpdateState";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clouddemo.pickeos.com', types: <String, TypeInfo> {
'MissionState': TypeInfo(TypeOf.Enum, enumValues:MissionState.values),
'MissionUpdateState': TypeInfo(TypeOf.Class, create:() => MissionUpdateState()),
});
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /MissionUpdateState/{MissionName}/{State} HTTP/1.1
Host: clouddemo.pickeos.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"MissionName":"String","State":"New"}