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

import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif

/** A Ezsignsigner-&gt;Contact Object and children to create a complete structure */
public struct EzsignsignerRequestCompoundContact: Codable, Hashable {

    /** The first name of the Contact */
    public var sContactFirstname: String
    /** The last name of the Contact */
    public var sContactLastname: String
    /** The unique ID of the Language.  Valid values:  |Value|Description| |-|-| |1|French| |2|English| */
    public var fkiLanguageID: Int
    /** The email address of the contact. Must be filled if email authentification was requested */
    public var sEmailAddress: String?
    /** The Phone number of the contact. Use format \"5149901516\" for North American Numbers (Without \"1\" for long distance code) you would dial like this: 1-514-990-1516. Use format \"498945233886\" for international numbers (Without \"011\") you would dial like this: +49 89 452 33 88-6. In this example \"49\" is the country code of Germany. */
    public var sPhoneNumber: String?
    /** The Cell Phone number of the contact. Use format \"5149901516\" for North American Numbers (Without \"1\" for long distance code) you would dial like this: 1-514-990-1516. Use format \"498945233886\" for international numbers (Without \"011\") you would dial like this: +49 89 452 33 88-6. In this example \"49\" is the country code of Germany. */
    public var sPhoneNumberCell: String?

    public init(sContactFirstname: String, sContactLastname: String, fkiLanguageID: Int, sEmailAddress: String? = nil, sPhoneNumber: String? = nil, sPhoneNumberCell: String? = nil) {
        self.sContactFirstname = sContactFirstname
        self.sContactLastname = sContactLastname
        self.fkiLanguageID = fkiLanguageID
        self.sEmailAddress = sEmailAddress
        self.sPhoneNumber = sPhoneNumber
        self.sPhoneNumberCell = sPhoneNumberCell
    }

    public enum CodingKeys: String, CodingKey, CaseIterable {
        case sContactFirstname
        case sContactLastname
        case fkiLanguageID
        case sEmailAddress
        case sPhoneNumber
        case sPhoneNumberCell
    }

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encode(sContactFirstname, forKey: .sContactFirstname)
        try container.encode(sContactLastname, forKey: .sContactLastname)
        try container.encode(fkiLanguageID, forKey: .fkiLanguageID)
        try container.encodeIfPresent(sEmailAddress, forKey: .sEmailAddress)
        try container.encodeIfPresent(sPhoneNumber, forKey: .sPhoneNumber)
        try container.encodeIfPresent(sPhoneNumberCell, forKey: .sPhoneNumberCell)
    }
}

