//
// ApiResponse.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation


open class ApiResponse: JSONEncodable {
    public var code: Int32?
    public var codeNum: NSNumber? {
        get {
            return code.map({ return NSNumber(value: $0) })
        }
    }
    public var type: String?
    public var message: String?

    public init() {}

    // MARK: JSONEncodable
    open func encodeToJSON() -> Any {
        var nillableDictionary = [String:Any?]()
        nillableDictionary["code"] = self.code?.encodeToJSON()
        nillableDictionary["type"] = self.type
        nillableDictionary["message"] = self.message

        let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:]
        return dictionary
    }
}
