/* Options: Date: 2024-12-22 21:25:32 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateTodo.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class Todo implements IConvertible { int? id; String? text; bool? isFinished; Todo({this.id,this.text,this.isFinished}); Todo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; text = json['text']; isFinished = json['isFinished']; return this; } Map toJson() => { 'id': id, 'text': text, 'isFinished': isFinished }; getTypeName() => "Todo"; TypeContext? context = _ctx; } // @Route("/todos/{Id}", "PUT") class UpdateTodo implements IReturn, IPut, IConvertible { int? id; // @Validate(Validator="NotEmpty") String? text; bool? isFinished; UpdateTodo({this.id,this.text,this.isFinished}); UpdateTodo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; text = json['text']; isFinished = json['isFinished']; return this; } Map toJson() => { 'id': id, 'text': text, 'isFinished': isFinished }; createResponse() => Todo(); getResponseTypeName() => "Todo"; getTypeName() => "UpdateTodo"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'Todo': TypeInfo(TypeOf.Class, create:() => Todo()), 'UpdateTodo': TypeInfo(TypeOf.Class, create:() => UpdateTodo()), });