using CxxWrap: ConstCxxRef
using CxxWrap.StdLib: StdString, SharedPtr, UniquePtr, WeakPtr
using CxxWrap.CxxWrapCore:
    CxxBool,
    CxxChar,
    CxxWchar,
    CxxSignedChar,
    CxxUChar,
    CxxShort,
    CxxUShort,
    CxxInt,
    CxxUInt,
    CxxLong,
    CxxULong,
    CxxLongLong,
    CxxULongLong,
    SmartPointer

function Base.getproperty(x::Union{ComboLeg, SmartPointer{ComboLeg}}, name::Symbol)
    Base.@_inline_meta
    return if name === :conId
            ComboLeg_get_conId(x)
        elseif name === :exemptCode
            ComboLeg_get_exemptCode(x)
        elseif name === :designatedLocation
            CxxWrap.CxxWrapCore.dereference_argument(ComboLeg_get_designatedLocation(x))
        elseif name === :shortSaleSlot
            ComboLeg_get_shortSaleSlot(x)
        elseif name === :openClose
            ComboLeg_get_openClose(x)
        elseif name === :exchange
            CxxWrap.CxxWrapCore.dereference_argument(ComboLeg_get_exchange(x))
        elseif name === :action
            CxxWrap.CxxWrapCore.dereference_argument(ComboLeg_get_action(x))
        elseif name === :ratio
            ComboLeg_get_ratio(x)
        else
            (Base).getfield(x, name)
        end
end
function Base.setproperty!(x::Union{ComboLeg, SmartPointer{ComboLeg}}, name::Symbol, value)
    Base.@_inline_meta
    if name === :conId
        ComboLeg_set_conId(x, value)
    elseif name === :exemptCode
        ComboLeg_set_exemptCode(x, value)
    elseif name === :designatedLocation
        ComboLeg_set_designatedLocation(x, value)
    elseif name === :shortSaleSlot
        ComboLeg_set_shortSaleSlot(x, value)
    elseif name === :openClose
        ComboLeg_set_openClose(x, value)
    elseif name === :exchange
        ComboLeg_set_exchange(x, value)
    elseif name === :action
        ComboLeg_set_action(x, value)
    elseif name === :ratio
        ComboLeg_set_ratio(x, value)
    else
        (Base).setfield!(x, name, value)
    end
    return x
end
function Base.propertynames(x::Union{ComboLeg, SmartPointer{ComboLeg}})
    Base.@_inline_meta
    return (:conId, :ratio, :action, :exchange, :openClose, :shortSaleSlot, :designatedLocation, :exemptCode)
end
