import Foundation

public enum PusherHost {
    case host(String)
    case cluster(String)

    public var stringValue: String {
        switch self {
            case .host(let host): return host
        case .cluster(let cluster): return "ws-\(cluster).\(Constants.API.pusherDomain)"
        }
    }
}

public enum AuthMethod {
    case endpoint(authEndpoint: String)
    case authRequestBuilder(authRequestBuilder: AuthRequestBuilderProtocol)
    case authorizer(authorizer: Authorizer)
    case inline(secret: String)
    case noMethod
}

@objcMembers
@objc public class PusherClientOptions: NSObject {
    public var authMethod: AuthMethod
    public let attemptToReturnJSONObject: Bool
    public let autoReconnect: Bool
    public let host: String
    public let port: Int
    public let useTLS: Bool
    public let activityTimeout: TimeInterval?

    @nonobjc public init(
        authMethod: AuthMethod = .noMethod,
        attemptToReturnJSONObject: Bool = true,
        autoReconnect: Bool = true,
        host: PusherHost = .host(Constants.API.defaultHost),
        port: Int? = nil,
        useTLS: Bool = true,
        activityTimeout: TimeInterval? = nil
    ) {
        self.authMethod = authMethod
        self.attemptToReturnJSONObject = attemptToReturnJSONObject
        self.autoReconnect = autoReconnect
        self.host = host.stringValue
        self.port = port ?? (useTLS ? 443 : 80)
        self.useTLS = useTLS
        self.activityTimeout = activityTimeout
    }
}

import Foundation

public enum PusherHost {
    case host(String)
    case cluster(String)

    public var stringValue: String {
        switch self {
        case .host(let host): return host
        case .cluster(let cluster): return "ws-\(cluster).\(Constants.API.pusherDomain)"
        }
    }
}

public enum AuthMethod {
    case endpoint(authEndpoint: String)
    case authRequestBuilder(authRequestBuilder: AuthRequestBuilderProtocol)
    case authorizer(authorizer: Authorizer)
    case inline(secret: String)
    case noMethod
}

@objcMembers
@objc public class PusherClientOptions: NSObject {
    public var authMethod: AuthMethod
    public let attemptToReturnJSONObject: Bool
    public let autoReconnect: Bool
    public let host: String
    public let port: Int
    public let useTLS: Bool
    public let activityTimeout: TimeInterval?

    @nonobjc public init(
        authMethod: AuthMethod = .noMethod,
        attemptToReturnJSONObject: Bool = true,
        autoReconnect: Bool = true,
        host: PusherHost = .host(Constants.API.defaultHost),
        port: Int? = nil,
        useTLS: Bool = true,
        activityTimeout: TimeInterval? = nil
    ) {
        self.authMethod = authMethod
        self.attemptToReturnJSONObject = attemptToReturnJSONObject
        self.autoReconnect = autoReconnect
        self.host = host.stringValue
        self.port = port ?? (useTLS ? 443 : 80)
        self.useTLS = useTLS
        self.activityTimeout = activityTimeout
    }
}

Resolve switch statement indentation issue.
Resolve switch statement indentation issue.
