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

import Foundation


public class FormatTest: JSONEncodable {
    public var integer: Int32?
    public var _int32: Int32?
    public var _int64: Int64?
    public var number: Double?
    public var _float: Float?
    public var _double: Double?
    public var _string: String?
    public var byte: String?
    public var binary: String?
    public var date: NSDate?
    public var dateTime: NSDate?
    public var password: String?

    public init() {}

    // MARK: JSONEncodable
    func encodeToJSON() -> AnyObject {
        var nillableDictionary = [String:AnyObject?]()
        nillableDictionary["integer"] = self.integer?.encodeToJSON()
        nillableDictionary["int32"] = self._int32?.encodeToJSON()
        nillableDictionary["int64"] = self._int64?.encodeToJSON()
        nillableDictionary["int64"] = self._int64?.encodeToJSON()
        nillableDictionary["number"] = self.number
        nillableDictionary["float"] = self._float
        nillableDictionary["double"] = self._double
        nillableDictionary["string"] = self._string
        nillableDictionary["byte"] = self.byte
        nillableDictionary["binary"] = self.binary
        nillableDictionary["date"] = self.date?.encodeToJSON()
        nillableDictionary["dateTime"] = self.dateTime?.encodeToJSON()
        nillableDictionary["password"] = self.password
        let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
        return dictionary
    }
}
