/* Options: Date: 2024-05-05 21:39:57 Version: 8.13 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://techstacks.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdatePost.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum PostType { Announcement, Post, Showcase, Question, Request, } class UpdatePostResponse implements IConvertible { ResponseStatus? responseStatus; UpdatePostResponse({this.responseStatus}); UpdatePostResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "UpdatePostResponse"; TypeContext? context = _ctx; } // @Route("/posts/{Id}", "PUT") class UpdatePost implements IReturn, IPut, IConvertible { int? id; int? organizationId; PostType? type; int? categoryId; String? title; String? url; String? imageUrl; String? content; bool? lock; List? technologyIds; List? labels; DateTime? fromDate; DateTime? toDate; String? metaType; String? meta; UpdatePost({this.id,this.organizationId,this.type,this.categoryId,this.title,this.url,this.imageUrl,this.content,this.lock,this.technologyIds,this.labels,this.fromDate,this.toDate,this.metaType,this.meta}); UpdatePost.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; organizationId = json['organizationId']; type = JsonConverters.fromJson(json['type'],'PostType',context!); categoryId = json['categoryId']; title = json['title']; url = json['url']; imageUrl = json['imageUrl']; content = json['content']; lock = json['lock']; technologyIds = JsonConverters.fromJson(json['technologyIds'],'List',context!); labels = JsonConverters.fromJson(json['labels'],'List',context!); fromDate = JsonConverters.fromJson(json['fromDate'],'DateTime',context!); toDate = JsonConverters.fromJson(json['toDate'],'DateTime',context!); metaType = json['metaType']; meta = json['meta']; return this; } Map toJson() => { 'id': id, 'organizationId': organizationId, 'type': JsonConverters.toJson(type,'PostType',context!), 'categoryId': categoryId, 'title': title, 'url': url, 'imageUrl': imageUrl, 'content': content, 'lock': lock, 'technologyIds': JsonConverters.toJson(technologyIds,'List',context!), 'labels': JsonConverters.toJson(labels,'List',context!), 'fromDate': JsonConverters.toJson(fromDate,'DateTime',context!), 'toDate': JsonConverters.toJson(toDate,'DateTime',context!), 'metaType': metaType, 'meta': meta }; createResponse() => UpdatePostResponse(); getResponseTypeName() => "UpdatePostResponse"; getTypeName() => "UpdatePost"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'techstacks.io', types: { 'PostType': TypeInfo(TypeOf.Enum, enumValues:PostType.values), 'UpdatePostResponse': TypeInfo(TypeOf.Class, create:() => UpdatePostResponse()), 'UpdatePost': TypeInfo(TypeOf.Class, create:() => UpdatePost()), });