// autogenerated

// swiftlint:disable all
import Foundation

public struct CiAction: Hashable, Codable {
    public var actionType: CiActionType?

    public var buildDistributionAudience: BuildAudienceType?

    public var destination: Destination?

    public var isRequiredToPass: Bool?

    public var name: String?

    public var platform: Platform?

    public var scheme: String?

    public var testConfiguration: TestConfiguration?

    public init(
        actionType: CiActionType? = nil,
        buildDistributionAudience: BuildAudienceType? = nil,
        destination: Destination? = nil,
        isRequiredToPass: Bool? = nil,
        name: String? = nil,
        platform: Platform? = nil,
        scheme: String? = nil,
        testConfiguration: TestConfiguration? = nil
    ) {
        self.actionType = actionType
        self.buildDistributionAudience = buildDistributionAudience
        self.destination = destination
        self.isRequiredToPass = isRequiredToPass
        self.name = name
        self.platform = platform
        self.scheme = scheme
        self.testConfiguration = testConfiguration
    }

    private enum CodingKeys: String, CodingKey {
        case actionType
        case buildDistributionAudience
        case destination
        case isRequiredToPass
        case name
        case platform
        case scheme
        case testConfiguration
    }

    public enum Destination: Hashable, Codable, RawRepresentable {
        case anyMac
        case anyMacCatalyst
        case anyTvOSDevice
        case anyTvOSSimulator
        case anyWatchOSDevice
        case anyWatchOSSimulator
        case anyiOSDevice
        case anyiOSSimulator
        case unknown(String)

        public var rawValue: String {
            switch self {
            case .anyMac: return "ANY_MAC"
            case .anyMacCatalyst: return "ANY_MAC_CATALYST"
            case .anyTvOSDevice: return "ANY_TVOS_DEVICE"
            case .anyTvOSSimulator: return "ANY_TVOS_SIMULATOR"
            case .anyWatchOSDevice: return "ANY_WATCHOS_DEVICE"
            case .anyWatchOSSimulator: return "ANY_WATCHOS_SIMULATOR"
            case .anyiOSDevice: return "ANY_IOS_DEVICE"
            case .anyiOSSimulator: return "ANY_IOS_SIMULATOR"
            case .unknown(let rawValue): return rawValue
            }
        }

        public init(rawValue: String) {
            switch rawValue {
            case "ANY_MAC": self = .anyMac
            case "ANY_MAC_CATALYST": self = .anyMacCatalyst
            case "ANY_TVOS_DEVICE": self = .anyTvOSDevice
            case "ANY_TVOS_SIMULATOR": self = .anyTvOSSimulator
            case "ANY_WATCHOS_DEVICE": self = .anyWatchOSDevice
            case "ANY_WATCHOS_SIMULATOR": self = .anyWatchOSSimulator
            case "ANY_IOS_DEVICE": self = .anyiOSDevice
            case "ANY_IOS_SIMULATOR": self = .anyiOSSimulator
            default: self = .unknown(rawValue)
            }
        }
    }

    public enum Platform: Hashable, Codable, RawRepresentable {
        case iOS
        case macOS
        case tvOS
        case watchOS
        case unknown(String)

        public var rawValue: String {
            switch self {
            case .iOS: return "IOS"
            case .macOS: return "MACOS"
            case .tvOS: return "TVOS"
            case .watchOS: return "WATCHOS"
            case .unknown(let rawValue): return rawValue
            }
        }

        public init(rawValue: String) {
            switch rawValue {
            case "IOS": self = .iOS
            case "MACOS": self = .macOS
            case "TVOS": self = .tvOS
            case "WATCHOS": self = .watchOS
            default: self = .unknown(rawValue)
            }
        }
    }

    public struct TestConfiguration: Hashable, Codable {
        public var kind: Kind?

        public var testDestinations: [CiTestDestination]?

        public var testPlanName: String?

        public init(
            kind: Kind? = nil,
            testDestinations: [CiTestDestination]? = nil,
            testPlanName: String? = nil
        ) {
            self.kind = kind
            self.testDestinations = testDestinations
            self.testPlanName = testPlanName
        }

        private enum CodingKeys: String, CodingKey {
            case kind
            case testDestinations
            case testPlanName
        }

        public enum Kind: Hashable, Codable, RawRepresentable {
            case specificTestPlans
            case useSchemeSettings
            case unknown(String)

            public var rawValue: String {
                switch self {
                case .specificTestPlans: return "SPECIFIC_TEST_PLANS"
                case .useSchemeSettings: return "USE_SCHEME_SETTINGS"
                case .unknown(let rawValue): return rawValue
                }
            }

            public init(rawValue: String) {
                switch rawValue {
                case "SPECIFIC_TEST_PLANS": self = .specificTestPlans
                case "USE_SCHEME_SETTINGS": self = .useSchemeSettings
                default: self = .unknown(rawValue)
                }
            }
        }
    }
}

// swiftlint:enable all
