/* Options: Date: 2024-11-21 11:57:34 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: UpdateDateSchedule.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class AddScheduleService implements IConvertible { /** * The service id */ // @ApiMember(Description="The service id", IsRequired=true) int? Id; AddScheduleService({this.Id}); AddScheduleService.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; return this; } Map toJson() => { 'Id': Id }; getTypeName() => "AddScheduleService"; TypeContext? context = _ctx; } 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 AddScheduleResource implements IConvertible { /** * The resource id */ // @ApiMember(Description="The resource id", IsRequired=true) int? Id; AddScheduleResource({this.Id}); AddScheduleResource.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; return this; } Map toJson() => { 'Id': Id }; getTypeName() => "AddScheduleResource"; TypeContext? context = _ctx; } class ScheduleResources implements IConvertible { int? Id; /** * Name of the resource */ // @ApiMember(Description="Name of the resource") String? Name; /** * The image url of the resource */ // @ApiMember(Description="The image url of the resource") Uri? ImageUrl; ScheduleResources({this.Id,this.Name,this.ImageUrl}); ScheduleResources.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!) }; getTypeName() => "ScheduleResources"; TypeContext? context = _ctx; } class ScheduleServices implements IConvertible { int? Id; /** * Name of the service */ // @ApiMember(Description="Name of the service") String? Name; /** * The image url of the service */ // @ApiMember(Description="The image url of the service") Uri? ImageUrl; ScheduleServices({this.Id,this.Name,this.ImageUrl}); ScheduleServices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!) }; getTypeName() => "ScheduleServices"; TypeContext? context = _ctx; } class DateScheduleDateResponse implements IConvertible { int? Id; DateTime? From; DateTime? To; ResponseStatus? ResponseStatus; DateScheduleDateResponse({this.Id,this.From,this.To,this.ResponseStatus}); DateScheduleDateResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "DateScheduleDateResponse"; TypeContext? context = _ctx; } class DateScheduleQueryResponse implements IConvertible { /** * The schedule id */ // @ApiMember(Description="The schedule id") int? Id; /** * Name of the schedule */ // @ApiMember(Description="Name of the schedule") String? Name; /** * Description of the schedule */ // @ApiMember(Description="Description of the schedule") String? Description; /** * If the schedule is active or not */ // @ApiMember(Description="If the schedule is active or not") bool? Active; /** * If the schedule is only connected to some specific resources. Note: You must have IncludeResources property to see this. */ // @ApiMember(Description="If the schedule is only connected to some specific resources. Note: You must have IncludeResources property to see this.", IsRequired=true) bool? IsResourceSpecific; /** * Schedule dates */ // @ApiMember(Description="Schedule dates") List? ScheduleDates; /** * The resources that is connected to the schedule */ // @ApiMember(Description="The resources that is connected to the schedule") List? Resources; /** * The services that is connected to the schedule */ // @ApiMember(Description="The services that is connected to the schedule") List? Services; /** * The timestamp when the schedule was updated */ // @ApiMember(Description="The timestamp when the schedule was updated", IsRequired=true) DateTime? UpdatedDate; /** * The timestamp when the schedule was created */ // @ApiMember(Description="The timestamp when the schedule was created", IsRequired=true) DateTime? CreatedDate; ResponseStatus? ResponseStatus; DateScheduleQueryResponse({this.Id,this.Name,this.Description,this.Active,this.IsResourceSpecific,this.ScheduleDates,this.Resources,this.Services,this.UpdatedDate,this.CreatedDate,this.ResponseStatus}); DateScheduleQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Active = json['Active']; IsResourceSpecific = json['IsResourceSpecific']; ScheduleDates = JsonConverters.fromJson(json['ScheduleDates'],'List',context!); Resources = JsonConverters.fromJson(json['Resources'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Active': Active, 'IsResourceSpecific': IsResourceSpecific, 'ScheduleDates': JsonConverters.toJson(ScheduleDates,'List',context!), 'Resources': JsonConverters.toJson(Resources,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!), 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "DateScheduleQueryResponse"; TypeContext? context = _ctx; } // @Route("/schedules/date/{Id}", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class UpdateDateSchedule implements IReturn, ICompany, IConvertible, IPut { /** * Id of the schedule to update */ // @ApiMember(Description="Id of the schedule to update", IsRequired=true, ParameterType="path") int? Id; /** * 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 schedule name */ // @ApiMember(Description="The schedule name") String? Name; /** * The schedule description */ // @ApiMember(Description="The schedule description") String? Description; /** * If schedule is active or not */ // @ApiMember(Description="If schedule is active or not") bool? Active; /** * The number of days the schedule is valid from todays date */ // @ApiMember(Description="The number of days the schedule is valid from todays date", IsRequired=true) int? NumberOfScheduleDays; /** * The dates for the schedule. This is the actual timeslots. */ // @ApiMember(Description="The dates for the schedule. This is the actual timeslots.") List? ScheduleDates; /** * If the schedule is only connected to some resources, add them here. If empty, it will be used by all resources. */ // @ApiMember(Description="If the schedule is only connected to some resources, add them here. If empty, it will be used by all resources.") List? Resources; /** * Set what services the schedule should be connected to. */ // @ApiMember(Description="Set what services the schedule should be connected to.") List? Services; UpdateDateSchedule({this.Id,this.CompanyId,this.Name,this.Description,this.Active,this.NumberOfScheduleDays,this.ScheduleDates,this.Resources,this.Services}); UpdateDateSchedule.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; Name = json['Name']; Description = json['Description']; Active = json['Active']; NumberOfScheduleDays = json['NumberOfScheduleDays']; ScheduleDates = JsonConverters.fromJson(json['ScheduleDates'],'List',context!); Resources = JsonConverters.fromJson(json['Resources'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'Name': Name, 'Description': Description, 'Active': Active, 'NumberOfScheduleDays': NumberOfScheduleDays, 'ScheduleDates': JsonConverters.toJson(ScheduleDates,'List',context!), 'Resources': JsonConverters.toJson(Resources,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!) }; createResponse() => DateScheduleQueryResponse(); getResponseTypeName() => "DateScheduleQueryResponse"; getTypeName() => "UpdateDateSchedule"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'AddScheduleService': TypeInfo(TypeOf.Class, create:() => AddScheduleService()), 'AddDateScheduleDate': TypeInfo(TypeOf.Class, create:() => AddDateScheduleDate()), 'AddScheduleResource': TypeInfo(TypeOf.Class, create:() => AddScheduleResource()), 'ScheduleResources': TypeInfo(TypeOf.Class, create:() => ScheduleResources()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'ScheduleServices': TypeInfo(TypeOf.Class, create:() => ScheduleServices()), 'DateScheduleDateResponse': TypeInfo(TypeOf.Class, create:() => DateScheduleDateResponse()), 'DateScheduleQueryResponse': TypeInfo(TypeOf.Class, create:() => DateScheduleQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UpdateDateSchedule': TypeInfo(TypeOf.Class, create:() => UpdateDateSchedule()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), });