/* Options: Date: 2025-05-05 00:57:27 SwiftVersion: 6.0 Version: 8.71 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://team.evovoice.io //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: ListUsers.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Gets the users for the specified account */ // @Route("/users", "GET") // @Api(Description="Gets the users for the specified account") public class ListUsers : ListRequest, IReturn { public typealias Return = ListResponse /** * The account IDs whose users you want to retrieve */ // @ApiMember(Description="The account IDs whose users you want to retrieve") public var accountIds:[String]? /** * Filter by email */ // @ApiMember(Description="Filter by email") public var emailFilter:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountIds case emailFilter } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountIds = try container.decodeIfPresent([String].self, forKey: .accountIds) ?? [] emailFilter = try container.decodeIfPresent(String.self, forKey: .emailFilter) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountIds != nil { try container.encode(accountIds, forKey: .accountIds) } if emailFilter != nil { try container.encode(emailFilter, forKey: .emailFilter) } } } public class ListResponse : Codable { /** * The items */ // @ApiMember(Description="The items") public var items:[UserInfo]? /** * The total number of items */ // @ApiMember(Description="The total number of items") public var totalCount:Int? /** * The total number of pages */ // @ApiMember(Description="The total number of pages") public var totalPages:Int? /** * Are there more pages of items? Used with simplified paging */ // @ApiMember(Description="Are there more pages of items? Used with simplified paging") public var hasMorePages:Bool? required public init(){} } public enum SortOrders : String, Codable { case Ascend case Descend } public class ListRequest : IGet, Codable { /** * The page of data to retrieve */ // @ApiMember(Description="The page of data to retrieve") public var page:Int? /** * If you want all objects to be returned. This should be used with care */ // @ApiMember(Description="If you want all objects to be returned. This should be used with care") public var all:Bool? /** * The number per page to retrieve */ // @ApiMember(Description="The number per page to retrieve") public var countPerPage:Int? /** * Specific IDs */ // @ApiMember(Description="Specific IDs") public var specificIds:[String]? /** * Specify a sort field */ // @ApiMember(Description="Specify a sort field") public var sortField:String? /** * Specify a sort order */ // @ApiMember(Description="Specify a sort order") public var sortOrder:SortOrders? /** * Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array */ // @ApiMember(Description="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array") public var simplifiedPaging:Bool? required public init(){} } public enum DashboardPermissions : String, Codable { case ViewFiles case ViewNotifications case ViewSessions case ViewEndpoints case ViewReports case ViewCustomers case ViewFlows } public class UserInfo : Codable { public var id:String? public var isAuthenticated:Bool? public var firstName:String? public var lastName:String? public var name:String? public var avatarUrl:String? public var emailAddress:String? public var roles:[String]? public var accountIds:[String]? public var accountNames:[String]? public var dashboardPermissions:[DashboardPermissions]? required public init(){} }