/* Options: Date: 2024-12-23 12:31:25 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://consumer-api.brovs.com //GlobalNamespace: ConsumerApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetNewsRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; class NewsDto implements IConvertible { String? subject; String? body; String? author; DateTime? createdAt; NewsDto({this.subject,this.body,this.author,this.createdAt}); NewsDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { subject = json['subject']; body = json['body']; author = json['author']; createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!); return this; } Map toJson() => { 'subject': subject, 'body': body, 'author': author, 'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!) }; getTypeName() => "NewsDto"; TypeContext? context = _ctx; } class GetNewsResponse implements IConvertible { List? news; GetNewsResponse({this.news}); GetNewsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { news = JsonConverters.fromJson(json['news'],'List',context!); return this; } Map toJson() => { 'news': JsonConverters.toJson(news,'List',context!) }; getTypeName() => "GetNewsResponse"; TypeContext? context = _ctx; } // @Route("/news", "GET") class GetNewsRequest implements IReturn, IGet, IConvertible { GetNewsRequest(); GetNewsRequest.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => GetNewsResponse(); getResponseTypeName() => "GetNewsResponse"; getTypeName() => "GetNewsRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'NewsDto': TypeInfo(TypeOf.Class, create:() => NewsDto()), 'GetNewsResponse': TypeInfo(TypeOf.Class, create:() => GetNewsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetNewsRequest': TypeInfo(TypeOf.Class, create:() => GetNewsRequest()), });