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

import Foundation

public struct InstrumentsSchema: Codable, Equatable {
    public var errorMessage: String?
    public var final: Bool?
    public var groups: [String]?
    public var instruments: [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, groups: [String]? = nil, instruments: [String]? = nil, state: State) {
        self.errorMessage = errorMessage
        self.final = final
        self.groups = groups
        self.instruments = instruments
        self.state = state
    }
}
