/* Options: Date: 2024-11-21 11:29:52 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: UpdateCodeLockSetting.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class CodeLockSystemResponse implements IConvertible { /** * The system type of the code lock */ // @ApiMember(DataType="int", Description="The system type of the code lock") int? Id; /** * The name of the code lock system */ // @ApiMember(DataType="string", Description="The name of the code lock system") String? Name; /** * The description of the code lock system */ // @ApiMember(DataType="string", Description="The description of the code lock system") String? Description; /** * The logotype of the code lock system */ // @ApiMember(Description="The logotype of the code lock system") Uri? LogoType; /** * The supplier name of the code lock system */ // @ApiMember(Description="The supplier name of the code lock system") String? Supplier; CodeLockSystemResponse({this.Id,this.Name,this.Description,this.LogoType,this.Supplier}); CodeLockSystemResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; LogoType = JsonConverters.fromJson(json['LogoType'],'Uri',context!); Supplier = json['Supplier']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'LogoType': JsonConverters.toJson(LogoType,'Uri',context!), 'Supplier': Supplier }; getTypeName() => "CodeLockSystemResponse"; TypeContext? context = _ctx; } class CodeLockSettingResponse implements IConvertible { String? CompanyId; /** * The system type of the code lock */ // @ApiMember(DataType="int", Description="The system type of the code lock") int? CodeLockSystemsId; /** * If code lock sync is active */ // @ApiMember(DataType="bool", Description="If code lock sync is active") bool? Active; /** * Number of minutes the access should be valid before booking starts. */ // @ApiMember(DataType="int", Description="Number of minutes the access should be valid before booking starts.") int? ValidBeforeMinutes; /** * Number of minutes the access should be valid after booking ends. */ // @ApiMember(DataType="int", Description="Number of minutes the access should be valid after booking ends.") int? ValidAfterMinutes; /** * If it should clean up old bookings after the passed */ // @ApiMember(DataType="boolean", Description="If it should clean up old bookings after the passed") bool? DeleteOldBySchedule; /** * If a notification should be sent by Email */ // @ApiMember(DataType="boolean", Description="If a notification should be sent by Email") bool? SendEmailNotification; /** * If a notification should be sent by SMS */ // @ApiMember(DataType="boolean", Description="If a notification should be sent by SMS") bool? SendSMSNotification; /** * How long before the booking starts in minutes the notification should be sent */ // @ApiMember(DataType="int", Description="How long before the booking starts in minutes the notification should be sent") int? EmailNotificationTime; /** * How long before the booking starts in minutes the notification should be sent */ // @ApiMember(DataType="int", Description="How long before the booking starts in minutes the notification should be sent") int? SMSNotificationTime; /** * When settings was created */ // @ApiMember(DataType="datetime", Description="When settings was created") DateTime? Created; /** * When settings was updated */ // @ApiMember(DataType="datetime", Description="When settings was updated") DateTime? Updated; /** * The available code lock systems to choose from */ // @ApiMember(Description="The available code lock systems to choose from") List? CodeLockSystemOptions; CodeLockSettingResponse({this.CompanyId,this.CodeLockSystemsId,this.Active,this.ValidBeforeMinutes,this.ValidAfterMinutes,this.DeleteOldBySchedule,this.SendEmailNotification,this.SendSMSNotification,this.EmailNotificationTime,this.SMSNotificationTime,this.Created,this.Updated,this.CodeLockSystemOptions}); CodeLockSettingResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; CodeLockSystemsId = json['CodeLockSystemsId']; Active = json['Active']; ValidBeforeMinutes = json['ValidBeforeMinutes']; ValidAfterMinutes = json['ValidAfterMinutes']; DeleteOldBySchedule = json['DeleteOldBySchedule']; SendEmailNotification = json['SendEmailNotification']; SendSMSNotification = json['SendSMSNotification']; EmailNotificationTime = json['EmailNotificationTime']; SMSNotificationTime = json['SMSNotificationTime']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); CodeLockSystemOptions = JsonConverters.fromJson(json['CodeLockSystemOptions'],'List',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'CodeLockSystemsId': CodeLockSystemsId, 'Active': Active, 'ValidBeforeMinutes': ValidBeforeMinutes, 'ValidAfterMinutes': ValidAfterMinutes, 'DeleteOldBySchedule': DeleteOldBySchedule, 'SendEmailNotification': SendEmailNotification, 'SendSMSNotification': SendSMSNotification, 'EmailNotificationTime': EmailNotificationTime, 'SMSNotificationTime': SMSNotificationTime, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'Updated': JsonConverters.toJson(Updated,'DateTime',context!), 'CodeLockSystemOptions': JsonConverters.toJson(CodeLockSystemOptions,'List',context!) }; getTypeName() => "CodeLockSettingResponse"; TypeContext? context = _ctx; } // @Route("/codelock/settings", "PUT") // @ValidateRequest(Validator="IsAuthenticated") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ApiResponse(Description="You have too low privileges to call this service", StatusCode=403) class UpdateCodeLockSetting 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; /** * If code lock sync is active */ // @ApiMember(DataType="bool", Description="If code lock sync is active") bool? Active; /** * The system type of the code lock */ // @ApiMember(DataType="int", Description="The system type of the code lock") int? CodeLockSystemsId; /** * Number of minutes the access should be valid before booking starts. */ // @ApiMember(DataType="int", Description="Number of minutes the access should be valid before booking starts.") int? ValidBeforeMinutes; /** * Number of minutes the access should be valid after booking ends. */ // @ApiMember(DataType="int", Description="Number of minutes the access should be valid after booking ends.") int? ValidAfterMinutes; /** * If it should clean up old bookings after the passed */ // @ApiMember(DataType="boolean", Description="If it should clean up old bookings after the passed") bool? DeleteOldBySchedule; /** * If a notification should be sent by Email */ // @ApiMember(DataType="boolean", Description="If a notification should be sent by Email") bool? SendEmailNotification; /** * If a notification should be sent by SMS */ // @ApiMember(DataType="boolean", Description="If a notification should be sent by SMS") bool? SendSMSNotification; /** * How long before the booking starts in minutes the notification should be sent */ // @ApiMember(DataType="int", Description="How long before the booking starts in minutes the notification should be sent") int? EmailNotificationTime; /** * How long before the booking starts in minutes the notification should be sent */ // @ApiMember(DataType="int", Description="How long before the booking starts in minutes the notification should be sent") int? SMSNotificationTime; UpdateCodeLockSetting({this.CompanyId,this.Active,this.CodeLockSystemsId,this.ValidBeforeMinutes,this.ValidAfterMinutes,this.DeleteOldBySchedule,this.SendEmailNotification,this.SendSMSNotification,this.EmailNotificationTime,this.SMSNotificationTime}); UpdateCodeLockSetting.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Active = json['Active']; CodeLockSystemsId = json['CodeLockSystemsId']; ValidBeforeMinutes = json['ValidBeforeMinutes']; ValidAfterMinutes = json['ValidAfterMinutes']; DeleteOldBySchedule = json['DeleteOldBySchedule']; SendEmailNotification = json['SendEmailNotification']; SendSMSNotification = json['SendSMSNotification']; EmailNotificationTime = json['EmailNotificationTime']; SMSNotificationTime = json['SMSNotificationTime']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Active': Active, 'CodeLockSystemsId': CodeLockSystemsId, 'ValidBeforeMinutes': ValidBeforeMinutes, 'ValidAfterMinutes': ValidAfterMinutes, 'DeleteOldBySchedule': DeleteOldBySchedule, 'SendEmailNotification': SendEmailNotification, 'SendSMSNotification': SendSMSNotification, 'EmailNotificationTime': EmailNotificationTime, 'SMSNotificationTime': SMSNotificationTime }; createResponse() => CodeLockSettingResponse(); getResponseTypeName() => "CodeLockSettingResponse"; getTypeName() => "UpdateCodeLockSetting"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'CodeLockSystemResponse': TypeInfo(TypeOf.Class, create:() => CodeLockSystemResponse()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'CodeLockSettingResponse': TypeInfo(TypeOf.Class, create:() => CodeLockSettingResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UpdateCodeLockSetting': TypeInfo(TypeOf.Class, create:() => UpdateCodeLockSetting()), });