/* Options: Date: 2026-02-02 12:53:39 Version: 10.05 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateCompanyUser.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class AddCompanyUserRolesResponse implements IConvertible { String RoleId = ""; AddCompanyUserRolesResponse({this.RoleId}); AddCompanyUserRolesResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { RoleId = json['RoleId']; return this; } Map toJson() => { 'RoleId': RoleId }; getTypeName() => "AddCompanyUserRolesResponse"; TypeContext? context = _ctx; } class CompanyUserRolesQueryResponse implements IConvertible { String RoleId = ""; String Name = ""; String Description = ""; CompanyUserRolesQueryResponse({this.RoleId,this.Name,this.Description}); CompanyUserRolesQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { RoleId = json['RoleId']; Name = json['Name']; Description = json['Description']; return this; } Map toJson() => { 'RoleId': RoleId, 'Name': Name, 'Description': Description }; getTypeName() => "CompanyUserRolesQueryResponse"; TypeContext? context = _ctx; } class CompanyUserResource implements IConvertible { /** * The resource id */ // @ApiMember(Description="The resource id") int Id = 0; /** * The resource name */ // @ApiMember(Description="The resource name") String Name = ""; /** * The resource status */ // @ApiMember(Description="The resource status") bool Active; /** * The resource description */ // @ApiMember(Description="The resource description") String Description = ""; /** * The resource email */ // @ApiMember(Description="The resource email") String Email = ""; /** * The resource phone */ // @ApiMember(Description="The resource phone") String Phone = ""; /** * The resource color */ // @ApiMember(Description="The resource color") String Color = ""; /** * The resource image */ // @ApiMember(Description="The resource image") Uri ImageUrl; /** * If the resource want to receive email notifications */ // @ApiMember(Description="If the resource want to receive email notifications") bool EmailNotification; /** * If the resource want to receive sms notifications */ // @ApiMember(Description="If the resource want to receive sms notifications") bool SMSNotification; /** * If the resource want to receive email reminders */ // @ApiMember(Description="If the resource want to receive email reminders") bool EmailReminder; /** * If the resource want to receive sms reminders */ // @ApiMember(Description="If the resource want to receive sms reminders") bool SMSReminder; CompanyUserResource({this.Id,this.Name,this.Active,this.Description,this.Email,this.Phone,this.Color,this.ImageUrl,this.EmailNotification,this.SMSNotification,this.EmailReminder,this.SMSReminder}); CompanyUserResource.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Active = json['Active']; Description = json['Description']; Email = json['Email']; Phone = json['Phone']; Color = json['Color']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); EmailNotification = json['EmailNotification']; SMSNotification = json['SMSNotification']; EmailReminder = json['EmailReminder']; SMSReminder = json['SMSReminder']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Active': Active, 'Description': Description, 'Email': Email, 'Phone': Phone, 'Color': Color, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!), 'EmailNotification': EmailNotification, 'SMSNotification': SMSNotification, 'EmailReminder': EmailReminder, 'SMSReminder': SMSReminder }; getTypeName() => "CompanyUserResource"; TypeContext? context = _ctx; } class CompanyUserQueryResponse implements IConvertible { String Id = ""; String CompanyId = ""; String Firstname = ""; String Lastname = ""; String Email = ""; String Phone = ""; String WorkerId = ""; int? ResourceId; /** * The resource information connected to the administrator. */ // @ApiMember(Description="The resource information connected to the administrator.") CompanyUserResource Resource; /** * The roles that are connected to the administrator. */ // @ApiMember(Description="The roles that are connected to the administrator.") List Roles = []; /** * If the admin should receive Push notification when booked */ // @ApiMember(Description="If the admin should receive Push notification when booked") bool SendPushNotification; /** * If the admin should receive Push notification reminders on bookings */ // @ApiMember(Description="If the admin should receive Push notification reminders on bookings") bool SendPushNotificationReminder; bool Active; DateTime Created = DateTime(0); DateTime Updated = DateTime(0); CompanyUserQueryResponse({this.Id,this.CompanyId,this.Firstname,this.Lastname,this.Email,this.Phone,this.WorkerId,this.ResourceId,this.Resource,this.Roles,this.SendPushNotification,this.SendPushNotificationReminder,this.Active,this.Created,this.Updated}); CompanyUserQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; Firstname = json['Firstname']; Lastname = json['Lastname']; Email = json['Email']; Phone = json['Phone']; WorkerId = json['WorkerId']; ResourceId = json['ResourceId']; Resource = JsonConverters.fromJson(json['Resource'],'CompanyUserResource',context!); Roles = JsonConverters.fromJson(json['Roles'],'List',context!); SendPushNotification = json['SendPushNotification']; SendPushNotificationReminder = json['SendPushNotificationReminder']; Active = json['Active']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'Firstname': Firstname, 'Lastname': Lastname, 'Email': Email, 'Phone': Phone, 'WorkerId': WorkerId, 'ResourceId': ResourceId, 'Resource': JsonConverters.toJson(Resource,'CompanyUserResource',context!), 'Roles': JsonConverters.toJson(Roles,'List',context!), 'SendPushNotification': SendPushNotification, 'SendPushNotificationReminder': SendPushNotificationReminder, 'Active': Active, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'Updated': JsonConverters.toJson(Updated,'DateTime',context!) }; getTypeName() => "CompanyUserQueryResponse"; TypeContext? context = _ctx; } // @Route("/administrators/{Id}", "PUT") // @ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400) // @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class UpdateCompanyUser implements IReturn, ICompany, IConvertible, IPut { /** * Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used. */ // @ApiMember(Description="Enter the company and id for the application user, if blank company id and you are an admin, your company id will be used.", ParameterType="query") String? CompanyId; /** * Enter the user id for the administrator. */ // @ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="path") String Id = ""; // @ApiMember() String Firstname = ""; // @ApiMember() String Lastname = ""; // @ApiMember() String Phone = ""; // @ApiMember() String Email = ""; // @ApiMember() int? ResourceId; // @ApiMember() List Roles = []; // @ApiMember() int? WorkerId; /** * If the admin should receive Push notification when booked */ // @ApiMember(Description="If the admin should receive Push notification when booked") bool? SendPushNotification; /** * If the resource should receive Push notification reminders on bookings */ // @ApiMember(Description="If the resource should receive Push notification reminders on bookings") bool? SendPushNotificationReminder; UpdateCompanyUser({this.CompanyId,this.Id,this.Firstname,this.Lastname,this.Phone,this.Email,this.ResourceId,this.Roles,this.WorkerId,this.SendPushNotification,this.SendPushNotificationReminder}); UpdateCompanyUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Id = json['Id']; Firstname = json['Firstname']; Lastname = json['Lastname']; Phone = json['Phone']; Email = json['Email']; ResourceId = json['ResourceId']; Roles = JsonConverters.fromJson(json['Roles'],'List',context!); WorkerId = json['WorkerId']; SendPushNotification = json['SendPushNotification']; SendPushNotificationReminder = json['SendPushNotificationReminder']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Id': Id, 'Firstname': Firstname, 'Lastname': Lastname, 'Phone': Phone, 'Email': Email, 'ResourceId': ResourceId, 'Roles': JsonConverters.toJson(Roles,'List',context!), 'WorkerId': WorkerId, 'SendPushNotification': SendPushNotification, 'SendPushNotificationReminder': SendPushNotificationReminder }; createResponse() => CompanyUserQueryResponse(); getResponseTypeName() => "CompanyUserQueryResponse"; getTypeName() => "UpdateCompanyUser"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'AddCompanyUserRolesResponse': TypeInfo(TypeOf.Class, create:() => AddCompanyUserRolesResponse()), 'CompanyUserRolesQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyUserRolesQueryResponse()), 'CompanyUserResource': TypeInfo(TypeOf.Class, create:() => CompanyUserResource()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'CompanyUserQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyUserQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'UpdateCompanyUser': TypeInfo(TypeOf.Class, create:() => UpdateCompanyUser()), 'List': TypeInfo(TypeOf.Class, create:() => []), });