| Requires any of the roles: | Client, Admin, Partner |
import 'package:servicestack/servicestack.dart';
// @DataContract
class MetaParseUpload implements IConvertible
{
// @DataMember(Order=1)
String? Data;
MetaParseUpload({this.Data});
MetaParseUpload.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Data = json['Data'];
return this;
}
Map<String, dynamic> toJson() => {
'Data': Data
};
getTypeName() => "MetaParseUpload";
TypeContext? context = _ctx;
}
class CSVRequestsArrResponse extends ListBase<MetaParseUpload> implements IConvertible
{
final List<MetaParseUpload> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
MetaParseUpload operator [](int index) => l[index];
void operator []=(int index, MetaParseUpload value) { l[index] = value; }
CSVRequestsArrResponse();
CSVRequestsArrResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "CSVRequestsArrResponse";
TypeContext? context = _ctx;
}
class JsonObject extends Map<String,String?> implements IConvertible
{
JsonObject();
JsonObject.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "JsonObject";
TypeContext? context = _ctx;
}
class CSVErrors implements IConvertible
{
String? type;
String? code;
String? message;
String? row;
CSVErrors({this.type,this.code,this.message,this.row});
CSVErrors.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
type = json['type'];
code = json['code'];
message = json['message'];
row = json['row'];
return this;
}
Map<String, dynamic> toJson() => {
'type': type,
'code': code,
'message': message,
'row': row
};
getTypeName() => "CSVErrors";
TypeContext? context = _ctx;
}
class CSVRequestsArr implements IConvertible
{
int? BatchId;
JsonObject? Data;
List<CSVErrors>? Errors;
CSVRequestsArr({this.BatchId,this.Data,this.Errors});
CSVRequestsArr.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BatchId = json['BatchId'];
Data = JsonConverters.fromJson(json['Data'],'JsonObject',context!);
Errors = JsonConverters.fromJson(json['Errors'],'List<CSVErrors>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'BatchId': BatchId,
'Data': JsonConverters.toJson(Data,'JsonObject',context!),
'Errors': JsonConverters.toJson(Errors,'List<CSVErrors>',context!)
};
getTypeName() => "CSVRequestsArr";
TypeContext? context = _ctx;
}
class Requests extends ListBase<CSVRequestsArr> implements IConvertible
{
final List<CSVRequestsArr> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
CSVRequestsArr operator [](int index) => l[index];
void operator []=(int index, CSVRequestsArr value) { l[index] = value; }
Requests();
Requests.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "Requests";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'MetaParseUpload': TypeInfo(TypeOf.Class, create:() => MetaParseUpload()),
'CSVRequestsArrResponse': TypeInfo(TypeOf.Class, create:() => CSVRequestsArrResponse()),
'JsonObject': TypeInfo(TypeOf.Class, create:() => JsonObject()),
'CSVErrors': TypeInfo(TypeOf.Class, create:() => CSVErrors()),
'CSVRequestsArr': TypeInfo(TypeOf.Class, create:() => CSVRequestsArr()),
'List<CSVErrors>': TypeInfo(TypeOf.Class, create:() => <CSVErrors>[]),
'Requests': TypeInfo(TypeOf.Class, create:() => Requests()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/Requests HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
[]
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length []