/* Options: Date: 2024-06-26 10:27:18 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: AvailableTimesQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class IInterval { DateTime? From; DateTime? To; } class AvailableTimesResourceTypeResource implements IConvertible { /** * The resourcetype id */ // @ApiMember(Description="The resourcetype id") int? ResourceTypeId; /** * The resource id */ // @ApiMember(Description="The resource id") int? ResourceId; AvailableTimesResourceTypeResource({this.ResourceTypeId,this.ResourceId}); AvailableTimesResourceTypeResource.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResourceTypeId = json['ResourceTypeId']; ResourceId = json['ResourceId']; return this; } Map toJson() => { 'ResourceTypeId': ResourceTypeId, 'ResourceId': ResourceId }; getTypeName() => "AvailableTimesResourceTypeResource"; 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("/services/{ServiceId}/availabletimes", "GET") class AvailableTimesQuery implements IReturn, IInterval, IConvertible, IGet { /** * Company to show services for */ // @ApiMember(Description="Company to show services for", ParameterType="query") String? CompanyId; /** * Service id */ // @ApiMember(Description="Service id", IsRequired=true, ParameterType="path") int? ServiceId; /** * 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; /** * Here you can select one of the resource in each resourcetype connected to the service, if none is selected it will show available times for all */ // @ApiMember(Description="Here you can select one of the resource in each resourcetype connected to the service, if none is selected it will show available times for all", ParameterType="query") List? Resources; /** * Here you select number of resources to book (in each resourcetype). Default is 1. */ // @ApiMember(Description="Here you select number of resources to book (in each resourcetype). Default is 1.", ParameterType="query") int? NumberOfResources; /** * If you want to include the connected resource types and resources */ // @ApiMember(Description="If you want to include the connected resource types and resources", ParameterType="query") bool? ShowPerResource; /** * Both start and time time should be inside test interval. Default is false which means only start time needs to be inside. */ // @ApiMember(DataType="bool", Description="Both start and time time should be inside test interval. Default is false which means only start time needs to be inside.", ParameterType="query") bool? InsideSearchInterval; /** * The duration you want to book. Needs to withing the service Min and Max. If not set it will use the service duration */ // @ApiMember(DataType="bool", Description="The duration you want to book. Needs to withing the service Min and Max. If not set it will use the service duration", ParameterType="query") int? Duration; ResponseStatus? ResponseStatus; AvailableTimesQuery({this.CompanyId,this.ServiceId,this.From,this.To,this.Resources,this.NumberOfResources,this.ShowPerResource,this.InsideSearchInterval,this.Duration,this.ResponseStatus}); AvailableTimesQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; ServiceId = json['ServiceId']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); Resources = JsonConverters.fromJson(json['Resources'],'List',context!); NumberOfResources = json['NumberOfResources']; ShowPerResource = json['ShowPerResource']; InsideSearchInterval = json['InsideSearchInterval']; Duration = json['Duration']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'ServiceId': ServiceId, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'Resources': JsonConverters.toJson(Resources,'List',context!), 'NumberOfResources': NumberOfResources, 'ShowPerResource': ShowPerResource, 'InsideSearchInterval': InsideSearchInterval, 'Duration': Duration, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; createResponse() => AvailableTimesResponse(); getResponseTypeName() => "AvailableTimesResponse"; getTypeName() => "AvailableTimesQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'IInterval': TypeInfo(TypeOf.Interface), 'AvailableTimesResourceTypeResource': TypeInfo(TypeOf.Class, create:() => AvailableTimesResourceTypeResource()), '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:() => []), 'AvailableTimesQuery': TypeInfo(TypeOf.Class, create:() => AvailableTimesQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });