/* Options: Date: 2026-04-15 21:22:18 Version: 8.60 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: http://api.booklinker.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: PostUnclaimedLinkCreationRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; // @DataContract class AffiliateTokens implements IConvertible { // @DataMember(Name="guid") String? guid; // @DataMember(Name="programGuid") String? programGuid; // @DataMember(Name="affiliateTokens") Map? affiliateTokens; AffiliateTokens({this.guid,this.programGuid,this.affiliateTokens}); AffiliateTokens.fromJson(Map json) { fromMap(json); } fromMap(Map json) { guid = json['guid']; programGuid = json['programGuid']; affiliateTokens = JsonConverters.toStringMap(json['tokens']); return this; } Map toJson() => { 'guid': guid, 'programGuid': programGuid, 'affiliateTokens': affiliateTokens }; getTypeName() => "AffiliateTokens"; TypeContext? context = _ctx; } // @DataContract class PostLinkCreationRequestBase implements IConvertible { // @DataMember(Name="url") // @ApiMember(IsRequired=true) String? url; // @DataMember(Name="domain") String? domain; // @DataMember(Name="parameterKeyValues") Map? parameterKeyValues; PostLinkCreationRequestBase({this.url,this.domain,this.parameterKeyValues}); PostLinkCreationRequestBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { url = json['url']; domain = json['domain']; parameterKeyValues = JsonConverters.toStringMap(json['parameterKeyValues']); return this; } Map toJson() => { 'url': url, 'domain': domain, 'parameterKeyValues': parameterKeyValues }; getTypeName() => "PostLinkCreationRequestBase"; TypeContext? context = _ctx; } // @DataContract class ProductMetadata extends ProductMetadata implements IConvertible { ProductMetadata(); ProductMetadata.fromJson(Map json) : super.fromJson(json); fromMap(Map json) { super.fromMap(json); return this; } Map toJson() => super.toJson(); getTypeName() => "ProductMetadata"; TypeContext? context = _ctx; } // @DataContract abstract class ProductMetadata { // @DataMember(Name="title") String? title; // @DataMember(Name="author") String? author; // @DataMember(Name="url") Uri? url; // @DataMember(Name="description") String? description; // @DataMember(Name="retailer") String? retailer; // @DataMember(Name="productImages") Map? productImages; ProductMetadata({this.title,this.author,this.url,this.description,this.retailer,this.productImages}); ProductMetadata.fromJson(Map json) { fromMap(json); } fromMap(Map json) { title = json['title']; author = json['author']; url = JsonConverters.fromJson(json['url'],'Uri',context!); description = json['description']; retailer = json['retailer']; productImages = JsonConverters.fromJson(json['productImages'],'Map',context!); return this; } Map toJson() => { 'title': title, 'author': author, 'url': JsonConverters.toJson(url,'Uri',context!), 'description': description, 'retailer': retailer, 'productImages': JsonConverters.toJson(productImages,'Map',context!) }; getTypeName() => "ProductMetadata"; TypeContext? context = _ctx; } // @DataContract class PostLinkCreationResponse implements IConvertible { // @DataMember(Name="success") bool? success; // @DataMember(Name="linkResult") String? linkResult; // @DataMember(Name="destinations") List? destinations; // @DataMember(Name="responseStatus") ResponseStatus? responseStatus; PostLinkCreationResponse({this.success,this.linkResult,this.destinations,this.responseStatus}); PostLinkCreationResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { success = json['success']; linkResult = json['linkResult']; destinations = JsonConverters.fromJson(json['destinations'],'List',context!); responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'success': success, 'linkResult': linkResult, 'destinations': JsonConverters.toJson(destinations,'List',context!), 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "PostLinkCreationResponse"; TypeContext? context = _ctx; } // @Route("/v1/links/unclaimed", "POST") class PostUnclaimedLinkCreationRequest extends PostLinkCreationRequestBase implements IReturn, IConvertible, IPost { // @DataMember(Name="affiliatePrograms") List? affiliatePrograms; PostUnclaimedLinkCreationRequest({this.affiliatePrograms}); PostUnclaimedLinkCreationRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); affiliatePrograms = JsonConverters.fromJson(json['affiliatePrograms'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'affiliatePrograms': JsonConverters.toJson(affiliatePrograms,'List',context!) }); createResponse() => PostLinkCreationResponse(); getResponseTypeName() => "PostLinkCreationResponse"; getTypeName() => "PostUnclaimedLinkCreationRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.booklinker.com', types: { 'AffiliateTokens': TypeInfo(TypeOf.Class, create:() => AffiliateTokens()), 'PostLinkCreationRequestBase': TypeInfo(TypeOf.Class, create:() => PostLinkCreationRequestBase()), 'ProductMetadata': TypeInfo(TypeOf.Class, create:() => ProductMetadata()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'Map': TypeInfo(TypeOf.Class, create:() => Map()), 'PostLinkCreationResponse': TypeInfo(TypeOf.Class, create:() => PostLinkCreationResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'PostUnclaimedLinkCreationRequest': TypeInfo(TypeOf.Class, create:() => PostUnclaimedLinkCreationRequest()), 'List': TypeInfo(TypeOf.Class, create:() => []), });