/* Options: Date: 2024-12-23 12:16:36 SwiftVersion: 5.0 Version: 8.0 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://consumer-api.brovs.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: FindAdMessageRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack public class FindAdMessageRequest : IReturn, IGet, IPost, Codable { public typealias Return = FindAdMessageResponse public var offset:Int? public var size:Int? public var resultAt:Date? public var filter:QueryFilterDto public var location:QueryLocationDto public var cacheVersion:Int? required public init(){} } public class FindAdMessageResponse : Codable { public var adMessages:[AdMessageDto] = [] public var adMessageCount:Int public var adMessageSaveFoodAndMoneyCount:Int? public var resultAt:Date? public var categoryFacetTrees:[CategoryFacetTreeDto] = [] required public init(){} } public class QueryFilterDto : Codable { public var term:String public var placeGuid:String? public var adMessageGuid:String? public var categoryAbsoluteSlugs:[String] = [] public var barSpecialitySlugs:[String] = [] public var barTypeSlugs:[String] = [] public var brandNames:[String] = [] public var cuisineSlugs:[String] = [] public var mealTypeSlugs:[String] = [] public var parking:[Parking] = [] public var paymentOptions:[PaymentOption] = [] public var priceMainDishes:[PriceMainDish] = [] public var eatingSuitabilitySlugs:[String] = [] public var takeAwaySlugs:[String] = [] public var wearPriceProfileSlugs:[String] = [] public var wheelChairAccessible:Bool? public var wifi:Bool? public var outdoorSeating:Bool? public var saveFoodAndMoney:Bool? public var openAt:OpenAtTimeDto required public init(){} } public class QueryLocationDto : Codable { public var longitude:Float? public var latitude:Float? public var searchRadiusInKm:Float? required public init(){} } public class AdMessageDto : Codable { public var id:Int public var guid:String public var title:String public var startAt:Date public var stopAt:Date public var publishAt:Date public var imageUrls:[ImageUrls] = [] public var place:PlaceBasicDto public var detailsUnion:AdMessageDetailsUnion public var starredCount:Int required public init(){} } public class CategoryFacetTreeDto : Codable { public var name:String public var slug:String public var absoluteSlug:String public var featureTypes:[FeatureType] = [] public var type:CategoryFacetTreeType public var count:Int? public var imageUrl:String public var allImageUrl:String public var iconImageUrl:String public var position:Int public var children:[CategoryFacetTreeDto] = [] required public init(){} } public enum Parking : String, Codable { case StreetParking case ParkingGarageNearby } public enum PaymentOption : String, Codable { case Visa case MasterCard case AmericanExpress case Diners case Vipps } public enum PriceMainDish : String, Codable { case Value case Medium case High case FineDining } public class OpenAtTimeDto : Codable { public var weekDay:DayOfWeek public var hour:Int public var minute:Int required public init(){} } public class OpeningHours : Codable { public var weekly:WeeklyOpeningHours required public init(){} } public class CategoryTreeDto : Codable { public var name:String public var slug:String public var absoluteSlug:String public var imageUrl:String public var allImageUrl:String public var iconImageUrl:String public var position:Int public var children:[CategoryTreeDto] = [] required public init(){} } public class PlaceSelectedBrandDto : Codable { public var brand:BrandDto public var categoryAbsoluteSlugs:[String] = [] public var placeCustomBrand:PlaceCustomBrandDto required public init(){} } public class WearPriceProfileDto : Codable { public var slug:String public var label:String required public init(){} } public class ImageUrls : Codable { public var preview:String public var small:String public var medium:String public var large:String required public init(){} } public enum PlaceType : String, Codable { case Mall case Regular } public class PlaceBasicDto : Codable { public var id:Int public var guid:String public var overview:String public var name:String public var longitude:Float public var latitude:Float public var claimed:Bool public var organizationNumber:String public var countryCode:String public var openingHours:OpeningHours public var wheelchairAccessible:Bool? public var wifi:Bool? public var outdoorSeating:Bool? public var saveFoodAndMoney:Bool? public var placeType:PlaceType public var priceMainDish:PriceMainDishDto public var timeZoneDto:TimeZoneDto public var businessId:Int? public var contact:PlaceContact public var address:PlaceAddress public var categories:[CategoryTreeDto] = [] public var logoUrl:ImageUrls public var imageUrl:ImageUrls public var wearPriceProfiles:[WearPriceProfileDto] = [] public var brands:[PlaceSelectedBrandDto] = [] public var floor:String required public init(){} } public class PriceMainDishDto : Codable { public var title:String public var slug:PriceMainDish required public init(){} } public class TimeZoneDto : Codable { @TimeSpan public var baseUtcOffset:TimeInterval public var daylightName:String public var displayName:String public var id:String public var standardName:String public var supportsDaylightSavingTime:Bool required public init(){} } public class PlaceContact : Codable { public var phone:String public var email:String public var website:String public var webShop:String required public init(){} } public class PlaceAddress : Codable { public var street:String public var postalCode:String public var region:String public var countryCode:String required public init(){} } public class AdMessageDetailsUnion : Codable { public var percentageOnAllMerchandise:AdMessageDetailsPercentageDiscountOnAllMerchandise public var percentageRangeOnAllMerchandise:AdMessageDetailsPercentageDiscountRangeOnAllMerchandise public var percentageOnSelectedMerchandise:AdMessageDetailsPercentageDiscountOnSelectedMerchandise public var absoluteOnSelectedMerchandise:AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise public var absoluteRangeOnAllMerchandise:AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise public var totalAmountOverXgivesYdiscount:AdMessageDetailsTotalAmountOverXgivesYdiscount public var xforY:AdMessageDetailsXforYdiscount public var newArrivals:AdMessageDetailsNewArrivals public var freetext:AdMessageDetailsFreetext public var todaysBreakFastOffer:AdMessageDetailsTodaysBreakFastOffer public var todaysLunchOffer:AdMessageDetailsTodaysLunchOffer public var todaysDinnerOffer:AdMessageDetailsTodaysDinnerOffer public var saveFoodAndMoney:AdMessageDetailsSaveFoodAndMoney public var percentageOfYourFoodBill:AdMessageDetailsPercentageOffYourFoodBill public var happyHour:AdMessageDetailsHappyHour public var someFreeTablesLeftToday:AdMessageDetailsSomeFreeTablesLeftToday public var twoDishesForThePriceOfOne:AdMessageDetailsTwoDishesForThePriceOfOne required public init(){} } public class BrandDto : Codable { public var name:String required public init(){} } public enum FeatureType : String, Codable { case BarSpeciality case BarType case Cuisine case SaveFoodAndMoney case MealType case Menu case OutdoorSeating case Parking case PaymentOptions case PriceMainDish case SubCategories case SubCategoriesAndBrands case EatingSuitabilities case TakeAway case WearPriceProfile case WheelChairAccessible case Wifi case WebShop case Filtering } public enum CategoryFacetTreeType : String, Codable { case Parent case Selected case Available } public enum DayOfWeek : String, Codable { case Sunday case Monday case Tuesday case Wednesday case Thursday case Friday case Saturday } public class WeeklyOpeningHours : Codable { public var monday:OpeningHour public var tuesday:OpeningHour public var wednesday:OpeningHour public var thursday:OpeningHour public var friday:OpeningHour public var saturday:OpeningHour public var sunday:OpeningHour required public init(){} } public class PlaceCustomBrandDto : Codable { public var name:String required public init(){} } public class AdMessageDetailsPercentageDiscountOnAllMerchandise : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsPercentageDiscountRangeOnAllMerchandise : AdMessageDetailsBase { public var start:Double public var stop:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case start case stop } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) start = try container.decodeIfPresent(Double.self, forKey: .start) stop = try container.decodeIfPresent(Double.self, forKey: .stop) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if start != nil { try container.encode(start, forKey: .start) } if stop != nil { try container.encode(stop, forKey: .stop) } } } public class AdMessageDetailsPercentageDiscountOnSelectedMerchandise : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise : AdMessageDetailsBase { public var start:Double public var stop:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case start case stop } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) start = try container.decodeIfPresent(Double.self, forKey: .start) stop = try container.decodeIfPresent(Double.self, forKey: .stop) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if start != nil { try container.encode(start, forKey: .start) } if stop != nil { try container.encode(stop, forKey: .stop) } } } public class AdMessageDetailsTotalAmountOverXgivesYdiscount : AdMessageDetailsBase { public var ifTotalAmountMoreThanX:Double public var thenYouGetDiscountPercentageY:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case ifTotalAmountMoreThanX case thenYouGetDiscountPercentageY } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) ifTotalAmountMoreThanX = try container.decodeIfPresent(Double.self, forKey: .ifTotalAmountMoreThanX) thenYouGetDiscountPercentageY = try container.decodeIfPresent(Double.self, forKey: .thenYouGetDiscountPercentageY) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if ifTotalAmountMoreThanX != nil { try container.encode(ifTotalAmountMoreThanX, forKey: .ifTotalAmountMoreThanX) } if thenYouGetDiscountPercentageY != nil { try container.encode(thenYouGetDiscountPercentageY, forKey: .thenYouGetDiscountPercentageY) } } } public class AdMessageDetailsXforYdiscount : AdMessageDetailsBase { public var ifYouBuyX:Int public var thenYouGetY:Int required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case ifYouBuyX case thenYouGetY } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) ifYouBuyX = try container.decodeIfPresent(Int.self, forKey: .ifYouBuyX) thenYouGetY = try container.decodeIfPresent(Int.self, forKey: .thenYouGetY) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if ifYouBuyX != nil { try container.encode(ifYouBuyX, forKey: .ifYouBuyX) } if thenYouGetY != nil { try container.encode(thenYouGetY, forKey: .thenYouGetY) } } } public class AdMessageDetailsNewArrivals : AdMessageDetailsBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class AdMessageDetailsFreetext : AdMessageDetailsBase { public var title:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case title } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) title = try container.decodeIfPresent(String.self, forKey: .title) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if title != nil { try container.encode(title, forKey: .title) } } } public class AdMessageDetailsTodaysBreakFastOffer : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsTodaysLunchOffer : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsTodaysDinnerOffer : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsSaveFoodAndMoney : AdMessageDetailsBase { public var value:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Double.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class AdMessageDetailsPercentageOffYourFoodBill : AdMessageDetailsBase { public var percentage:Double required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case percentage } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) percentage = try container.decodeIfPresent(Double.self, forKey: .percentage) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if percentage != nil { try container.encode(percentage, forKey: .percentage) } } } public class AdMessageDetailsHappyHour : AdMessageDetailsBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class AdMessageDetailsSomeFreeTablesLeftToday : AdMessageDetailsBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class AdMessageDetailsTwoDishesForThePriceOfOne : AdMessageDetailsBase { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class OpeningHour : Codable { public var openAtHour:Int public var openAtMinute:Int public var closeAtHour:Int public var closeAtMinute:Int required public init(){} } public class AdMessageDetailsBase : Codable { public var Description:String public var moreInformation:[String] = [] required public init(){} }