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

import AnyCodable
import Foundation
import Vapor

/**  */
public final class ENoteConfigurations: Content, Hashable {
    /**  */
    public var apiKey: String?
    /**  */
    public var connectConfigured: String?
    /**  */
    public var eNoteConfigured: String?
    /**  */
    public var organization: String?
    /** The user's encrypted password hash. */
    public var password: String?
    /** The name of the user. */
    public var userName: String?

    public init(apiKey: String? = nil, connectConfigured: String? = nil, eNoteConfigured: String? = nil, organization: String? = nil, password: String? = nil, userName: String? = nil) {
        self.apiKey = apiKey
        self.connectConfigured = connectConfigured
        self.eNoteConfigured = eNoteConfigured
        self.organization = organization
        self.password = password
        self.userName = userName
    }

    public enum CodingKeys: String, CodingKey, CaseIterable {
        case apiKey
        case connectConfigured
        case eNoteConfigured
        case organization
        case password
        case userName
    }

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encodeIfPresent(apiKey, forKey: .apiKey)
        try container.encodeIfPresent(connectConfigured, forKey: .connectConfigured)
        try container.encodeIfPresent(eNoteConfigured, forKey: .eNoteConfigured)
        try container.encodeIfPresent(organization, forKey: .organization)
        try container.encodeIfPresent(password, forKey: .password)
        try container.encodeIfPresent(userName, forKey: .userName)
    }

    public static func == (lhs: ENoteConfigurations, rhs: ENoteConfigurations) -> Bool {
        lhs.apiKey == rhs.apiKey &&
            lhs.connectConfigured == rhs.connectConfigured &&
            lhs.eNoteConfigured == rhs.eNoteConfigured &&
            lhs.organization == rhs.organization &&
            lhs.password == rhs.password &&
            lhs.userName == rhs.userName
    }

    public func hash(into hasher: inout Hasher) {
        hasher.combine(apiKey?.hashValue)
        hasher.combine(connectConfigured?.hashValue)
        hasher.combine(eNoteConfigured?.hashValue)
        hasher.combine(organization?.hashValue)
        hasher.combine(password?.hashValue)
        hasher.combine(userName?.hashValue)
    }
}
