/* Options: Date: 2024-11-21 04:48:04 Version: 6.00 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://resourcelibrary.api.ashcompanies.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: FavoritesRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class BasicResourceLibraryRequest implements IConvertible { int? resourceLibraryMemberId; BasicResourceLibraryRequest({this.resourceLibraryMemberId}); BasicResourceLibraryRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { resourceLibraryMemberId = json['resourceLibraryMemberId']; return this; } Map toJson() => { 'resourceLibraryMemberId': resourceLibraryMemberId }; getTypeName() => "BasicResourceLibraryRequest"; TypeContext? context = _ctx; } class Tag implements IConvertible { String? id; String? title; Tag({this.id,this.title}); Tag.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; title = json['title']; return this; } Map toJson() => { 'id': id, 'title': title }; getTypeName() => "Tag"; TypeContext? context = _ctx; } class ScreenshotItem implements IConvertible { String? largeFilepathS3; String? thumbFilepathS3; double? order; String? description; ScreenshotItem({this.largeFilepathS3,this.thumbFilepathS3,this.order,this.description}); ScreenshotItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { largeFilepathS3 = json['largeFilepathS3']; thumbFilepathS3 = json['thumbFilepathS3']; order = JsonConverters.toDouble(json['order']); description = json['description']; return this; } Map toJson() => { 'largeFilepathS3': largeFilepathS3, 'thumbFilepathS3': thumbFilepathS3, 'order': order, 'description': description }; getTypeName() => "ScreenshotItem"; TypeContext? context = _ctx; } class ResourceCard implements IConvertible { String? id; String? title; String? description; String? descriptionSummary; String? type; String? content; bool? isComplete; bool? isFavorite; bool? isImplicitlyComplete; String? mediaPath; bool? isConfirmable; bool? isWcagCompliant; String? duration; String? preview; int? calories; String? instructor; String? thumbnail; String? difficulty; List? tags; String? subtitles; List? screenshots; bool? drmEncrypted; ResourceCard({this.id,this.title,this.description,this.descriptionSummary,this.type,this.content,this.isComplete,this.isFavorite,this.isImplicitlyComplete,this.mediaPath,this.isConfirmable,this.isWcagCompliant,this.duration,this.preview,this.calories,this.instructor,this.thumbnail,this.difficulty,this.tags,this.subtitles,this.screenshots,this.drmEncrypted}); ResourceCard.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; title = json['title']; description = json['description']; descriptionSummary = json['descriptionSummary']; type = json['type']; content = json['content']; isComplete = json['isComplete']; isFavorite = json['isFavorite']; isImplicitlyComplete = json['isImplicitlyComplete']; mediaPath = json['mediaPath']; isConfirmable = json['isConfirmable']; isWcagCompliant = json['isWcagCompliant']; duration = json['duration']; preview = json['preview']; calories = json['calories']; instructor = json['instructor']; thumbnail = json['thumbnail']; difficulty = json['difficulty']; tags = JsonConverters.fromJson(json['tags'],'List',context!); subtitles = json['subtitles']; screenshots = JsonConverters.fromJson(json['screenshots'],'List',context!); drmEncrypted = json['drmEncrypted']; return this; } Map toJson() => { 'id': id, 'title': title, 'description': description, 'descriptionSummary': descriptionSummary, 'type': type, 'content': content, 'isComplete': isComplete, 'isFavorite': isFavorite, 'isImplicitlyComplete': isImplicitlyComplete, 'mediaPath': mediaPath, 'isConfirmable': isConfirmable, 'isWcagCompliant': isWcagCompliant, 'duration': duration, 'preview': preview, 'calories': calories, 'instructor': instructor, 'thumbnail': thumbnail, 'difficulty': difficulty, 'tags': JsonConverters.toJson(tags,'List',context!), 'subtitles': subtitles, 'screenshots': JsonConverters.toJson(screenshots,'List',context!), 'drmEncrypted': drmEncrypted }; getTypeName() => "ResourceCard"; TypeContext? context = _ctx; } class Meta implements IConvertible { int? resourceCount; String? title; Meta({this.resourceCount,this.title}); Meta.fromJson(Map json) { fromMap(json); } fromMap(Map json) { resourceCount = json['resourceCount']; title = json['title']; return this; } Map toJson() => { 'resourceCount': resourceCount, 'title': title }; getTypeName() => "Meta"; TypeContext? context = _ctx; } abstract class IResourceItemsLiteResponse { } class ResourceItemsLiteResponse implements IResourceItemsLiteResponse, IConvertible { List? resourceItems; Meta? meta; ResourceItemsLiteResponse({this.resourceItems,this.meta}); ResourceItemsLiteResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { resourceItems = JsonConverters.fromJson(json['resourceItems'],'List',context!); meta = JsonConverters.fromJson(json['meta'],'Meta',context!); return this; } Map toJson() => { 'resourceItems': JsonConverters.toJson(resourceItems,'List',context!), 'meta': JsonConverters.toJson(meta,'Meta',context!) }; getTypeName() => "ResourceItemsLiteResponse"; TypeContext? context = _ctx; } // @Route("/favorites", "GET,POST") class FavoritesRequest extends BasicResourceLibraryRequest implements IReturn, IConvertible { /** * Set it to true if requesting saved resources only from digital library */ // @ApiMember(Description="Set it to true if requesting saved resources only from digital library") bool? digitalFitness; /** * Set it to true if requesting saved resources only from health library */ // @ApiMember(Description="Set it to true if requesting saved resources only from health library") bool? healthLibrary; /** * Set it to true if requesting saved resources only from vptr */ // @ApiMember(Description="Set it to true if requesting saved resources only from vptr") bool? vptr; /** * Set it to true if requesting saved resources only from wellbeing */ // @ApiMember(Description="Set it to true if requesting saved resources only from wellbeing") bool? wellbeing; /** * Set it to true if requesting saved resources only from health */ // @ApiMember(Description="Set it to true if requesting saved resources only from health") bool? health; String? limit; String? offset; FavoritesRequest({this.digitalFitness,this.healthLibrary,this.vptr,this.wellbeing,this.health,this.limit,this.offset}); FavoritesRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); digitalFitness = json['digitalFitness']; healthLibrary = json['healthLibrary']; vptr = json['vptr']; wellbeing = json['wellbeing']; health = json['health']; limit = json['limit']; offset = json['offset']; return this; } Map toJson() => super.toJson()..addAll({ 'digitalFitness': digitalFitness, 'healthLibrary': healthLibrary, 'vptr': vptr, 'wellbeing': wellbeing, 'health': health, 'limit': limit, 'offset': offset }); createResponse() => ResourceItemsLiteResponse(); getResponseTypeName() => "ResourceItemsLiteResponse"; getTypeName() => "FavoritesRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: { 'BasicResourceLibraryRequest': TypeInfo(TypeOf.Class, create:() => BasicResourceLibraryRequest()), 'Tag': TypeInfo(TypeOf.Class, create:() => Tag()), 'ScreenshotItem': TypeInfo(TypeOf.Class, create:() => ScreenshotItem()), 'ResourceCard': TypeInfo(TypeOf.Class, create:() => ResourceCard()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Meta': TypeInfo(TypeOf.Class, create:() => Meta()), 'IResourceItemsLiteResponse': TypeInfo(TypeOf.Interface), 'ResourceItemsLiteResponse': TypeInfo(TypeOf.Class, create:() => ResourceItemsLiteResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'FavoritesRequest': TypeInfo(TypeOf.Class, create:() => FavoritesRequest()), });