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

import Foundation

public struct ExternalModelTypeSchema: Codable, Equatable, Identifiable {
    public var badges: [BadgeType]?
    public var canUse: Bool?
    public var capabilities: [Capability]?
    public var description: String
    public var externalKey: String
    public var features: [Feature]?
    public var id: UUID?
    public var isDefaultFreeModel: Bool?
    public var isDefaultModel: Bool?
    public var majorVersion: Int
    /// ModelTypeMaxLengths
    public var maxLengths: ModelTypeMaxLengths?
    public var modelSubtype: String?
    public var name: String

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

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

        public static let all = Self(rawValue: "all")
        public static let generate = Self(rawValue: "generate")
        public static let infill = Self(rawValue: "infill")
        public static let fixedInfill = Self(rawValue: "fixed_infill")
        public static let infillIntro = Self(rawValue: "infill_intro")
        public static let infillOutro = Self(rawValue: "infill_outro")
        public static let artistInfill = Self(rawValue: "artist_infill")
        public static let coverInfill = Self(rawValue: "cover_infill")
        public static let artistConsistency = Self(rawValue: "artist_consistency")
        public static let artistCover = Self(rawValue: "artist_cover")
        public static let artistExtend = Self(rawValue: "artist_extend")
        public static let cover = Self(rawValue: "cover")
        public static let upsample = Self(rawValue: "upsample")
        public static let extend = Self(rawValue: "extend")
        public static let uploadExtend = Self(rawValue: "upload_extend")
        public static let coverExtend = Self(rawValue: "cover_extend")
        public static let short = Self(rawValue: "short")
        public static let generateStem = Self(rawValue: "generate_stem")
    }

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

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

        public static let createControlSliders = Self(rawValue: "create_control_sliders")
        public static let tagUpsample = Self(rawValue: "tag_upsample")
    }

    public init(badges: [BadgeType]? = nil, canUse: Bool? = nil, capabilities: [Capability]? = nil, description: String, externalKey: String, features: [Feature]? = nil, id: UUID? = nil, isDefaultFreeModel: Bool? = nil, isDefaultModel: Bool? = nil, majorVersion: Int, maxLengths: ModelTypeMaxLengths? = nil, modelSubtype: String? = nil, name: String) {
        self.badges = badges
        self.canUse = canUse
        self.capabilities = capabilities
        self.description = description
        self.externalKey = externalKey
        self.features = features
        self.id = id
        self.isDefaultFreeModel = isDefaultFreeModel
        self.isDefaultModel = isDefaultModel
        self.majorVersion = majorVersion
        self.maxLengths = maxLengths
        self.modelSubtype = modelSubtype
        self.name = name
    }
}
