""" Options: Date: 2024-12-23 11:31:40 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: ProfileGetRequest.* #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 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class DateOfBirth: year: int = 0 month: int = 0 day_of_month: int = 0 class Sex(str, Enum): MALE = 'Male' FEMALE = 'Female' class DistanceUnit(str, Enum): KILOMETER = 'Kilometer' MILE = 'Mile' class Locale(str, Enum): EN_US = 'EnUs' NB_NO = 'NbNo' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UserAddress: street_name: Optional[str] = None street_number: 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 HomeLocation: address: Optional[UserAddress] = None latitude: float = 0.0 longitude: float = 0.0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UserProfileDto: locale: Optional[Locale] = None user_guid: Optional[str] = None first_name: Optional[str] = None last_name: Optional[str] = None profile_photo_url: Optional[str] = None mobile_phone: Optional[str] = None mobile_phone_verified: bool = False email: Optional[str] = None email_verified: bool = False has_password: bool = False date_of_birth: Optional[DateOfBirth] = None sex: Optional[Sex] = None home: Optional[HomeLocation] = None show_distances_in: Optional[DistanceUnit] = None manages_places_in_business_web: bool = False points_total: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ProfileGetResponse: user_profile: Optional[UserProfileDto] = None # @Route("/profile", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ProfileGetRequest(IReturn[ProfileGetResponse], IGet): pass