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

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

/** Generic Error Message */
public struct CommonResponseErrorSTemporaryFileUrl: Codable, JSONEncodable, Hashable {

    /** The Temporary File Url of the document that was uploaded. That url can be reused instead of uploading the file again. */
    public var sTemporaryFileUrl: String?
    /** More detail about the error */
    public var sErrorMessage: String
    /** The error code. See documentation for valid values */
    public var eErrorCode: String?

    public init(sTemporaryFileUrl: String? = nil, sErrorMessage: String, eErrorCode: String? = nil) {
        self.sTemporaryFileUrl = sTemporaryFileUrl
        self.sErrorMessage = sErrorMessage
        self.eErrorCode = eErrorCode
    }

    public enum CodingKeys: String, CodingKey, CaseIterable {
        case sTemporaryFileUrl
        case sErrorMessage
        case eErrorCode
    }

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encodeIfPresent(sTemporaryFileUrl, forKey: .sTemporaryFileUrl)
        try container.encode(sErrorMessage, forKey: .sErrorMessage)
        try container.encodeIfPresent(eErrorCode, forKey: .eErrorCode)
    }
}

