//
// PipelineRunImpl.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//

import Foundation


public class PipelineRunImpl: JSONEncodable {
    public var _class: String?
    public var links: PipelineRunImpllinks?
    public var durationInMillis: Int32?
    public var enQueueTime: String?
    public var endTime: String?
    public var estimatedDurationInMillis: Int32?
    public var id: String?
    public var organization: String?
    public var pipeline: String?
    public var result: String?
    public var runSummary: String?
    public var startTime: String?
    public var state: String?
    public var type: String?
    public var commitId: String?

    public init() {}

    // MARK: JSONEncodable
    func encodeToJSON() -> AnyObject {
        var nillableDictionary = [String:AnyObject?]()
        nillableDictionary["_class"] = self._class
        nillableDictionary["_links"] = self.links?.encodeToJSON()
        nillableDictionary["durationInMillis"] = self.durationInMillis?.encodeToJSON()
        nillableDictionary["enQueueTime"] = self.enQueueTime
        nillableDictionary["endTime"] = self.endTime
        nillableDictionary["estimatedDurationInMillis"] = self.estimatedDurationInMillis?.encodeToJSON()
        nillableDictionary["id"] = self.id
        nillableDictionary["organization"] = self.organization
        nillableDictionary["pipeline"] = self.pipeline
        nillableDictionary["result"] = self.result
        nillableDictionary["runSummary"] = self.runSummary
        nillableDictionary["startTime"] = self.startTime
        nillableDictionary["state"] = self.state
        nillableDictionary["type"] = self.type
        nillableDictionary["commitId"] = self.commitId
        let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:]
        return dictionary
    }
}
