/* Options: Date: 2024-06-02 10:59:12 SwiftVersion: 5.0 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: UpdateCompanyUser.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @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") public class UpdateCompanyUser : IReturn, ICompany, Codable { public typealias Return = CompanyUserQueryResponse /** * 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") public var companyId:String? /** * Enter the user id for the administrator. */ // @ApiMember(Description="Enter the user id for the administrator.", IsRequired=true, ParameterType="path") public var id:String // @ApiMember() public var firstname:String // @ApiMember() public var lastname:String // @ApiMember() public var phone:String // @ApiMember() public var email:String // @ApiMember() public var resourceId:Int? // @ApiMember() public var roles:[AddCompanyUserRolesResponse] = [] // @ApiMember() public var workerId:Int? required public init(){} } public class CompanyUserQueryResponse : Codable { public var id:String public var companyId:String public var firstname:String public var lastname:String public var email:String public var phone:String public var workerId:String public var resourceId:Int? /** * The resource information connected to the administrator. */ // @ApiMember(Description="The resource information connected to the administrator.") public var resource:CompanyUserResource /** * The roles that are connected to the administrator. */ // @ApiMember(Description="The roles that are connected to the administrator.") public var roles:[CompanyUserRolesQueryResponse] = [] public var active:Bool public var created:Date public var updated:Date required public init(){} } public protocol ICompany { var companyId:String? { get set } } public class AddCompanyUserRolesResponse : Codable { public var roleId:String required public init(){} } public class CompanyUserRolesQueryResponse : Codable { public var roleId:String public var name:String public var Description:String required public init(){} } public class CompanyUserResource : Codable { /** * The resource id */ // @ApiMember(Description="The resource id") public var id:Int /** * The resource name */ // @ApiMember(Description="The resource name") public var name:String /** * The resource status */ // @ApiMember(Description="The resource status") public var active:Bool /** * The resource description */ // @ApiMember(Description="The resource description") public var Description:String /** * The resource email */ // @ApiMember(Description="The resource email") public var email:String /** * The resource phone */ // @ApiMember(Description="The resource phone") public var phone:String /** * The resource color */ // @ApiMember(Description="The resource color") public var color:String /** * The resource image */ // @ApiMember(Description="The resource image") public var imageUrl:Uri /** * If the resource want to receive email notifications */ // @ApiMember(Description="If the resource want to receive email notifications") public var emailNotification:Bool /** * If the resource want to receive sms notifications */ // @ApiMember(Description="If the resource want to receive sms notifications") public var smsNotification:Bool /** * If the resource want to receive email reminders */ // @ApiMember(Description="If the resource want to receive email reminders") public var emailReminder:Bool /** * If the resource want to receive sms reminders */ // @ApiMember(Description="If the resource want to receive sms reminders") public var smsReminder:Bool required public init(){} }