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

import Foundation


/** Field Presence Envelope */
public class FieldPresenceEnvelope: JSONEncodable {
    public var sdid: String?
    public var fieldPresence: String?
    public var startDate: Int64?
    public var endDate: Int64?
    public var interval: String?
    public var size: Int64?
    public var data: [FieldPresence]?

    public init() {}

    // MARK: JSONEncodable
    func encodeToJSON() -> AnyObject {
        var nillableDictionary = [String:AnyObject?]()
        nillableDictionary["sdid"] = self.sdid
        nillableDictionary["fieldPresence"] = self.fieldPresence
        nillableDictionary["startDate"] = self.startDate?.encodeToJSON()
        nillableDictionary["endDate"] = self.endDate?.encodeToJSON()
        nillableDictionary["interval"] = self.interval
        nillableDictionary["size"] = self.size?.encodeToJSON()
        nillableDictionary["data"] = self.data?.encodeToJSON()
        let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
        return dictionary
    }
}
