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

import Foundation

public class ConnectorTypeDtoEntity: APIModel {

    public var cntActive: Bool?

    public var cntAlias: String?

    public var cntName: String?

    public init(cntActive: Bool? = nil, cntAlias: String? = nil, cntName: String? = nil) {
        self.cntActive = cntActive
        self.cntAlias = cntAlias
        self.cntName = cntName
    }

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

        cntActive = try container.decodeIfPresent("cntActive")
        cntAlias = try container.decodeIfPresent("cntAlias")
        cntName = try container.decodeIfPresent("cntName")
    }

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

        try container.encodeIfPresent(cntActive, forKey: "cntActive")
        try container.encodeIfPresent(cntAlias, forKey: "cntAlias")
        try container.encodeIfPresent(cntName, forKey: "cntName")
    }

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

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