""" Options: Date: 2024-12-23 12:48:08 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: FindRequest.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum # module ConsumerApi class Parking(str, Enum): STREET_PARKING = 'StreetParking' PARKING_GARAGE_NEARBY = 'ParkingGarageNearby' class PaymentOption(str, Enum): VISA = 'Visa' MASTER_CARD = 'MasterCard' AMERICAN_EXPRESS = 'AmericanExpress' DINERS = 'Diners' VIPPS = 'Vipps' class PriceMainDish(str, Enum): VALUE = 'Value' MEDIUM = 'Medium' HIGH = 'High' FINE_DINING = 'FineDining' class DayOfWeek(str, Enum): SUNDAY = 'Sunday' MONDAY = 'Monday' TUESDAY = 'Tuesday' WEDNESDAY = 'Wednesday' THURSDAY = 'Thursday' FRIDAY = 'Friday' SATURDAY = 'Saturday' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class OpenAtTimeDto: week_day: Optional[DayOfWeek] = None hour: int = 0 minute: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class QueryFilterDto: term: Optional[str] = None place_guid: Optional[str] = None ad_message_guid: Optional[str] = None category_absolute_slugs: Optional[List[str]] = None bar_speciality_slugs: Optional[List[str]] = None bar_type_slugs: Optional[List[str]] = None brand_names: Optional[List[str]] = None cuisine_slugs: Optional[List[str]] = None meal_type_slugs: Optional[List[str]] = None parking: Optional[List[Parking]] = None payment_options: Optional[List[PaymentOption]] = None price_main_dishes: Optional[List[PriceMainDish]] = None eating_suitability_slugs: Optional[List[str]] = None take_away_slugs: Optional[List[str]] = None wear_price_profile_slugs: Optional[List[str]] = None wheel_chair_accessible: Optional[bool] = None wifi: Optional[bool] = None outdoor_seating: Optional[bool] = None save_food_and_money: Optional[bool] = None open_at: Optional[OpenAtTimeDto] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class QueryLocationDto: longitude: Optional[float] = None latitude: Optional[float] = None search_radius_in_km: Optional[float] = None class ICacheable: cache_version: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class OpeningHour: open_at_hour: int = 0 open_at_minute: int = 0 close_at_hour: int = 0 close_at_minute: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class WeeklyOpeningHours: monday: Optional[OpeningHour] = None tuesday: Optional[OpeningHour] = None wednesday: Optional[OpeningHour] = None thursday: Optional[OpeningHour] = None friday: Optional[OpeningHour] = None saturday: Optional[OpeningHour] = None sunday: Optional[OpeningHour] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class OpeningHours: weekly: Optional[WeeklyOpeningHours] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CategoryTreeDto: name: Optional[str] = None slug: Optional[str] = None absolute_slug: Optional[str] = None image_url: Optional[str] = None all_image_url: Optional[str] = None icon_image_url: Optional[str] = None position: int = 0 children: Optional[List[CategoryTreeDto]] = None class FeatureType(str, Enum): BAR_SPECIALITY = 'BarSpeciality' BAR_TYPE = 'BarType' CUISINE = 'Cuisine' SAVE_FOOD_AND_MONEY = 'SaveFoodAndMoney' MEAL_TYPE = 'MealType' MENU = 'Menu' OUTDOOR_SEATING = 'OutdoorSeating' PARKING = 'Parking' PAYMENT_OPTIONS = 'PaymentOptions' PRICE_MAIN_DISH = 'PriceMainDish' SUB_CATEGORIES = 'SubCategories' SUB_CATEGORIES_AND_BRANDS = 'SubCategoriesAndBrands' EATING_SUITABILITIES = 'EatingSuitabilities' TAKE_AWAY = 'TakeAway' WEAR_PRICE_PROFILE = 'WearPriceProfile' WHEEL_CHAIR_ACCESSIBLE = 'WheelChairAccessible' WIFI = 'Wifi' WEB_SHOP = 'WebShop' FILTERING = 'Filtering' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class IndividualFeatureDataDto: slug: Optional[FeatureType] = None label: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BarSpecialityDto: slug: Optional[str] = None title: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BarTypeDto: slug: Optional[str] = None title: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BrandDto: name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PlaceCustomBrandDto: name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PlaceSelectedBrandDto: brand: Optional[BrandDto] = None category_absolute_slugs: Optional[List[str]] = None place_custom_brand: Optional[PlaceCustomBrandDto] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CuisineDto: label: Optional[str] = None slug: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class MealTypeDto: label: Optional[str] = None slug: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ParkingDto: label: Optional[str] = None slug: Optional[Parking] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PaymentOptionDto: label: Optional[str] = None slug: Optional[PaymentOption] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EatingSuitabilityDto: label: Optional[str] = None slug: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class TakeAwayDto: label: Optional[str] = None slug: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class WearPriceProfileDto: slug: Optional[str] = None label: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class MenuDto: name: Optional[str] = None url: Optional[str] = None position: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ImageUrls: preview: Optional[str] = None small: Optional[str] = None medium: Optional[str] = None large: Optional[str] = None class PlaceType(str, Enum): MALL = 'Mall' REGULAR = 'Regular' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PriceMainDishDto: title: Optional[str] = None slug: Optional[PriceMainDish] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class TimeZoneDto: base_utc_offset: datetime.timedelta = datetime.timedelta() daylight_name: Optional[str] = None display_name: Optional[str] = None id: Optional[str] = None standard_name: Optional[str] = None supports_daylight_saving_time: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PlaceContact: phone: Optional[str] = None email: Optional[str] = None website: Optional[str] = None web_shop: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PlaceAddress: street: Optional[str] = None postal_code: Optional[str] = None region: Optional[str] = None country_code: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PlaceBasicDto: id: int = 0 guid: Optional[str] = None overview: Optional[str] = None name: Optional[str] = None longitude: float = 0.0 latitude: float = 0.0 claimed: bool = False organization_number: Optional[str] = None country_code: Optional[str] = None opening_hours: Optional[OpeningHours] = None wheelchair_accessible: Optional[bool] = None wifi: Optional[bool] = None outdoor_seating: Optional[bool] = None save_food_and_money: Optional[bool] = None place_type: Optional[PlaceType] = None price_main_dish: Optional[PriceMainDishDto] = None time_zone_dto: Optional[TimeZoneDto] = None business_id: Optional[int] = None contact: Optional[PlaceContact] = None address: Optional[PlaceAddress] = None categories: Optional[List[CategoryTreeDto]] = None logo_url: Optional[ImageUrls] = None image_url: Optional[ImageUrls] = None wear_price_profiles: Optional[List[WearPriceProfileDto]] = None brands: Optional[List[PlaceSelectedBrandDto]] = None floor: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class MallOtherServiceDto: service_name: Optional[str] = None floor: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PlaceDto: id: int = 0 guid: Optional[str] = None overview: Optional[str] = None name: Optional[str] = None longitude: float = 0.0 latitude: float = 0.0 claimed: bool = False organization_number: Optional[str] = None country_code: Optional[str] = None place_state: Optional[str] = None followers_count: int = 0 opening_hours: Optional[OpeningHours] = None categories: Optional[List[CategoryTreeDto]] = None feature_data: Optional[List[IndividualFeatureDataDto]] = None bar_specialities: Optional[List[BarSpecialityDto]] = None bar_types: Optional[List[BarTypeDto]] = None brands: Optional[List[PlaceSelectedBrandDto]] = None cuisines: Optional[List[CuisineDto]] = None meal_types: Optional[List[MealTypeDto]] = None parking: Optional[List[ParkingDto]] = None payment_options: Optional[List[PaymentOptionDto]] = None eating_suitabilities: Optional[List[EatingSuitabilityDto]] = None take_aways: Optional[List[TakeAwayDto]] = None wear_price_profiles: Optional[List[WearPriceProfileDto]] = None menus: Optional[List[MenuDto]] = None logo_url: Optional[ImageUrls] = None image_url: Optional[ImageUrls] = None wheelchair_accessible: Optional[bool] = None wifi: Optional[bool] = None outdoor_seating: Optional[bool] = None save_food_and_money: Optional[bool] = None place_type: Optional[PlaceType] = None mall: Optional[PlaceBasicDto] = None price_main_dish: Optional[PriceMainDishDto] = None places: Optional[List[PlaceBasicDto]] = None other_services: Optional[List[MallOtherServiceDto]] = None floor: Optional[str] = None time_zone_dto: Optional[TimeZoneDto] = None business_id: Optional[int] = None contact: Optional[PlaceContact] = None address: Optional[PlaceAddress] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsBase: description: Optional[str] = None more_information: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsPercentageDiscountOnAllMerchandise(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsPercentageDiscountRangeOnAllMerchandise(AdMessageDetailsBase): start: float = 0.0 stop: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsPercentageDiscountOnSelectedMerchandise(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise(AdMessageDetailsBase): start: float = 0.0 stop: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsTotalAmountOverXgivesYdiscount(AdMessageDetailsBase): if_total_amount_more_than_x: float = 0.0 then_you_get_discount_percentage_y: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsXforYdiscount(AdMessageDetailsBase): if_you_buy_x: int = 0 then_you_get_y: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsNewArrivals(AdMessageDetailsBase): pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsFreetext(AdMessageDetailsBase): title: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsTodaysBreakFastOffer(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsTodaysLunchOffer(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsTodaysDinnerOffer(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsSaveFoodAndMoney(AdMessageDetailsBase): value: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsPercentageOffYourFoodBill(AdMessageDetailsBase): percentage: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsHappyHour(AdMessageDetailsBase): pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsSomeFreeTablesLeftToday(AdMessageDetailsBase): pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsTwoDishesForThePriceOfOne(AdMessageDetailsBase): pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDetailsUnion: percentage_on_all_merchandise: Optional[AdMessageDetailsPercentageDiscountOnAllMerchandise] = None percentage_range_on_all_merchandise: Optional[AdMessageDetailsPercentageDiscountRangeOnAllMerchandise] = None percentage_on_selected_merchandise: Optional[AdMessageDetailsPercentageDiscountOnSelectedMerchandise] = None absolute_on_selected_merchandise: Optional[AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise] = None absolute_range_on_all_merchandise: Optional[AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise] = None total_amount_over_xgives_ydiscount: Optional[AdMessageDetailsTotalAmountOverXgivesYdiscount] = None xfor_y: Optional[AdMessageDetailsXforYdiscount] = None new_arrivals: Optional[AdMessageDetailsNewArrivals] = None freetext: Optional[AdMessageDetailsFreetext] = None todays_break_fast_offer: Optional[AdMessageDetailsTodaysBreakFastOffer] = None todays_lunch_offer: Optional[AdMessageDetailsTodaysLunchOffer] = None todays_dinner_offer: Optional[AdMessageDetailsTodaysDinnerOffer] = None save_food_and_money: Optional[AdMessageDetailsSaveFoodAndMoney] = None percentage_of_your_food_bill: Optional[AdMessageDetailsPercentageOffYourFoodBill] = None happy_hour: Optional[AdMessageDetailsHappyHour] = None some_free_tables_left_today: Optional[AdMessageDetailsSomeFreeTablesLeftToday] = None two_dishes_for_the_price_of_one: Optional[AdMessageDetailsTwoDishesForThePriceOfOne] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdMessageDto: id: int = 0 guid: Optional[str] = None title: Optional[str] = None start_at: datetime.datetime = datetime.datetime(1, 1, 1) stop_at: datetime.datetime = datetime.datetime(1, 1, 1) publish_at: datetime.datetime = datetime.datetime(1, 1, 1) image_urls: Optional[List[ImageUrls]] = None place: Optional[PlaceBasicDto] = None details_union: Optional[AdMessageDetailsUnion] = None starred_count: int = 0 class CategoryFacetTreeType(str, Enum): PARENT = 'Parent' SELECTED = 'Selected' AVAILABLE = 'Available' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CategoryFacetTreeDto: name: Optional[str] = None slug: Optional[str] = None absolute_slug: Optional[str] = None feature_types: Optional[List[FeatureType]] = None type: Optional[CategoryFacetTreeType] = None count: Optional[int] = None image_url: Optional[str] = None all_image_url: Optional[str] = None icon_image_url: Optional[str] = None position: int = 0 children: Optional[List[CategoryFacetTreeDto]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class FindResponse: ad_messages: Optional[List[AdMessageDto]] = None places: Optional[List[PlaceDto]] = None place_count: int = 0 ad_message_count: int = 0 ad_message_save_food_and_money_count: Optional[int] = None result_at: Optional[datetime.datetime] = None category_facet_trees: Optional[List[CategoryFacetTreeDto]] = None # @Route("/find", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class FindRequest(IReturn[FindResponse], IGet, IPost, ICacheable): offset: Optional[int] = None size: Optional[int] = None result_at: Optional[datetime.datetime] = None filter: Optional[QueryFilterDto] = None location: Optional[QueryLocationDto] = None cache_version: Optional[int] = None