/* Options: Date: 2024-11-21 12:03:25 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: UpdateResourceTimeException.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } enum CollidingBookingOptions { AddWithoutCancelingCollidingBookings, AddAndCancelCollidingBookings, } class CreateResourceTimeExceptionBase implements IConvertible { /** * If this equals true it will it add the time exception with the option you have selected in CollidingBookingOption. Default is to cancel all colliding bookings. */ // @ApiMember(Description="If this equals true it will it add the time exception with the option you have selected in CollidingBookingOption. Default is to cancel all colliding bookings.") bool? Force; /** * When Force=true and colliding bookings exsists, this message is the message that are sent to the users when canceling their bookings. */ // @ApiMember(Description="When Force=true and colliding bookings exsists, this message is the message that are sent to the users when canceling their bookings.") String? CancelMessage; /** * When Force=true and colliding bookings exsists, send cancelmessage as SMS Confirmation */ // @ApiMember(Description="When Force=true and colliding bookings exsists, send cancelmessage as SMS Confirmation") bool? SendSmsConfirmation; /** * When Force=true and colliding bookings exsists, send cancelmessage as Email Confirmation */ // @ApiMember(Description="When Force=true and colliding bookings exsists, send cancelmessage as Email Confirmation") bool? SendEmailConfirmation; CreateResourceTimeExceptionBase({this.Force,this.CancelMessage,this.SendSmsConfirmation,this.SendEmailConfirmation}); CreateResourceTimeExceptionBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Force = json['Force']; CancelMessage = json['CancelMessage']; SendSmsConfirmation = json['SendSmsConfirmation']; SendEmailConfirmation = json['SendEmailConfirmation']; return this; } Map toJson() => { 'Force': Force, 'CancelMessage': CancelMessage, 'SendSmsConfirmation': SendSmsConfirmation, 'SendEmailConfirmation': SendEmailConfirmation }; getTypeName() => "CreateResourceTimeExceptionBase"; TypeContext? context = _ctx; } class TimeExceptionReosurceDetails implements IConvertible { /** * Ids of the resources that owns this exception */ // @ApiMember(Description="Ids of the resources that owns this exception") int? Id; /** * Name of the resource */ // @ApiMember(Description="Name of the resource") String? Name; /** * Description of the resource */ // @ApiMember(Description="Description of the resource") String? Description; /** * Color of the resource */ // @ApiMember(Description="Color of the resource") String? Color; /** * Image of the resource */ // @ApiMember(Description="Image of the resource") Uri? ImageUrl; ResponseStatus? ResponseStatus; TimeExceptionReosurceDetails({this.Id,this.Name,this.Description,this.Color,this.ImageUrl,this.ResponseStatus}); TimeExceptionReosurceDetails.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Color = json['Color']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Color': Color, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "TimeExceptionReosurceDetails"; TypeContext? context = _ctx; } class ExceptionCalendarExportStatus implements IConvertible { String? CalendarId; int? ExceptionId; bool? Synced; ExceptionCalendarExportStatus({this.CalendarId,this.ExceptionId,this.Synced}); ExceptionCalendarExportStatus.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CalendarId = json['CalendarId']; ExceptionId = json['ExceptionId']; Synced = json['Synced']; return this; } Map toJson() => { 'CalendarId': CalendarId, 'ExceptionId': ExceptionId, 'Synced': Synced }; getTypeName() => "ExceptionCalendarExportStatus"; TypeContext? context = _ctx; } class DayOfWeekDto implements IConvertible { int? DayOfWeekId; int? DotNetDayOfWeekId; String? DayOfWeek; DayOfWeekDto({this.DayOfWeekId,this.DotNetDayOfWeekId,this.DayOfWeek}); DayOfWeekDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { DayOfWeekId = json['DayOfWeekId']; DotNetDayOfWeekId = json['DotNetDayOfWeekId']; DayOfWeek = json['DayOfWeek']; return this; } Map toJson() => { 'DayOfWeekId': DayOfWeekId, 'DotNetDayOfWeekId': DotNetDayOfWeekId, 'DayOfWeek': DayOfWeek }; getTypeName() => "DayOfWeekDto"; TypeContext? context = _ctx; } class ResourceTimeExceptionQueryResponse implements IConvertible { /** * Time exception id */ // @ApiMember(Description="Time exception id") int? Id; /** * Time company id */ // @ApiMember(Description="Time company id") String? CompanyId; /** * If it's locked for editing for the logged in administrator */ // @ApiMember(Description="If it's locked for editing for the logged in administrator") bool? Locked; /** * Resources that owns this exception */ // @ApiMember(Description="Resources that owns this exception") List? ResourceIds; /** * Resources that owns this exception */ // @ApiMember(Description="Resources that owns this exception") List? Resources; /** * Indicates wheter or not the time exception is recurring */ // @ApiMember(Description="Indicates wheter or not the time exception is recurring") bool? IsRecurring; /** * Time exception starting timestamp */ // @ApiMember(Description="Time exception starting timestamp") DateTime? From; /** * Time exception ending timestamp */ // @ApiMember(Description="Time exception ending timestamp") DateTime? To; /** * If recurring then this value indicates the time of day when the time exception begins */ // @ApiMember(Description="If recurring then this value indicates the time of day when the time exception begins") Duration? FromTime; /** * If recurring then this value indicates the time of day when the time exception ends */ // @ApiMember(Description="If recurring then this value indicates the time of day when the time exception ends") Duration? ToTime; /** * The reason of the time exception, example: Vacation, doctors appointment, ... */ // @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...") String? ReasonText; /** * The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ... */ // @ApiMember(Description="The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ...") String? ReasonTextPublic; /** * What hexadecimal color code the exception should have in the scheduler */ // @ApiMember(Description="What hexadecimal color code the exception should have in the scheduler") String? Color; /** * If the time exception should block the time in the scheduler so it's not avaialable to book */ // @ApiMember(Description="If the time exception should block the time in the scheduler so it's not avaialable to book") bool? BlockTime; /** * If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it */ // @ApiMember(Description="If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it") bool? Private; /** * The status for export to calendars like Gcal */ // @ApiMember(Description="The status for export to calendars like Gcal") ExceptionCalendarExportStatus? CalendarExportStatus; /** * If recurring, an array indicating which days of the week the exception recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs */ // @ApiMember(Description="If recurring, an array indicating which days of the week the exception recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs") List? DaysOfWeek; /** * The datetime the exception was created */ // @ApiMember(Description="The datetime the exception was created") DateTime? Created; ResponseStatus? ResponseStatus; ResourceTimeExceptionQueryResponse({this.Id,this.CompanyId,this.Locked,this.ResourceIds,this.Resources,this.IsRecurring,this.From,this.To,this.FromTime,this.ToTime,this.ReasonText,this.ReasonTextPublic,this.Color,this.BlockTime,this.Private,this.CalendarExportStatus,this.DaysOfWeek,this.Created,this.ResponseStatus}); ResourceTimeExceptionQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; Locked = json['Locked']; ResourceIds = JsonConverters.fromJson(json['ResourceIds'],'List',context!); Resources = JsonConverters.fromJson(json['Resources'],'List',context!); IsRecurring = json['IsRecurring']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!); ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!); ReasonText = json['ReasonText']; ReasonTextPublic = json['ReasonTextPublic']; Color = json['Color']; BlockTime = json['BlockTime']; Private = json['Private']; CalendarExportStatus = JsonConverters.fromJson(json['CalendarExportStatus'],'ExceptionCalendarExportStatus',context!); DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List',context!); Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'Locked': Locked, 'ResourceIds': JsonConverters.toJson(ResourceIds,'List',context!), 'Resources': JsonConverters.toJson(Resources,'List',context!), 'IsRecurring': IsRecurring, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'FromTime': JsonConverters.toJson(FromTime,'Duration',context!), 'ToTime': JsonConverters.toJson(ToTime,'Duration',context!), 'ReasonText': ReasonText, 'ReasonTextPublic': ReasonTextPublic, 'Color': Color, 'BlockTime': BlockTime, 'Private': Private, 'CalendarExportStatus': JsonConverters.toJson(CalendarExportStatus,'ExceptionCalendarExportStatus',context!), 'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List',context!), 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "ResourceTimeExceptionQueryResponse"; TypeContext? context = _ctx; } // @Route("/timeexceptions/{Id}", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403) // @ApiResponse(Description="Bookings exists that needs to be unbooked before creating this time exceptions, use the /timeexceptions/collidingevents to find which bookings and use the booking service to unbook them", StatusCode=409) // @ValidateRequest(Validator="IsAuthenticated") class UpdateResourceTimeException extends CreateResourceTimeExceptionBase implements IReturn, ICompany, IConvertible, IPut { /** * 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; /** * Tome exceptions id */ // @ApiMember(Description="Tome exceptions id", ParameterType="path") int? Id; /** * Time exception starting datestamp, only the date of day part is used of this value */ // @ApiMember(Description="Time exception starting datestamp, only the date of day part is used of this value") DateTime? From; /** * Time exception ending datestamp, only the date of day part is used of this value */ // @ApiMember(Description="Time exception ending datestamp, only the date of day part is used of this value") DateTime? To; /** * Resource id of the resource that owns this exception */ // @ApiMember(Description="Resource id of the resource that owns this exception", IsRequired=true) List? ResourceIds; /** * This value indicates the time of day when the time exception begins. Example: 10:00. If Recurring this will be the startime for each recurring day. */ // @ApiMember(Description="This value indicates the time of day when the time exception begins. Example: 10:00. If Recurring this will be the startime for each recurring day.") Duration? FromTime; /** * This value indicates the time of day when the time exception ends. Example: 12:00. If Recurring this will be the endtime for each recurring day. */ // @ApiMember(Description="This value indicates the time of day when the time exception ends. Example: 12:00. If Recurring this will be the endtime for each recurring day.") Duration? ToTime; /** * A comma separated list of which days this day exception belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="A comma separated list of which days this day exception belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") List? DaysOfWeek; /** * The reason of the time exception, example: Vacation, doctors appointment, ... */ // @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...", IsRequired=true) String? ReasonText; /** * The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ... */ // @ApiMember(Description="The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ...") String? ReasonTextPublic; /** * What hexadecimal color code the exception should have in the scheduler */ // @ApiMember(Description="What hexadecimal color code the exception should have in the scheduler") String? Color; /** * If the time exception should block the time in the scheduler so it's not avaialable to book */ // @ApiMember(Description="If the time exception should block the time in the scheduler so it's not avaialable to book") bool? BlockTime; /** * If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it */ // @ApiMember(Description="If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it") bool? Private; /** * By default sets to 1, which is to add time exception without canceling colliding bookings */ // @ApiMember(Description="By default sets to 1, which is to add time exception without canceling colliding bookings") CollidingBookingOptions? CollidingBookingOptions; UpdateResourceTimeException({this.CompanyId,this.Id,this.From,this.To,this.ResourceIds,this.FromTime,this.ToTime,this.DaysOfWeek,this.ReasonText,this.ReasonTextPublic,this.Color,this.BlockTime,this.Private,this.CollidingBookingOptions}); UpdateResourceTimeException.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; From = JsonConverters.fromJson(json['From'],'DateTime',context!); To = JsonConverters.fromJson(json['To'],'DateTime',context!); ResourceIds = JsonConverters.fromJson(json['ResourceIds'],'List',context!); FromTime = JsonConverters.fromJson(json['FromTime'],'Duration',context!); ToTime = JsonConverters.fromJson(json['ToTime'],'Duration',context!); DaysOfWeek = JsonConverters.fromJson(json['DaysOfWeek'],'List',context!); ReasonText = json['ReasonText']; ReasonTextPublic = json['ReasonTextPublic']; Color = json['Color']; BlockTime = json['BlockTime']; Private = json['Private']; CollidingBookingOptions = JsonConverters.fromJson(json['CollidingBookingOptions'],'CollidingBookingOptions',context!); return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'From': JsonConverters.toJson(From,'DateTime',context!), 'To': JsonConverters.toJson(To,'DateTime',context!), 'ResourceIds': JsonConverters.toJson(ResourceIds,'List',context!), 'FromTime': JsonConverters.toJson(FromTime,'Duration',context!), 'ToTime': JsonConverters.toJson(ToTime,'Duration',context!), 'DaysOfWeek': JsonConverters.toJson(DaysOfWeek,'List',context!), 'ReasonText': ReasonText, 'ReasonTextPublic': ReasonTextPublic, 'Color': Color, 'BlockTime': BlockTime, 'Private': Private, 'CollidingBookingOptions': JsonConverters.toJson(CollidingBookingOptions,'CollidingBookingOptions',context!) }); createResponse() => ResourceTimeExceptionQueryResponse(); getResponseTypeName() => "ResourceTimeExceptionQueryResponse"; getTypeName() => "UpdateResourceTimeException"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'CollidingBookingOptions': TypeInfo(TypeOf.Enum, enumValues:CollidingBookingOptions.values), 'CreateResourceTimeExceptionBase': TypeInfo(TypeOf.Class, create:() => CreateResourceTimeExceptionBase()), 'TimeExceptionReosurceDetails': TypeInfo(TypeOf.Class, create:() => TimeExceptionReosurceDetails()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'ExceptionCalendarExportStatus': TypeInfo(TypeOf.Class, create:() => ExceptionCalendarExportStatus()), 'DayOfWeekDto': TypeInfo(TypeOf.Class, create:() => DayOfWeekDto()), 'ResourceTimeExceptionQueryResponse': TypeInfo(TypeOf.Class, create:() => ResourceTimeExceptionQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UpdateResourceTimeException': TypeInfo(TypeOf.Class, create:() => UpdateResourceTimeException()), });