/* Options: Date: 2025-05-04 23:30:40 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: ListLogEntries.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack public class ListLogEntries : ListRequest, IReturn { public typealias Return = ListResponse /** * The IDs of the account whose log entries you want to retrieve */ // @ApiMember(Description="The IDs of the account whose log entries you want to retrieve") public var accountIds:[String]? /** * The IDs of the customers whose log entries you want to retrieve */ // @ApiMember(Description="The IDs of the customers whose log entries you want to retrieve") public var customerIds:[String]? /** * The start date to retrieve usage records for (YYYY-MM-DD) */ // @ApiMember(Description="The start date to retrieve usage records for (YYYY-MM-DD)") public var startDate:String? /** * The end date to retrieve logs for (YYYY-MM-DD) */ // @ApiMember(Description="The end date to retrieve logs for (YYYY-MM-DD)") public var endDate:String? /** * Search by description */ // @ApiMember(Description="Search by description") public var Description:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountIds case customerIds case startDate case endDate case Description } 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) ?? [] customerIds = try container.decodeIfPresent([String].self, forKey: .customerIds) ?? [] startDate = try container.decodeIfPresent(String.self, forKey: .startDate) endDate = try container.decodeIfPresent(String.self, forKey: .endDate) Description = try container.decodeIfPresent(String.self, forKey: .Description) } 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 customerIds != nil { try container.encode(customerIds, forKey: .customerIds) } if startDate != nil { try container.encode(startDate, forKey: .startDate) } if endDate != nil { try container.encode(endDate, forKey: .endDate) } if Description != nil { try container.encode(Description, forKey: .Description) } } } public class ListResponse : Codable { /** * The items */ // @ApiMember(Description="The items") public var items:[LogEntryInfo]? /** * 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 class LogEntryInfo : EntityInfo { /** * The account ID this endpoint is associated with */ // @ApiMember(Description="The account ID this endpoint is associated with") public var accountId:String? /** * The name of the account this endpoint is associated with */ // @ApiMember(Description="The name of the account this endpoint is associated with") public var accountName:String? /** * The ID of the customer this endpoint is associated with */ // @ApiMember(Description="The ID of the customer this endpoint is associated with") public var customerId:String? /** * The name of the customer this endpoint is associated with */ // @ApiMember(Description="The name of the customer this endpoint is associated with") public var customerName:String? /** * The breadcrumb to the customer for this endpoint */ // @ApiMember(Description="The breadcrumb to the customer for this endpoint") public var customerBreadcrumb:[CustomerBreadcrumb]? public var userName:String? public var Description:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case accountId case accountName case customerId case customerName case customerBreadcrumb case userName case Description } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) accountId = try container.decodeIfPresent(String.self, forKey: .accountId) accountName = try container.decodeIfPresent(String.self, forKey: .accountName) customerId = try container.decodeIfPresent(String.self, forKey: .customerId) customerName = try container.decodeIfPresent(String.self, forKey: .customerName) customerBreadcrumb = try container.decodeIfPresent([CustomerBreadcrumb].self, forKey: .customerBreadcrumb) ?? [] userName = try container.decodeIfPresent(String.self, forKey: .userName) Description = try container.decodeIfPresent(String.self, forKey: .Description) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if accountId != nil { try container.encode(accountId, forKey: .accountId) } if accountName != nil { try container.encode(accountName, forKey: .accountName) } if customerId != nil { try container.encode(customerId, forKey: .customerId) } if customerName != nil { try container.encode(customerName, forKey: .customerName) } if customerBreadcrumb != nil { try container.encode(customerBreadcrumb, forKey: .customerBreadcrumb) } if userName != nil { try container.encode(userName, forKey: .userName) } if Description != nil { try container.encode(Description, forKey: .Description) } } } public class EntityInfo : Codable { /** * The ID of the object */ // @ApiMember(Description="The ID of the object") public var id:String? /** * The date the object was created */ // @ApiMember(Description="The date the object was created") public var dateCreated:String? /** * The date the object was last modified */ // @ApiMember(Description="The date the object was last modified") public var dateLastModified:String? /** * The user that created this object */ // @ApiMember(Description="The user that created this object") public var createdBy:String? /** * The user that last modified this object */ // @ApiMember(Description="The user that last modified this object") public var lastModifiedBy:String? required public init(){} } public class CustomerBreadcrumb : Codable { public var id:String? public var name:String? required public init(){} }