/* Options: Date: 2024-12-23 12:27:30 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: UserStatusRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; class DateOfBirth implements IConvertible { int? year; int? month; int? dayOfMonth; DateOfBirth({this.year,this.month,this.dayOfMonth}); DateOfBirth.fromJson(Map json) { fromMap(json); } fromMap(Map json) { year = json['year']; month = json['month']; dayOfMonth = json['dayOfMonth']; return this; } Map toJson() => { 'year': year, 'month': month, 'dayOfMonth': dayOfMonth }; getTypeName() => "DateOfBirth"; TypeContext? context = _ctx; } enum Sex { Male, Female, } enum DistanceUnit { Kilometer, Mile, } enum Locale { EnUs, NbNo, } class UserAddress implements IConvertible { String? streetName; String? streetNumber; String? postalCode; String? region; String? countryCode; UserAddress({this.streetName,this.streetNumber,this.postalCode,this.region,this.countryCode}); UserAddress.fromJson(Map json) { fromMap(json); } fromMap(Map json) { streetName = json['streetName']; streetNumber = json['streetNumber']; postalCode = json['postalCode']; region = json['region']; countryCode = json['countryCode']; return this; } Map toJson() => { 'streetName': streetName, 'streetNumber': streetNumber, 'postalCode': postalCode, 'region': region, 'countryCode': countryCode }; getTypeName() => "UserAddress"; TypeContext? context = _ctx; } class HomeLocation implements IConvertible { UserAddress? address; double? latitude; double? longitude; HomeLocation({this.address,this.latitude,this.longitude}); HomeLocation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { address = JsonConverters.fromJson(json['address'],'UserAddress',context!); latitude = JsonConverters.toDouble(json['latitude']); longitude = JsonConverters.toDouble(json['longitude']); return this; } Map toJson() => { 'address': JsonConverters.toJson(address,'UserAddress',context!), 'latitude': latitude, 'longitude': longitude }; getTypeName() => "HomeLocation"; TypeContext? context = _ctx; } class UserProfileDto implements IConvertible { Locale? locale; String? userGuid; String? firstName; String? lastName; String? profilePhotoUrl; String? mobilePhone; bool? mobilePhoneVerified; String? email; bool? emailVerified; bool? hasPassword; DateOfBirth? dateOfBirth; Sex? sex; HomeLocation? home; DistanceUnit? showDistancesIn; bool? managesPlacesInBusinessWeb; int? pointsTotal; UserProfileDto({this.locale,this.userGuid,this.firstName,this.lastName,this.profilePhotoUrl,this.mobilePhone,this.mobilePhoneVerified,this.email,this.emailVerified,this.hasPassword,this.dateOfBirth,this.sex,this.home,this.showDistancesIn,this.managesPlacesInBusinessWeb,this.pointsTotal}); UserProfileDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { locale = JsonConverters.fromJson(json['locale'],'Locale',context!); userGuid = json['userGuid']; firstName = json['firstName']; lastName = json['lastName']; profilePhotoUrl = json['profilePhotoUrl']; mobilePhone = json['mobilePhone']; mobilePhoneVerified = json['mobilePhoneVerified']; email = json['email']; emailVerified = json['emailVerified']; hasPassword = json['hasPassword']; dateOfBirth = JsonConverters.fromJson(json['dateOfBirth'],'DateOfBirth',context!); sex = JsonConverters.fromJson(json['sex'],'Sex',context!); home = JsonConverters.fromJson(json['home'],'HomeLocation',context!); showDistancesIn = JsonConverters.fromJson(json['showDistancesIn'],'DistanceUnit',context!); managesPlacesInBusinessWeb = json['managesPlacesInBusinessWeb']; pointsTotal = json['pointsTotal']; return this; } Map toJson() => { 'locale': JsonConverters.toJson(locale,'Locale',context!), 'userGuid': userGuid, 'firstName': firstName, 'lastName': lastName, 'profilePhotoUrl': profilePhotoUrl, 'mobilePhone': mobilePhone, 'mobilePhoneVerified': mobilePhoneVerified, 'email': email, 'emailVerified': emailVerified, 'hasPassword': hasPassword, 'dateOfBirth': JsonConverters.toJson(dateOfBirth,'DateOfBirth',context!), 'sex': JsonConverters.toJson(sex,'Sex',context!), 'home': JsonConverters.toJson(home,'HomeLocation',context!), 'showDistancesIn': JsonConverters.toJson(showDistancesIn,'DistanceUnit',context!), 'managesPlacesInBusinessWeb': managesPlacesInBusinessWeb, 'pointsTotal': pointsTotal }; getTypeName() => "UserProfileDto"; TypeContext? context = _ctx; } enum UserStatus { LoginOrSignup, CompleteProfile, Ready, } class UserStatusResponse implements IConvertible { UserStatus? status; bool? suggestPwaInstallation; UserProfileDto? userProfile; UserStatusResponse({this.status,this.suggestPwaInstallation,this.userProfile}); UserStatusResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { status = JsonConverters.fromJson(json['status'],'UserStatus',context!); suggestPwaInstallation = json['suggestPwaInstallation']; userProfile = JsonConverters.fromJson(json['userProfile'],'UserProfileDto',context!); return this; } Map toJson() => { 'status': JsonConverters.toJson(status,'UserStatus',context!), 'suggestPwaInstallation': suggestPwaInstallation, 'userProfile': JsonConverters.toJson(userProfile,'UserProfileDto',context!) }; getTypeName() => "UserStatusResponse"; TypeContext? context = _ctx; } // @Route("/user/status", "GET") class UserStatusRequest implements IReturn, IGet, IConvertible { // @Validate(Validator="NotNull") bool? fromPwa; UserStatusRequest({this.fromPwa}); UserStatusRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { fromPwa = json['fromPwa']; return this; } Map toJson() => { 'fromPwa': fromPwa }; createResponse() => UserStatusResponse(); getResponseTypeName() => "UserStatusResponse"; getTypeName() => "UserStatusRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'DateOfBirth': TypeInfo(TypeOf.Class, create:() => DateOfBirth()), 'Sex': TypeInfo(TypeOf.Enum, enumValues:Sex.values), 'DistanceUnit': TypeInfo(TypeOf.Enum, enumValues:DistanceUnit.values), 'Locale': TypeInfo(TypeOf.Enum, enumValues:Locale.values), 'UserAddress': TypeInfo(TypeOf.Class, create:() => UserAddress()), 'HomeLocation': TypeInfo(TypeOf.Class, create:() => HomeLocation()), 'UserProfileDto': TypeInfo(TypeOf.Class, create:() => UserProfileDto()), 'UserStatus': TypeInfo(TypeOf.Enum, enumValues:UserStatus.values), 'UserStatusResponse': TypeInfo(TypeOf.Class, create:() => UserStatusResponse()), 'UserStatusRequest': TypeInfo(TypeOf.Class, create:() => UserStatusRequest()), });