/* Options: Date: 2025-05-04 22:36:32 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: GetSystemSettings.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Gets the system settings */ // @Route("/system/settings", "GET") // @Api(Description="Gets the system settings") public class GetSystemSettings : IReturn, IGet, Codable { public typealias Return = SystemSettingsInfo /** * The account ID whose system settings you want */ // @ApiMember(Description="The account ID whose system settings you want") public var accountId:String? required public init(){} } public class SystemSettingsInfo : EntityInfo { /** * Use to override the system time for testing */ // @ApiMember(Description="Use to override the system time for testing") public var overrideSystemTime:Bool? /** * The system override time zone */ // @ApiMember(Description="The system override time zone") public var overrideSystemTimeZoneId:String? /** * The system override date/time */ // @ApiMember(Description="The system override date/time") public var overrideSystemDateTime:String? /** * The list of system settings fields */ // @ApiMember(Description="The list of system settings fields") public var systemFields:[SystemSettingsField]? /** * The list of customer metadata fields */ // @ApiMember(Description="The list of customer metadata fields") public var customerFields:[CustomerDataField]? /** * The list of endpoint metadata fields */ // @ApiMember(Description="The list of endpoint metadata fields") public var endpointFields:[EndpointDataField]? /** * The list of email accounts */ // @ApiMember(Description="The list of email accounts") public var emailAccounts:[EmailAccount]? /** * The list of tags in the system */ // @ApiMember(Description="The list of tags in the system") public var tags:[Tag]? /** * Documentation for the account */ // @ApiMember(Description="Documentation for the account") public var documentation:String? /** * The number of days recordings are retained */ // @ApiMember(Description="The number of days recordings are retained") public var recordingRetentionDays:Int? /** * Enable the SIP refer beta */ // @ApiMember(Description="Enable the SIP refer beta") public var enableSipRefer:Bool? /** * The number of seconds after which we automatically logoff a not ready agent */ // @ApiMember(Description="The number of seconds after which we automatically logoff a not ready agent") public var autoAgentLogoffSeconds:Int? /** * The default SIP region for new devices */ // @ApiMember(Description="The default SIP region for new devices") public var defaultSipRegion:TwilioSipRegions? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case overrideSystemTime case overrideSystemTimeZoneId case overrideSystemDateTime case systemFields case customerFields case endpointFields case emailAccounts case tags case documentation case recordingRetentionDays case enableSipRefer case autoAgentLogoffSeconds case defaultSipRegion } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) overrideSystemTime = try container.decodeIfPresent(Bool.self, forKey: .overrideSystemTime) overrideSystemTimeZoneId = try container.decodeIfPresent(String.self, forKey: .overrideSystemTimeZoneId) overrideSystemDateTime = try container.decodeIfPresent(String.self, forKey: .overrideSystemDateTime) systemFields = try container.decodeIfPresent([SystemSettingsField].self, forKey: .systemFields) ?? [] customerFields = try container.decodeIfPresent([CustomerDataField].self, forKey: .customerFields) ?? [] endpointFields = try container.decodeIfPresent([EndpointDataField].self, forKey: .endpointFields) ?? [] emailAccounts = try container.decodeIfPresent([EmailAccount].self, forKey: .emailAccounts) ?? [] tags = try container.decodeIfPresent([Tag].self, forKey: .tags) ?? [] documentation = try container.decodeIfPresent(String.self, forKey: .documentation) recordingRetentionDays = try container.decodeIfPresent(Int.self, forKey: .recordingRetentionDays) enableSipRefer = try container.decodeIfPresent(Bool.self, forKey: .enableSipRefer) autoAgentLogoffSeconds = try container.decodeIfPresent(Int.self, forKey: .autoAgentLogoffSeconds) defaultSipRegion = try container.decodeIfPresent(TwilioSipRegions.self, forKey: .defaultSipRegion) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if overrideSystemTime != nil { try container.encode(overrideSystemTime, forKey: .overrideSystemTime) } if overrideSystemTimeZoneId != nil { try container.encode(overrideSystemTimeZoneId, forKey: .overrideSystemTimeZoneId) } if overrideSystemDateTime != nil { try container.encode(overrideSystemDateTime, forKey: .overrideSystemDateTime) } if systemFields != nil { try container.encode(systemFields, forKey: .systemFields) } if customerFields != nil { try container.encode(customerFields, forKey: .customerFields) } if endpointFields != nil { try container.encode(endpointFields, forKey: .endpointFields) } if emailAccounts != nil { try container.encode(emailAccounts, forKey: .emailAccounts) } if tags != nil { try container.encode(tags, forKey: .tags) } if documentation != nil { try container.encode(documentation, forKey: .documentation) } if recordingRetentionDays != nil { try container.encode(recordingRetentionDays, forKey: .recordingRetentionDays) } if enableSipRefer != nil { try container.encode(enableSipRefer, forKey: .enableSipRefer) } if autoAgentLogoffSeconds != nil { try container.encode(autoAgentLogoffSeconds, forKey: .autoAgentLogoffSeconds) } if defaultSipRegion != nil { try container.encode(defaultSipRegion, forKey: .defaultSipRegion) } } } public class Struct : List { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public enum TwilioSipRegions : String, Codable { case NorthAmericaVirginia case NorthAmericaOregon case EuropeIreland case EuropeFrankfurt case AsiaPacificSingapore case AsiaPacificTokyo case AsiaPacificSydney case SouthAmericaSanPaolo } public enum UserDataFieldModes : String, Codable { case Hidden case ReadOnly case ReadWrite } public enum EndpointTypes : String, Codable { case PhoneNumber case User case FaxNumber case EmailAddress case Unused_1 case Unused_2 case Unused_3 case Unused_4 case Unused_5 case Team case Assistant } public enum ValueTypes : String, Codable { case NotSpecified case String case Boolean case Number case List case Struct case Transition case Custom case Date case AudioFile case TimeZoneId case PhoneNumber case User case Endpoint case Time case File case FaxNumber case EmailAccount case Customer case Flow case Team case FlowReference case Integration case Assistant } public class EmailAccount : Codable { public var id:String? public var server:String? public var userName:String? public var port:Int? public var emailAddress:String? public var displayName:String? public var password:String? required public init(){} } public class SystemSettingsField : DataField { public var value:Value? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case value } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) value = try container.decodeIfPresent(Value.self, forKey: .value) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if value != nil { try container.encode(value, forKey: .value) } } } public class CustomerDataField : DataField { public var showInSearch:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case showInSearch } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) showInSearch = try container.decodeIfPresent(Bool.self, forKey: .showInSearch) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if showInSearch != nil { try container.encode(showInSearch, forKey: .showInSearch) } } } public class EndpointDataField : DataField { public var showInSearch:Bool? public var showInLists:Bool? public var endpointType:EndpointTypes? public var isCallerId:Bool? public var isKnob:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case showInSearch case showInLists case endpointType case isCallerId case isKnob } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) showInSearch = try container.decodeIfPresent(Bool.self, forKey: .showInSearch) showInLists = try container.decodeIfPresent(Bool.self, forKey: .showInLists) endpointType = try container.decodeIfPresent(EndpointTypes.self, forKey: .endpointType) isCallerId = try container.decodeIfPresent(Bool.self, forKey: .isCallerId) isKnob = try container.decodeIfPresent(Bool.self, forKey: .isKnob) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if showInSearch != nil { try container.encode(showInSearch, forKey: .showInSearch) } if showInLists != nil { try container.encode(showInLists, forKey: .showInLists) } if endpointType != nil { try container.encode(endpointType, forKey: .endpointType) } if isCallerId != nil { try container.encode(isCallerId, forKey: .isCallerId) } if isKnob != nil { try container.encode(isKnob, forKey: .isKnob) } } } public class Tag : Codable { public var id:String? public var name:String? public var color:TagColors? required public init(){} } 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 DataType : Codable { public var typeName:String? public var fields:[DataField]? required public init(){} } public class Value : Codable { public var boolValue:Bool? public var stringValue:String? public var numberValue:Double? public var listValue:[Struct]? public var structValue:Struct? required public init(){} } public enum UIHints : String, Codable { case None case LargeText case InlineForm case Password case InlineStruct } public enum DataFieldUniqueness : String, Codable { case NotUnique case Unique case UniqueToCustomer } public class DataField : Codable { public var id:String? public var name:String? public var type:ValueTypes? public var uiHint:UIHints? public var uiTab:String? public var isAsync:Bool? public var disableBinding:Bool? public var structType:DataType? public var listType:DataType? public var Description:String? public var possibleValues:[String]? public var isOutput:Bool? public var customFieldValuesUrl:String? public var defaultValue:Value? public var transitionNameFormat:String? public var uniqueness:DataFieldUniqueness? public var voiceOnly:Bool? public var conditionalVisibilityField:String? public var conditionalVisibilityValue:String? public var noEvalTemplate:Bool? public var userMode:UserDataFieldModes? public var anyValueType:Bool? required public init(){} } public enum TagColors : String, Codable { case Magenta case Red case Volcano case Orange case Gold case Lime case Green case Cyan case Blue case GeekBlue case Purple }