BoxEnum

public protocol BoxEnum : QueryParameterConvertible, Decodable, Encodable, Equatable, LosslessStringConvertible

General BoxEnum protocol specifying response model enum behaviour

  • Initializer

    Declaration

    Swift

    init(_ value: String)

    Parameters

    value

    The string value of the enum

Equatable

  • ==(_:_:) Extension method

    Compare equality between enum and string

    Declaration

    Swift

    static func == (lhs: Self, rhs: String) -> Bool

    Parameters

    lhs

    Enum value

    rhs

    String value

    Return Value

    Whether the enum and string are equal

  • ==(_:_:) Extension method

    Compare equality between string and enum

    Declaration

    Swift

    static func == (lhs: String, rhs: Self) -> Bool

    Parameters

    lhs

    String value

    rhs

    Enum value

    Return Value

    Whether the enum and string are equal

Encodable

  • encode(to:) Extension method

    Encode the enum to a JSON string

    Declaration

    Swift

    func encode(to encoder: Encoder) throws

QueryParameterConvertible

  • queryParamValue Extension method

    Query parameter value

    Declaration

    Swift

    var queryParamValue: String? { get }

Decodable

  • init(from:) Extension method

    Initialization using decoder

    Declaration

    Swift

    init(from decoder: Decoder) throws