/* Options: Date: 2024-12-23 12:09:59 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://consumer-api.brovs.com //GlobalNamespace: ConsumerApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ShareAdMessageLinkUsedRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; enum Locale { EnUs, NbNo, } class SharingUser implements IConvertible { String? firstName; String? lastName; String? profilePhotoUrl; SharingUser({this.firstName,this.lastName,this.profilePhotoUrl}); SharingUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { firstName = json['firstName']; lastName = json['lastName']; profilePhotoUrl = json['profilePhotoUrl']; return this; } Map toJson() => { 'firstName': firstName, 'lastName': lastName, 'profilePhotoUrl': profilePhotoUrl }; getTypeName() => "SharingUser"; TypeContext? context = _ctx; } class OpeningHour implements IConvertible { int? openAtHour; int? openAtMinute; int? closeAtHour; int? closeAtMinute; OpeningHour({this.openAtHour,this.openAtMinute,this.closeAtHour,this.closeAtMinute}); OpeningHour.fromJson(Map json) { fromMap(json); } fromMap(Map json) { openAtHour = json['openAtHour']; openAtMinute = json['openAtMinute']; closeAtHour = json['closeAtHour']; closeAtMinute = json['closeAtMinute']; return this; } Map toJson() => { 'openAtHour': openAtHour, 'openAtMinute': openAtMinute, 'closeAtHour': closeAtHour, 'closeAtMinute': closeAtMinute }; getTypeName() => "OpeningHour"; TypeContext? context = _ctx; } class WeeklyOpeningHours implements IConvertible { OpeningHour? monday; OpeningHour? tuesday; OpeningHour? wednesday; OpeningHour? thursday; OpeningHour? friday; OpeningHour? saturday; OpeningHour? sunday; WeeklyOpeningHours({this.monday,this.tuesday,this.wednesday,this.thursday,this.friday,this.saturday,this.sunday}); WeeklyOpeningHours.fromJson(Map json) { fromMap(json); } fromMap(Map json) { monday = JsonConverters.fromJson(json['monday'],'OpeningHour',context!); tuesday = JsonConverters.fromJson(json['tuesday'],'OpeningHour',context!); wednesday = JsonConverters.fromJson(json['wednesday'],'OpeningHour',context!); thursday = JsonConverters.fromJson(json['thursday'],'OpeningHour',context!); friday = JsonConverters.fromJson(json['friday'],'OpeningHour',context!); saturday = JsonConverters.fromJson(json['saturday'],'OpeningHour',context!); sunday = JsonConverters.fromJson(json['sunday'],'OpeningHour',context!); return this; } Map toJson() => { 'monday': JsonConverters.toJson(monday,'OpeningHour',context!), 'tuesday': JsonConverters.toJson(tuesday,'OpeningHour',context!), 'wednesday': JsonConverters.toJson(wednesday,'OpeningHour',context!), 'thursday': JsonConverters.toJson(thursday,'OpeningHour',context!), 'friday': JsonConverters.toJson(friday,'OpeningHour',context!), 'saturday': JsonConverters.toJson(saturday,'OpeningHour',context!), 'sunday': JsonConverters.toJson(sunday,'OpeningHour',context!) }; getTypeName() => "WeeklyOpeningHours"; TypeContext? context = _ctx; } class OpeningHours implements IConvertible { WeeklyOpeningHours? weekly; OpeningHours({this.weekly}); OpeningHours.fromJson(Map json) { fromMap(json); } fromMap(Map json) { weekly = JsonConverters.fromJson(json['weekly'],'WeeklyOpeningHours',context!); return this; } Map toJson() => { 'weekly': JsonConverters.toJson(weekly,'WeeklyOpeningHours',context!) }; getTypeName() => "OpeningHours"; TypeContext? context = _ctx; } class TimeZoneDto implements IConvertible { Duration? baseUtcOffset; String? daylightName; String? displayName; String? id; String? standardName; bool? supportsDaylightSavingTime; TimeZoneDto({this.baseUtcOffset,this.daylightName,this.displayName,this.id,this.standardName,this.supportsDaylightSavingTime}); TimeZoneDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { baseUtcOffset = JsonConverters.fromJson(json['baseUtcOffset'],'Duration',context!); daylightName = json['daylightName']; displayName = json['displayName']; id = json['id']; standardName = json['standardName']; supportsDaylightSavingTime = json['supportsDaylightSavingTime']; return this; } Map toJson() => { 'baseUtcOffset': JsonConverters.toJson(baseUtcOffset,'Duration',context!), 'daylightName': daylightName, 'displayName': displayName, 'id': id, 'standardName': standardName, 'supportsDaylightSavingTime': supportsDaylightSavingTime }; getTypeName() => "TimeZoneDto"; TypeContext? context = _ctx; } class SharedRootCategory implements IConvertible { String? name; String? absoluteSlug; SharedRootCategory({this.name,this.absoluteSlug}); SharedRootCategory.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; absoluteSlug = json['absoluteSlug']; return this; } Map toJson() => { 'name': name, 'absoluteSlug': absoluteSlug }; getTypeName() => "SharedRootCategory"; TypeContext? context = _ctx; } enum PriceMainDish { Value, Medium, High, FineDining, } class SharePriceMainDish implements IConvertible { String? label; PriceMainDish? slug; SharePriceMainDish({this.label,this.slug}); SharePriceMainDish.fromJson(Map json) { fromMap(json); } fromMap(Map json) { label = json['label']; slug = JsonConverters.fromJson(json['slug'],'PriceMainDish',context!); return this; } Map toJson() => { 'label': label, 'slug': JsonConverters.toJson(slug,'PriceMainDish',context!) }; getTypeName() => "SharePriceMainDish"; TypeContext? context = _ctx; } class ShareWearPriceProfile implements IConvertible { String? label; String? slug; ShareWearPriceProfile({this.label,this.slug}); ShareWearPriceProfile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { label = json['label']; slug = json['slug']; return this; } Map toJson() => { 'label': label, 'slug': slug }; getTypeName() => "ShareWearPriceProfile"; TypeContext? context = _ctx; } class SharedPlace implements IConvertible { int? id; String? guid; String? name; String? logoUrl; String? imageUrl; OpeningHours? openingHours; TimeZoneDto? timeZoneDto; List? rootCategories; SharePriceMainDish? priceMainDish; List? wearPriceProfiles; SharedPlace({this.id,this.guid,this.name,this.logoUrl,this.imageUrl,this.openingHours,this.timeZoneDto,this.rootCategories,this.priceMainDish,this.wearPriceProfiles}); SharedPlace.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; guid = json['guid']; name = json['name']; logoUrl = json['logoUrl']; imageUrl = json['imageUrl']; openingHours = JsonConverters.fromJson(json['openingHours'],'OpeningHours',context!); timeZoneDto = JsonConverters.fromJson(json['timeZoneDto'],'TimeZoneDto',context!); rootCategories = JsonConverters.fromJson(json['rootCategories'],'List',context!); priceMainDish = JsonConverters.fromJson(json['priceMainDish'],'SharePriceMainDish',context!); wearPriceProfiles = JsonConverters.fromJson(json['wearPriceProfiles'],'List',context!); return this; } Map toJson() => { 'id': id, 'guid': guid, 'name': name, 'logoUrl': logoUrl, 'imageUrl': imageUrl, 'openingHours': JsonConverters.toJson(openingHours,'OpeningHours',context!), 'timeZoneDto': JsonConverters.toJson(timeZoneDto,'TimeZoneDto',context!), 'rootCategories': JsonConverters.toJson(rootCategories,'List',context!), 'priceMainDish': JsonConverters.toJson(priceMainDish,'SharePriceMainDish',context!), 'wearPriceProfiles': JsonConverters.toJson(wearPriceProfiles,'List',context!) }; getTypeName() => "SharedPlace"; TypeContext? context = _ctx; } enum SharingState { Teaser, Awarded, SelfShare, Expired, } class SharedAdMessage implements IConvertible { int? id; String? guid; String? title; String? imageUrl; DateTime? startAt; DateTime? stopAt; SharedAdMessage({this.id,this.guid,this.title,this.imageUrl,this.startAt,this.stopAt}); SharedAdMessage.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; guid = json['guid']; title = json['title']; imageUrl = json['imageUrl']; startAt = JsonConverters.fromJson(json['startAt'],'DateTime',context!); stopAt = JsonConverters.fromJson(json['stopAt'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'guid': guid, 'title': title, 'imageUrl': imageUrl, 'startAt': JsonConverters.toJson(startAt,'DateTime',context!), 'stopAt': JsonConverters.toJson(stopAt,'DateTime',context!) }; getTypeName() => "SharedAdMessage"; TypeContext? context = _ctx; } class ShareAdMessageLinkUsedResponse implements IConvertible { SharingUser? user; SharedAdMessage? adMessage; SharedPlace? place; DateTime? expiresAt; SharingState? state; ShareAdMessageLinkUsedResponse({this.user,this.adMessage,this.place,this.expiresAt,this.state}); ShareAdMessageLinkUsedResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { user = JsonConverters.fromJson(json['user'],'SharingUser',context!); adMessage = JsonConverters.fromJson(json['adMessage'],'SharedAdMessage',context!); place = JsonConverters.fromJson(json['place'],'SharedPlace',context!); expiresAt = JsonConverters.fromJson(json['expiresAt'],'DateTime',context!); state = JsonConverters.fromJson(json['state'],'SharingState',context!); return this; } Map toJson() => { 'user': JsonConverters.toJson(user,'SharingUser',context!), 'adMessage': JsonConverters.toJson(adMessage,'SharedAdMessage',context!), 'place': JsonConverters.toJson(place,'SharedPlace',context!), 'expiresAt': JsonConverters.toJson(expiresAt,'DateTime',context!), 'state': JsonConverters.toJson(state,'SharingState',context!) }; getTypeName() => "ShareAdMessageLinkUsedResponse"; TypeContext? context = _ctx; } // @Route("/share/share-ad-message-link-used", "POST") class ShareAdMessageLinkUsedRequest implements IReturn, IPost, IConvertible { String? shareAdMessageToken; Locale? locale; ShareAdMessageLinkUsedRequest({this.shareAdMessageToken,this.locale}); ShareAdMessageLinkUsedRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { shareAdMessageToken = json['shareAdMessageToken']; locale = JsonConverters.fromJson(json['locale'],'Locale',context!); return this; } Map toJson() => { 'shareAdMessageToken': shareAdMessageToken, 'locale': JsonConverters.toJson(locale,'Locale',context!) }; createResponse() => ShareAdMessageLinkUsedResponse(); getResponseTypeName() => "ShareAdMessageLinkUsedResponse"; getTypeName() => "ShareAdMessageLinkUsedRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'Locale': TypeInfo(TypeOf.Enum, enumValues:Locale.values), 'SharingUser': TypeInfo(TypeOf.Class, create:() => SharingUser()), 'OpeningHour': TypeInfo(TypeOf.Class, create:() => OpeningHour()), 'WeeklyOpeningHours': TypeInfo(TypeOf.Class, create:() => WeeklyOpeningHours()), 'OpeningHours': TypeInfo(TypeOf.Class, create:() => OpeningHours()), 'TimeZoneDto': TypeInfo(TypeOf.Class, create:() => TimeZoneDto()), 'SharedRootCategory': TypeInfo(TypeOf.Class, create:() => SharedRootCategory()), 'PriceMainDish': TypeInfo(TypeOf.Enum, enumValues:PriceMainDish.values), 'SharePriceMainDish': TypeInfo(TypeOf.Class, create:() => SharePriceMainDish()), 'ShareWearPriceProfile': TypeInfo(TypeOf.Class, create:() => ShareWearPriceProfile()), 'SharedPlace': TypeInfo(TypeOf.Class, create:() => SharedPlace()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SharingState': TypeInfo(TypeOf.Enum, enumValues:SharingState.values), 'SharedAdMessage': TypeInfo(TypeOf.Class, create:() => SharedAdMessage()), 'ShareAdMessageLinkUsedResponse': TypeInfo(TypeOf.Class, create:() => ShareAdMessageLinkUsedResponse()), 'ShareAdMessageLinkUsedRequest': TypeInfo(TypeOf.Class, create:() => ShareAdMessageLinkUsedRequest()), });