/* Options: Date: 2024-12-23 11:20: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: CompleteProfileRequest.* //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; } class CompleteProfileResponse implements IConvertible { UserProfileDto? userProfile; CompleteProfileResponse({this.userProfile}); CompleteProfileResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { userProfile = JsonConverters.fromJson(json['userProfile'],'UserProfileDto',context!); return this; } Map toJson() => { 'userProfile': JsonConverters.toJson(userProfile,'UserProfileDto',context!) }; getTypeName() => "CompleteProfileResponse"; TypeContext? context = _ctx; } // @Route("/user/complete_profile", "PUT") class CompleteProfileRequest implements IReturn, IPut, IConvertible { // @Validate(Validator="NotNull") Sex? sex; // @Validate(Validator="NotEmpty") bool? acceptTermsOfService; CompleteProfileRequest({this.sex,this.acceptTermsOfService}); CompleteProfileRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { sex = JsonConverters.fromJson(json['sex'],'Sex',context!); acceptTermsOfService = json['acceptTermsOfService']; return this; } Map toJson() => { 'sex': JsonConverters.toJson(sex,'Sex',context!), 'acceptTermsOfService': acceptTermsOfService }; createResponse() => CompleteProfileResponse(); getResponseTypeName() => "CompleteProfileResponse"; getTypeName() => "CompleteProfileRequest"; 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()), 'CompleteProfileResponse': TypeInfo(TypeOf.Class, create:() => CompleteProfileResponse()), 'CompleteProfileRequest': TypeInfo(TypeOf.Class, create:() => CompleteProfileRequest()), });