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

import AnyCodable
import Foundation
import Vapor

/**  */
public final class RecipientIdentityInputOption: Content, Hashable {
    /**  */
    public var name: String?
    /**  */
    public var phoneNumberList: [RecipientIdentityPhoneNumber]?
    /**  */
    public var valueType: String?

    public init(name: String? = nil, phoneNumberList: [RecipientIdentityPhoneNumber]? = nil, valueType: String? = nil) {
        self.name = name
        self.phoneNumberList = phoneNumberList
        self.valueType = valueType
    }

    public enum CodingKeys: String, CodingKey, CaseIterable {
        case name
        case phoneNumberList
        case valueType
    }

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encodeIfPresent(name, forKey: .name)
        try container.encodeIfPresent(phoneNumberList, forKey: .phoneNumberList)
        try container.encodeIfPresent(valueType, forKey: .valueType)
    }

    public static func == (lhs: RecipientIdentityInputOption, rhs: RecipientIdentityInputOption) -> Bool {
        lhs.name == rhs.name &&
            lhs.phoneNumberList == rhs.phoneNumberList &&
            lhs.valueType == rhs.valueType
    }

    public func hash(into hasher: inout Hasher) {
        hasher.combine(name?.hashValue)
        hasher.combine(phoneNumberList?.hashValue)
        hasher.combine(valueType?.hashValue)
    }
}
