/* Options: Date: 2024-11-23 10:46:13 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: CreateCompanyUser.* //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; /** * 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; bool? Active; DateTime? Created; DateTime? Updated; CompanyUserQueryResponse({this.Id,this.CompanyId,this.Firstname,this.Lastname,this.Email,this.Phone,this.WorkerId,this.ResourceId,this.Resource,this.Roles,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!); 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!), 'Active': Active, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'Updated': JsonConverters.toJson(Updated,'DateTime',context!) }; getTypeName() => "CompanyUserQueryResponse"; TypeContext? context = _ctx; } // @Route("/administrators/", "POST") // @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 CreateCompanyUser implements IReturn, ICompany, IConvertible, IPost { /** * Enter the company and id for the customer, if blank company id and you are an admin, your company id will be used. */ // @ApiMember(Description="Enter the company and id for the customer, if blank company id and you are an admin, your company id will be used.", ParameterType="query") String? CompanyId; // @ApiMember(IsRequired=true) String? Firstname; // @ApiMember(IsRequired=true) String? Lastname; // @ApiMember(IsRequired=true) String? Phone; // @ApiMember(IsRequired=true) String? Email; // @ApiMember() int? ResourceId; // @ApiMember() List? Roles; // @ApiMember() int? WorkerId; CreateCompanyUser({this.CompanyId,this.Firstname,this.Lastname,this.Phone,this.Email,this.ResourceId,this.Roles,this.WorkerId}); CreateCompanyUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; 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']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Firstname': Firstname, 'Lastname': Lastname, 'Phone': Phone, 'Email': Email, 'ResourceId': ResourceId, 'Roles': JsonConverters.toJson(Roles,'List',context!), 'WorkerId': WorkerId }; createResponse() => CompanyUserQueryResponse(); getResponseTypeName() => "CompanyUserQueryResponse"; getTypeName() => "CreateCompanyUser"; 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:() => []), 'CreateCompanyUser': TypeInfo(TypeOf.Class, create:() => CreateCompanyUser()), 'List': TypeInfo(TypeOf.Class, create:() => []), });