//
// Generated by SwagGen
// https://github.com/yonaskolb/SwagGen
//

import Foundation

public class IntegerResponseEntity: APIModel {

    public var result: Int?

    public init(result: Int? = nil) {
        self.result = result
    }

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: StringCodingKey.self)

        result = try container.decodeIfPresent("result")
    }

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: StringCodingKey.self)

        try container.encodeIfPresent(result, forKey: "result")
    }

    public func isEqual(to object: Any?) -> Bool {
      guard let object = object as? IntegerResponseEntity else { return false }
      guard self.result == object.result else { return false }
      return true
    }

    public static func == (lhs: IntegerResponseEntity, rhs: IntegerResponseEntity) -> Bool {
        return lhs.isEqual(to: rhs)
    }
}
