/* Options: Date: 2026-03-14 18:27:33 SwiftVersion: 6.0 Version: 8.52 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://production-eros-gateway-api-sms-wa.azurewebsites.net/api //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: SMSSend.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Saves the specified SMS and sends it for background processing */ // @Route("/sendmessage", "POST") // @Route("/sendmessage/immediate", "POST") // @Route("/send", "POST") // @Route("/sms/send", "POST") // @Route("/send/immediate", "POST") // @Route("/sms/send/immediate", "POST") // @Api(Description="Saves the specified SMS and sends it for background processing") public class SMSSend : IReturn, Codable { public typealias Return = CommResponse public var smsModel:SMSModel? public var createCommunicationReferencesImmediately:Bool? required public init(){} } public class CommResponse : Codable { public var commId:String? public var reference:String? public var status:Bool? public var message:String? required public init(){} } public class SMSModel : BaseLicenseeEnforcedServiceModel { public var from:SMSContact? public var to:[SMSContact]? public var messageBody:String? public var replyIsAllowed:Bool? public var replyIsRequired:Bool? public var notes:String? public var linkedObjectId:String? public var suiteId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case from case to case messageBody case replyIsAllowed case replyIsRequired case notes case linkedObjectId case suiteId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) from = try container.decodeIfPresent(SMSContact.self, forKey: .from) to = try container.decodeIfPresent([SMSContact].self, forKey: .to) ?? [] messageBody = try container.decodeIfPresent(String.self, forKey: .messageBody) replyIsAllowed = try container.decodeIfPresent(Bool.self, forKey: .replyIsAllowed) replyIsRequired = try container.decodeIfPresent(Bool.self, forKey: .replyIsRequired) notes = try container.decodeIfPresent(String.self, forKey: .notes) linkedObjectId = try container.decodeIfPresent(String.self, forKey: .linkedObjectId) suiteId = try container.decodeIfPresent(String.self, forKey: .suiteId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if from != nil { try container.encode(from, forKey: .from) } if to != nil { try container.encode(to, forKey: .to) } if messageBody != nil { try container.encode(messageBody, forKey: .messageBody) } if replyIsAllowed != nil { try container.encode(replyIsAllowed, forKey: .replyIsAllowed) } if replyIsRequired != nil { try container.encode(replyIsRequired, forKey: .replyIsRequired) } if notes != nil { try container.encode(notes, forKey: .notes) } if linkedObjectId != nil { try container.encode(linkedObjectId, forKey: .linkedObjectId) } if suiteId != nil { try container.encode(suiteId, forKey: .suiteId) } } } public class SMSContact : Codable { public var name:String? public var phoneNumber:String? public var contactId:String? required public init(){} } public class BaseLicenseeEnforcedServiceModel : Codable { public var licenseeId:String? required public init(){} }