// Generated by Create API
// https://github.com/CreateAPI/CreateAPI

import Foundation

public struct KeySchema: Codable, Equatable {
    public var errorMessage: String?
    public var final: Bool?
    public var key: String?
    public var state: State

    public struct State: RawRepresentable, Codable, Equatable {
        public let rawValue: String

        public init(rawValue: String) {
            self.rawValue = rawValue
        }

        public static let running = Self(rawValue: "running")
        public static let error = Self(rawValue: "error")
        public static let complete = Self(rawValue: "complete")
        public static let streaming = Self(rawValue: "streaming")
    }

    public init(errorMessage: String? = nil, final: Bool? = nil, key: String? = nil, state: State) {
        self.errorMessage = errorMessage
        self.final = final
        self.key = key
        self.state = state
    }
}
