/* Options: Date: 2024-12-15 20:46:49 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://staging-api.billiecart.com.au //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBookingRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class PostOperationUnTenanted implements IPost { PostOperationUnTenanted(); PostOperationUnTenanted.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "PostOperationUnTenanted<$TResponse>"; TypeContext? context = _ctx; } abstract class PostOperationTenanted extends PostOperationUnTenanted implements ITenantedRequest { String? organisationId; PostOperationTenanted({this.organisationId}); PostOperationTenanted.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); organisationId = json['organisationId']; return this; } Map toJson() => super.toJson()..addAll({ 'organisationId': organisationId }); getTypeName() => "PostOperationTenanted<$TResponse>"; TypeContext? context = _ctx; } abstract class ITenantedRequest { String? organisationId; } class Booking implements IIdentifiableResource, IConvertible { DateTime? startUtc; DateTime? endUtc; String? borrowerId; String? carId; String? id; Booking({this.startUtc,this.endUtc,this.borrowerId,this.carId,this.id}); Booking.fromJson(Map json) { fromMap(json); } fromMap(Map json) { startUtc = JsonConverters.fromJson(json['startUtc'],'DateTime',context!); endUtc = JsonConverters.fromJson(json['endUtc'],'DateTime',context!); borrowerId = json['borrowerId']; carId = json['carId']; id = json['id']; return this; } Map toJson() => { 'startUtc': JsonConverters.toJson(startUtc,'DateTime',context!), 'endUtc': JsonConverters.toJson(endUtc,'DateTime',context!), 'borrowerId': borrowerId, 'carId': carId, 'id': id }; getTypeName() => "Booking"; TypeContext? context = _ctx; } abstract class IIdentifiableResource { String? id; } class CreateBookingResponse implements IConvertible { ResponseStatus? responseStatus; Booking? booking; CreateBookingResponse({this.responseStatus,this.booking}); CreateBookingResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); booking = JsonConverters.fromJson(json['booking'],'Booking',context!); return this; } Map toJson() => { 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!), 'booking': JsonConverters.toJson(booking,'Booking',context!) }; getTypeName() => "CreateBookingResponse"; TypeContext? context = _ctx; } // @Route("/bookings", "POST") class CreateBookingRequest extends PostOperationTenanted implements IReturn, IConvertible { String? carId; DateTime? startUtc; DateTime? endUtc; CreateBookingRequest({this.carId,this.startUtc,this.endUtc}); CreateBookingRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); carId = json['carId']; startUtc = JsonConverters.fromJson(json['startUtc'],'DateTime',context!); endUtc = JsonConverters.fromJson(json['endUtc'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'carId': carId, 'startUtc': JsonConverters.toJson(startUtc,'DateTime',context!), 'endUtc': JsonConverters.toJson(endUtc,'DateTime',context!) }); createResponse() => CreateBookingResponse(); getResponseTypeName() => "CreateBookingResponse"; getTypeName() => "CreateBookingRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'staging_api.billiecart.com.au', types: { 'PostOperationUnTenanted': TypeInfo(TypeOf.AbstractClass), 'PostOperationTenanted': TypeInfo(TypeOf.AbstractClass), 'ITenantedRequest': TypeInfo(TypeOf.Interface), 'Booking': TypeInfo(TypeOf.Class, create:() => Booking()), 'IIdentifiableResource': TypeInfo(TypeOf.Interface), 'CreateBookingResponse': TypeInfo(TypeOf.Class, create:() => CreateBookingResponse()), 'CreateBookingRequest': TypeInfo(TypeOf.Class, create:() => CreateBookingRequest()), });