| GET | /RestApi/translations/projects/statuses |
|---|
import 'package:servicestack/servicestack.dart';
enum ProjectStatus
{
NotStarted,
Started,
Completed,
}
class GetProjectsStatus implements IProjectsFilter, IConvertible
{
String? SearchText;
List<String>? Service;
ProjectStatus? ProjectStatus;
String? ActualSourceLanguage;
bool? WithoutSourceLanguage;
GetProjectsStatus({this.SearchText,this.Service,this.ProjectStatus,this.ActualSourceLanguage,this.WithoutSourceLanguage});
GetProjectsStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SearchText = json['SearchText'];
Service = JsonConverters.fromJson(json['Service'],'List<String>',context!);
ProjectStatus = JsonConverters.fromJson(json['ProjectStatus'],'ProjectStatus',context!);
ActualSourceLanguage = json['ActualSourceLanguage'];
WithoutSourceLanguage = json['WithoutSourceLanguage'];
return this;
}
Map<String, dynamic> toJson() => {
'SearchText': SearchText,
'Service': JsonConverters.toJson(Service,'List<String>',context!),
'ProjectStatus': JsonConverters.toJson(ProjectStatus,'ProjectStatus',context!),
'ActualSourceLanguage': ActualSourceLanguage,
'WithoutSourceLanguage': WithoutSourceLanguage
};
getTypeName() => "GetProjectsStatus";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.imglobal.com', types: <String, TypeInfo> {
'ProjectStatus': TypeInfo(TypeOf.Enum, enumValues:ProjectStatus.values),
'GetProjectsStatus': TypeInfo(TypeOf.Class, create:() => GetProjectsStatus()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /RestApi/translations/projects/statuses HTTP/1.1 Host: www.imglobal.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{Unable to show example output for type 'IList`1' using the custom 'other' filter}Cannot create an instance of an interface.