/* Options: Date: 2024-12-23 12:10:42 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: UserCreateRequest.* //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, } 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 UserCreateResponse implements IConvertible { String? sentVerificationEmailWithRequestId; int? passwordScore; String? userGuid; bool? referFriendAwarded; UserCreateResponse({this.sentVerificationEmailWithRequestId,this.passwordScore,this.userGuid,this.referFriendAwarded}); UserCreateResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { sentVerificationEmailWithRequestId = json['sentVerificationEmailWithRequestId']; passwordScore = json['passwordScore']; userGuid = json['userGuid']; referFriendAwarded = json['referFriendAwarded']; return this; } Map toJson() => { 'sentVerificationEmailWithRequestId': sentVerificationEmailWithRequestId, 'passwordScore': passwordScore, 'userGuid': userGuid, 'referFriendAwarded': referFriendAwarded }; getTypeName() => "UserCreateResponse"; TypeContext? context = _ctx; } // @Route("/signup/create_user", "POST") class UserCreateRequest implements IReturn, IPost, IConvertible { String? token; String? firstName; String? lastName; Sex? sex; DateOfBirth? dateOfBirth; String? email; String? password; String? passwordConfirmation; HomeLocation? home; bool? acceptTermsOfService; String? referFriendToken; UserCreateRequest({this.token,this.firstName,this.lastName,this.sex,this.dateOfBirth,this.email,this.password,this.passwordConfirmation,this.home,this.acceptTermsOfService,this.referFriendToken}); UserCreateRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { token = json['token']; firstName = json['firstName']; lastName = json['lastName']; sex = JsonConverters.fromJson(json['sex'],'Sex',context!); dateOfBirth = JsonConverters.fromJson(json['dateOfBirth'],'DateOfBirth',context!); email = json['email']; password = json['password']; passwordConfirmation = json['passwordConfirmation']; home = JsonConverters.fromJson(json['home'],'HomeLocation',context!); acceptTermsOfService = json['acceptTermsOfService']; referFriendToken = json['referFriendToken']; return this; } Map toJson() => { 'token': token, 'firstName': firstName, 'lastName': lastName, 'sex': JsonConverters.toJson(sex,'Sex',context!), 'dateOfBirth': JsonConverters.toJson(dateOfBirth,'DateOfBirth',context!), 'email': email, 'password': password, 'passwordConfirmation': passwordConfirmation, 'home': JsonConverters.toJson(home,'HomeLocation',context!), 'acceptTermsOfService': acceptTermsOfService, 'referFriendToken': referFriendToken }; createResponse() => UserCreateResponse(); getResponseTypeName() => "UserCreateResponse"; getTypeName() => "UserCreateRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'DateOfBirth': TypeInfo(TypeOf.Class, create:() => DateOfBirth()), 'Sex': TypeInfo(TypeOf.Enum, enumValues:Sex.values), 'UserAddress': TypeInfo(TypeOf.Class, create:() => UserAddress()), 'HomeLocation': TypeInfo(TypeOf.Class, create:() => HomeLocation()), 'UserCreateResponse': TypeInfo(TypeOf.Class, create:() => UserCreateResponse()), 'UserCreateRequest': TypeInfo(TypeOf.Class, create:() => UserCreateRequest()), });