/* Options: Date: 2024-04-29 17:56:23 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: CreatePost.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum PostType { Announcement, Post, Showcase, Question, Request, } class CreatePostResponse implements IConvertible { int? id; String? slug; ResponseStatus? responseStatus; CreatePostResponse({this.id,this.slug,this.responseStatus}); CreatePostResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; slug = json['slug']; responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'id': id, 'slug': slug, 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "CreatePostResponse"; TypeContext? context = _ctx; } // @Route("/posts", "POST") class CreatePost implements IReturn, IPost, IConvertible { 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; int? refId; String? refSource; String? refUrn; CreatePost({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,this.refId,this.refSource,this.refUrn}); CreatePost.fromJson(Map json) { fromMap(json); } fromMap(Map json) { 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']; refId = json['refId']; refSource = json['refSource']; refUrn = json['refUrn']; return this; } Map toJson() => { '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, 'refId': refId, 'refSource': refSource, 'refUrn': refUrn }; createResponse() => CreatePostResponse(); getResponseTypeName() => "CreatePostResponse"; getTypeName() => "CreatePost"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'techstacks.io', types: { 'PostType': TypeInfo(TypeOf.Enum, enumValues:PostType.values), 'CreatePostResponse': TypeInfo(TypeOf.Class, create:() => CreatePostResponse()), 'CreatePost': TypeInfo(TypeOf.Class, create:() => CreatePost()), });