/* Options: Date: 2024-11-21 11:32:41 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: TestDateSchedule.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } abstract class IInterval { DateTime? From; DateTime? To; } class AddDateScheduleDate implements IConvertible { /** * The from date for the timeslot */ // @ApiMember(Description="The from date for the timeslot", IsRequired=true) DateTime? From; /** * The to date for the timeslot */ // @ApiMember(Description="The to date for the timeslot", IsRequired=true) DateTime? To; AddDateScheduleDate({this.From,this.To}); AddDateScheduleDate.fromJson(Map json) { fromMap(json); } fromMap(Map json) { From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); return this; } Map toJson() => { 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!) }; getTypeName() => "AddDateScheduleDate"; TypeContext? context = _ctx; } class ExceptionText implements IConvertible { String? Reason; String? ReasonPublic; ExceptionText({this.Reason,this.ReasonPublic}); ExceptionText.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Reason = json['Reason']; ReasonPublic = json['ReasonPublic']; return this; } Map toJson() => { 'Reason': Reason, 'ReasonPublic': ReasonPublic }; getTypeName() => "ExceptionText"; TypeContext? context = _ctx; } class AvailableTimesSum implements IAvailableTime, IConvertible { DateTime? From; DateTime? To; int? Free; int? FreeSpots; List? ExceptionTexts; AvailableTimesSum({this.From,this.To,this.Free,this.FreeSpots,this.ExceptionTexts}); AvailableTimesSum.fromJson(Map json) { fromMap(json); } fromMap(Map json) { From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); Free = json['Free']; FreeSpots = json['FreeSpots']; ExceptionTexts = JsonConverters.fromJson(json['ExceptionTexts'],'List',context!); return this; } Map toJson() => { 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'Free': Free, 'FreeSpots': FreeSpots, 'ExceptionTexts': JsonConverters.toJson(ExceptionTexts,'List',context!) }; getTypeName() => "AvailableTimesSum"; TypeContext? context = _ctx; } abstract class IAvailableTime extends IInterval { int? Free; } class AvailableTimesResponse implements IConvertible { String? CompanyId; int? ServiceId; String? TimesFreeTextSingle; String? TimesFreeTextMultiple; List? Times; AvailableTimesResponse({this.CompanyId,this.ServiceId,this.TimesFreeTextSingle,this.TimesFreeTextMultiple,this.Times}); AvailableTimesResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; ServiceId = json['ServiceId']; TimesFreeTextSingle = json['TimesFreeTextSingle']; TimesFreeTextMultiple = json['TimesFreeTextMultiple']; Times = JsonConverters.fromJson(json['Times'],'List',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'ServiceId': ServiceId, 'TimesFreeTextSingle': TimesFreeTextSingle, 'TimesFreeTextMultiple': TimesFreeTextMultiple, 'Times': JsonConverters.toJson(Times,'List',context!) }; getTypeName() => "AvailableTimesResponse"; TypeContext? context = _ctx; } // @Route("/schedules/date/test", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class TestDateSchedule implements IReturn, ICompany, IInterval, IConvertible, IPost { /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") String? CompanyId; /** * The dates for the schedule. This is the actual timeslots. */ // @ApiMember(Description="The dates for the schedule. This is the actual timeslots.", IsRequired=true) List? ScheduleDates; /** * From what datetime to show available times */ // @ApiMember(DataType="dateTime", Description="From what datetime to show available times", IsRequired=true, ParameterType="query") DateTime? From; /** * To what datetime to show available times */ // @ApiMember(DataType="dateTime", Description="To what datetime to show available times", IsRequired=true, ParameterType="query") DateTime? To; /** * The Service Duration */ // @ApiMember(Description="The Service Duration") int? ServiceId; TestDateSchedule({this.CompanyId,this.ScheduleDates,this.From,this.To,this.ServiceId}); TestDateSchedule.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; ScheduleDates = JsonConverters.fromJson(json['ScheduleDates'],'List',context!); From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); ServiceId = json['ServiceId']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'ScheduleDates': JsonConverters.toJson(ScheduleDates,'List',context!), 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'ServiceId': ServiceId }; createResponse() => AvailableTimesResponse(); getResponseTypeName() => "AvailableTimesResponse"; getTypeName() => "TestDateSchedule"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'IInterval': TypeInfo(TypeOf.Interface), 'AddDateScheduleDate': TypeInfo(TypeOf.Class, create:() => AddDateScheduleDate()), 'ExceptionText': TypeInfo(TypeOf.Class, create:() => ExceptionText()), 'AvailableTimesSum': TypeInfo(TypeOf.Class, create:() => AvailableTimesSum()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'IAvailableTime': TypeInfo(TypeOf.Interface), 'AvailableTimesResponse': TypeInfo(TypeOf.Class, create:() => AvailableTimesResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'TestDateSchedule': TypeInfo(TypeOf.Class, create:() => TestDateSchedule()), 'List': TypeInfo(TypeOf.Class, create:() => []), });