/* Options: Date: 2024-06-26 06:13:06 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBookingUserQueue.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class CustomerToBook implements IConvertible { /** * Customers firstname */ // @ApiMember(Description="Customers firstname", IsRequired=true) String? Firstname; /** * Customers lastname */ // @ApiMember(Description="Customers lastname", IsRequired=true) String? Lastname; /** * Customers email */ // @ApiMember(Description="Customers email", IsRequired=true) String? Email; /** * Customers phone number. Mobile phone number is required for SMS messages to be sent. */ // @ApiMember(Description="Customers phone number. Mobile phone number is required for SMS messages to be sent.", IsRequired=true) String? Phone; CustomerToBook({this.Firstname,this.Lastname,this.Email,this.Phone}); CustomerToBook.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; Phone = json['Phone']; return this; } Map toJson() => { 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'Phone': Phone }; getTypeName() => "CustomerToBook"; TypeContext? context = _ctx; } class QuantityToBook implements IConvertible { /** * If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book) */ // @ApiMember(Description="If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)", IsRequired=true) int? PriceId; /** * Set the number of spots or resources you want to book on the specific price category */ // @ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true) int? Quantity; /** * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. */ // @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.") bool? OccupiesSpot; QuantityToBook({this.PriceId,this.Quantity,this.OccupiesSpot}); QuantityToBook.fromJson(Map json) { fromMap(json); } fromMap(Map json) { PriceId = json['PriceId']; Quantity = json['Quantity']; OccupiesSpot = json['OccupiesSpot']; return this; } Map toJson() => { 'PriceId': PriceId, 'Quantity': Quantity, 'OccupiesSpot': OccupiesSpot }; getTypeName() => "QuantityToBook"; TypeContext? context = _ctx; } class GroupBookingSettings implements IConvertible { bool? Active; int? Min; int? Max; GroupBookingSettings({this.Active,this.Min,this.Max}); GroupBookingSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Active = json['Active']; Min = json['Min']; Max = json['Max']; return this; } Map toJson() => { 'Active': Active, 'Min': Min, 'Max': Max }; getTypeName() => "GroupBookingSettings"; TypeContext? context = _ctx; } class MultipleResourceSettings implements IConvertible { bool? Active; int? Min; int? Max; MultipleResourceSettings({this.Active,this.Min,this.Max}); MultipleResourceSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Active = json['Active']; Min = json['Min']; Max = json['Max']; return this; } Map toJson() => { 'Active': Active, 'Min': Min, 'Max': Max }; getTypeName() => "MultipleResourceSettings"; TypeContext? context = _ctx; } class BookingUserQueuePriceResponse implements IConvertible { String? CompanyId; int? Id; int? BookingUserQueueId; int? ServicePriceId; int? Quantity; BookingUserQueuePriceResponse({this.CompanyId,this.Id,this.BookingUserQueueId,this.ServicePriceId,this.Quantity}); BookingUserQueuePriceResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; BookingUserQueueId = json['BookingUserQueueId']; ServicePriceId = json['ServicePriceId']; Quantity = json['Quantity']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'BookingUserQueueId': BookingUserQueueId, 'ServicePriceId': ServicePriceId, 'Quantity': Quantity }; getTypeName() => "BookingUserQueuePriceResponse"; TypeContext? context = _ctx; } class ServiceInfoResponse implements IConvertible { int? Id; String? Name; String? Description; Uri? ImageUrl; int? LengthInMinutes; int? MaxNumberOfSpotsPerBooking; GroupBookingSettings? GroupBooking; MultipleResourceSettings? MultipleResource; bool? IsGroupBooking; bool? IsPaymentEnabled; ServiceInfoResponse({this.Id,this.Name,this.Description,this.ImageUrl,this.LengthInMinutes,this.MaxNumberOfSpotsPerBooking,this.GroupBooking,this.MultipleResource,this.IsGroupBooking,this.IsPaymentEnabled}); ServiceInfoResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); LengthInMinutes = json['LengthInMinutes']; MaxNumberOfSpotsPerBooking = json['MaxNumberOfSpotsPerBooking']; GroupBooking = JsonConverters.fromJson(json['GroupBooking'],'GroupBookingSettings',context!); MultipleResource = JsonConverters.fromJson(json['MultipleResource'],'MultipleResourceSettings',context!); IsGroupBooking = json['IsGroupBooking']; IsPaymentEnabled = json['IsPaymentEnabled']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'LengthInMinutes': LengthInMinutes, 'MaxNumberOfSpotsPerBooking': MaxNumberOfSpotsPerBooking, 'GroupBooking': JsonConverters.toJson(GroupBooking,'GroupBookingSettings',context!), 'MultipleResource': JsonConverters.toJson(MultipleResource,'MultipleResourceSettings',context!), 'IsGroupBooking': IsGroupBooking, 'IsPaymentEnabled': IsPaymentEnabled }; getTypeName() => "ServiceInfoResponse"; TypeContext? context = _ctx; } class CompanyInfoResponse implements IConvertible { String? Id; String? Name; Uri? LogoType; String? Category; String? Street1; String? Street2; String? ZipCode; String? City; String? CountryId; String? Longitude; String? Latitude; String? Phone; String? Email; String? HomePage; String? SitePath; CompanyInfoResponse({this.Id,this.Name,this.LogoType,this.Category,this.Street1,this.Street2,this.ZipCode,this.City,this.CountryId,this.Longitude,this.Latitude,this.Phone,this.Email,this.HomePage,this.SitePath}); CompanyInfoResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; LogoType = JsonConverters.fromJson(json['LogoType'],'Uri',context!); Category = json['Category']; Street1 = json['Street1']; Street2 = json['Street2']; ZipCode = json['ZipCode']; City = json['City']; CountryId = json['CountryId']; Longitude = json['Longitude']; Latitude = json['Latitude']; Phone = json['Phone']; Email = json['Email']; HomePage = json['HomePage']; SitePath = json['SitePath']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'LogoType': JsonConverters.toJson(LogoType,'Uri',context!), 'Category': Category, 'Street1': Street1, 'Street2': Street2, 'ZipCode': ZipCode, 'City': City, 'CountryId': CountryId, 'Longitude': Longitude, 'Latitude': Latitude, 'Phone': Phone, 'Email': Email, 'HomePage': HomePage, 'SitePath': SitePath }; getTypeName() => "CompanyInfoResponse"; TypeContext? context = _ctx; } class BookingUserQueueItemResponse implements IConvertible { int? BookingUserQueueId; String? CompanyId; String? CustomerId; int? ServiceId; DateTime? From; DateTime? To; int? StatusCode; String? StatusName; DateTime? SendConfirmationTime; List? Quantities; ServiceInfoResponse? Service; CompanyInfoResponse? Company; BookingUserQueueItemResponse({this.BookingUserQueueId,this.CompanyId,this.CustomerId,this.ServiceId,this.From,this.To,this.StatusCode,this.StatusName,this.SendConfirmationTime,this.Quantities,this.Service,this.Company}); BookingUserQueueItemResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { BookingUserQueueId = json['BookingUserQueueId']; CompanyId = json['CompanyId']; CustomerId = json['CustomerId']; ServiceId = json['ServiceId']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); StatusCode = json['StatusCode']; StatusName = json['StatusName']; SendConfirmationTime = JsonConverters.fromJson(json['SendConfirmationTime'],'DateTime',context!); Quantities = JsonConverters.fromJson(json['Quantities'],'List',context!); Service = JsonConverters.fromJson(json['Service'],'ServiceInfoResponse',context!); Company = JsonConverters.fromJson(json['Company'],'CompanyInfoResponse',context!); return this; } Map toJson() => { 'BookingUserQueueId': BookingUserQueueId, 'CompanyId': CompanyId, 'CustomerId': CustomerId, 'ServiceId': ServiceId, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'StatusCode': StatusCode, 'StatusName': StatusName, 'SendConfirmationTime': JsonConverters.toJson(SendConfirmationTime,'DateTime',context!), 'Quantities': JsonConverters.toJson(Quantities,'List',context!), 'Service': JsonConverters.toJson(Service,'ServiceInfoResponse',context!), 'Company': JsonConverters.toJson(Company,'CompanyInfoResponse',context!) }; getTypeName() => "BookingUserQueueItemResponse"; TypeContext? context = _ctx; } // @Route("/bookinguserqueue", "POST") class CreateBookingUserQueue implements IReturn, IConvertible, IPost { String? CompanyId; String? CustomerId; CustomerToBook? Customer; int? ServiceId; DateTime? From; DateTime? To; List? Quantities; CreateBookingUserQueue({this.CompanyId,this.CustomerId,this.Customer,this.ServiceId,this.From,this.To,this.Quantities}); CreateBookingUserQueue.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; CustomerId = json['CustomerId']; Customer = JsonConverters.fromJson(json['Customer'],'CustomerToBook',context!); ServiceId = json['ServiceId']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); Quantities = JsonConverters.fromJson(json['Quantities'],'List',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'CustomerId': CustomerId, 'Customer': JsonConverters.toJson(Customer,'CustomerToBook',context!), 'ServiceId': ServiceId, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'Quantities': JsonConverters.toJson(Quantities,'List',context!) }; createResponse() => BookingUserQueueItemResponse(); getResponseTypeName() => "BookingUserQueueItemResponse"; getTypeName() => "CreateBookingUserQueue"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'CustomerToBook': TypeInfo(TypeOf.Class, create:() => CustomerToBook()), 'QuantityToBook': TypeInfo(TypeOf.Class, create:() => QuantityToBook()), 'GroupBookingSettings': TypeInfo(TypeOf.Class, create:() => GroupBookingSettings()), 'MultipleResourceSettings': TypeInfo(TypeOf.Class, create:() => MultipleResourceSettings()), 'BookingUserQueuePriceResponse': TypeInfo(TypeOf.Class, create:() => BookingUserQueuePriceResponse()), 'ServiceInfoResponse': TypeInfo(TypeOf.Class, create:() => ServiceInfoResponse()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'CompanyInfoResponse': TypeInfo(TypeOf.Class, create:() => CompanyInfoResponse()), 'BookingUserQueueItemResponse': TypeInfo(TypeOf.Class, create:() => BookingUserQueueItemResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CreateBookingUserQueue': TypeInfo(TypeOf.Class, create:() => CreateBookingUserQueue()), 'List': TypeInfo(TypeOf.Class, create:() => []), });