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

import Foundation

public class DeleteSecureTokenBiokeyErrorsErrorDtoEntity: APIModel {

    public var errorCode: DeleteSecureTokenBiokeyErrors?

    public var errorMessage: String?

    public init(errorCode: DeleteSecureTokenBiokeyErrors? = nil, errorMessage: String? = nil) {
        self.errorCode = errorCode
        self.errorMessage = errorMessage
    }

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

        errorCode = try container.decodeIfPresent("errorCode")
        errorMessage = try container.decodeIfPresent("errorMessage")
    }

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

        try container.encodeIfPresent(errorCode, forKey: "errorCode")
        try container.encodeIfPresent(errorMessage, forKey: "errorMessage")
    }

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

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