text:
# syntax: proto3
using ProtoBuf
import ProtoBuf.meta

mutable struct QueryManager_Match_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Match_Req(; kwargs...)
        obj = new(meta(QueryManager_Match_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Match_Req
const __meta_QueryManager_Match_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Match_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Match_Req)
            __meta_QueryManager_Match_Req[] = target = ProtoMeta(QueryManager_Match_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_Match_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Match_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Match_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Match_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Match_ResPart(; kwargs...)
        obj = new(meta(QueryManager_Match_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Match_ResPart
const __meta_QueryManager_Match_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Match_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Match_ResPart)
            __meta_QueryManager_Match_ResPart[] = target = ProtoMeta(QueryManager_Match_ResPart)
            allflds = Pair{Symbol,Union{Type,String}}[:answers => Base.Vector{ConceptMap}]
            meta(target, QueryManager_Match_ResPart, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Match_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_Match_ResPart, name::Symbol)
    if name === :answers
        return (obj.__protobuf_jl_internal_values[name])::Base.Vector{ConceptMap}
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Match <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Match(; kwargs...)
        obj = new(meta(QueryManager_Match), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Match
const __meta_QueryManager_Match = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Match})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Match)
            __meta_QueryManager_Match[] = target = ProtoMeta(QueryManager_Match)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Match, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Match[]
    end
end

mutable struct QueryManager_MatchAggregate_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchAggregate_Req(; kwargs...)
        obj = new(meta(QueryManager_MatchAggregate_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchAggregate_Req
const __meta_QueryManager_MatchAggregate_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchAggregate_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchAggregate_Req)
            __meta_QueryManager_MatchAggregate_Req[] = target = ProtoMeta(QueryManager_MatchAggregate_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_MatchAggregate_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchAggregate_Req[]
    end
end
function Base.getproperty(obj::QueryManager_MatchAggregate_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_MatchAggregate_Res <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchAggregate_Res(; kwargs...)
        obj = new(meta(QueryManager_MatchAggregate_Res), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchAggregate_Res
const __meta_QueryManager_MatchAggregate_Res = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchAggregate_Res})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchAggregate_Res)
            __meta_QueryManager_MatchAggregate_Res[] = target = ProtoMeta(QueryManager_MatchAggregate_Res)
            allflds = Pair{Symbol,Union{Type,String}}[:answer => Numeric]
            meta(target, QueryManager_MatchAggregate_Res, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchAggregate_Res[]
    end
end
function Base.getproperty(obj::QueryManager_MatchAggregate_Res, name::Symbol)
    if name === :answer
        return (obj.__protobuf_jl_internal_values[name])::Numeric
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_MatchAggregate <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchAggregate(; kwargs...)
        obj = new(meta(QueryManager_MatchAggregate), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchAggregate
const __meta_QueryManager_MatchAggregate = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchAggregate})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchAggregate)
            __meta_QueryManager_MatchAggregate[] = target = ProtoMeta(QueryManager_MatchAggregate)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_MatchAggregate, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchAggregate[]
    end
end

mutable struct QueryManager_MatchGroup_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchGroup_Req(; kwargs...)
        obj = new(meta(QueryManager_MatchGroup_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchGroup_Req
const __meta_QueryManager_MatchGroup_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchGroup_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchGroup_Req)
            __meta_QueryManager_MatchGroup_Req[] = target = ProtoMeta(QueryManager_MatchGroup_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_MatchGroup_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchGroup_Req[]
    end
end
function Base.getproperty(obj::QueryManager_MatchGroup_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_MatchGroup_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchGroup_ResPart(; kwargs...)
        obj = new(meta(QueryManager_MatchGroup_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchGroup_ResPart
const __meta_QueryManager_MatchGroup_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchGroup_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchGroup_ResPart)
            __meta_QueryManager_MatchGroup_ResPart[] = target = ProtoMeta(QueryManager_MatchGroup_ResPart)
            allflds = Pair{Symbol,Union{Type,String}}[:answers => Base.Vector{ConceptMapGroup}]
            meta(target, QueryManager_MatchGroup_ResPart, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchGroup_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_MatchGroup_ResPart, name::Symbol)
    if name === :answers
        return (obj.__protobuf_jl_internal_values[name])::Base.Vector{ConceptMapGroup}
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_MatchGroup <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchGroup(; kwargs...)
        obj = new(meta(QueryManager_MatchGroup), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchGroup
const __meta_QueryManager_MatchGroup = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchGroup})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchGroup)
            __meta_QueryManager_MatchGroup[] = target = ProtoMeta(QueryManager_MatchGroup)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_MatchGroup, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchGroup[]
    end
end

mutable struct QueryManager_MatchGroupAggregate_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchGroupAggregate_Req(; kwargs...)
        obj = new(meta(QueryManager_MatchGroupAggregate_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchGroupAggregate_Req
const __meta_QueryManager_MatchGroupAggregate_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchGroupAggregate_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchGroupAggregate_Req)
            __meta_QueryManager_MatchGroupAggregate_Req[] = target = ProtoMeta(QueryManager_MatchGroupAggregate_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_MatchGroupAggregate_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchGroupAggregate_Req[]
    end
end
function Base.getproperty(obj::QueryManager_MatchGroupAggregate_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_MatchGroupAggregate_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchGroupAggregate_ResPart(; kwargs...)
        obj = new(meta(QueryManager_MatchGroupAggregate_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchGroupAggregate_ResPart
const __meta_QueryManager_MatchGroupAggregate_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchGroupAggregate_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchGroupAggregate_ResPart)
            __meta_QueryManager_MatchGroupAggregate_ResPart[] = target = ProtoMeta(QueryManager_MatchGroupAggregate_ResPart)
            allflds = Pair{Symbol,Union{Type,String}}[:answers => Base.Vector{NumericGroup}]
            meta(target, QueryManager_MatchGroupAggregate_ResPart, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchGroupAggregate_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_MatchGroupAggregate_ResPart, name::Symbol)
    if name === :answers
        return (obj.__protobuf_jl_internal_values[name])::Base.Vector{NumericGroup}
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_MatchGroupAggregate <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_MatchGroupAggregate(; kwargs...)
        obj = new(meta(QueryManager_MatchGroupAggregate), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_MatchGroupAggregate
const __meta_QueryManager_MatchGroupAggregate = Ref{ProtoMeta}()
function meta(::Type{QueryManager_MatchGroupAggregate})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_MatchGroupAggregate)
            __meta_QueryManager_MatchGroupAggregate[] = target = ProtoMeta(QueryManager_MatchGroupAggregate)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_MatchGroupAggregate, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_MatchGroupAggregate[]
    end
end

mutable struct QueryManager_Explain_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Explain_Req(; kwargs...)
        obj = new(meta(QueryManager_Explain_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Explain_Req
const __meta_QueryManager_Explain_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Explain_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Explain_Req)
            __meta_QueryManager_Explain_Req[] = target = ProtoMeta(QueryManager_Explain_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:explainable_id => Int64]
            meta(target, QueryManager_Explain_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Explain_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Explain_Req, name::Symbol)
    if name === :explainable_id
        return (obj.__protobuf_jl_internal_values[name])::Int64
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Explain_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Explain_ResPart(; kwargs...)
        obj = new(meta(QueryManager_Explain_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Explain_ResPart
const __meta_QueryManager_Explain_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Explain_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Explain_ResPart)
            __meta_QueryManager_Explain_ResPart[] = target = ProtoMeta(QueryManager_Explain_ResPart)
            allflds = Pair{Symbol,Union{Type,String}}[:explanations => Base.Vector{Explanation}]
            meta(target, QueryManager_Explain_ResPart, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Explain_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_Explain_ResPart, name::Symbol)
    if name === :explanations
        return (obj.__protobuf_jl_internal_values[name])::Base.Vector{Explanation}
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Explain <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Explain(; kwargs...)
        obj = new(meta(QueryManager_Explain), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Explain
const __meta_QueryManager_Explain = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Explain})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Explain)
            __meta_QueryManager_Explain[] = target = ProtoMeta(QueryManager_Explain)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Explain, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Explain[]
    end
end

mutable struct QueryManager_Insert_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Insert_Req(; kwargs...)
        obj = new(meta(QueryManager_Insert_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Insert_Req
const __meta_QueryManager_Insert_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Insert_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Insert_Req)
            __meta_QueryManager_Insert_Req[] = target = ProtoMeta(QueryManager_Insert_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_Insert_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Insert_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Insert_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Insert_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Insert_ResPart(; kwargs...)
        obj = new(meta(QueryManager_Insert_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Insert_ResPart
const __meta_QueryManager_Insert_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Insert_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Insert_ResPart)
            __meta_QueryManager_Insert_ResPart[] = target = ProtoMeta(QueryManager_Insert_ResPart)
            allflds = Pair{Symbol,Union{Type,String}}[:answers => Base.Vector{ConceptMap}]
            meta(target, QueryManager_Insert_ResPart, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Insert_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_Insert_ResPart, name::Symbol)
    if name === :answers
        return (obj.__protobuf_jl_internal_values[name])::Base.Vector{ConceptMap}
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Insert <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Insert(; kwargs...)
        obj = new(meta(QueryManager_Insert), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Insert
const __meta_QueryManager_Insert = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Insert})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Insert)
            __meta_QueryManager_Insert[] = target = ProtoMeta(QueryManager_Insert)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Insert, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Insert[]
    end
end

mutable struct QueryManager_Delete_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Delete_Req(; kwargs...)
        obj = new(meta(QueryManager_Delete_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Delete_Req
const __meta_QueryManager_Delete_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Delete_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Delete_Req)
            __meta_QueryManager_Delete_Req[] = target = ProtoMeta(QueryManager_Delete_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_Delete_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Delete_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Delete_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Delete_Res <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Delete_Res(; kwargs...)
        obj = new(meta(QueryManager_Delete_Res), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Delete_Res
const __meta_QueryManager_Delete_Res = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Delete_Res})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Delete_Res)
            __meta_QueryManager_Delete_Res[] = target = ProtoMeta(QueryManager_Delete_Res)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Delete_Res, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Delete_Res[]
    end
end

mutable struct QueryManager_Delete <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Delete(; kwargs...)
        obj = new(meta(QueryManager_Delete), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Delete
const __meta_QueryManager_Delete = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Delete})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Delete)
            __meta_QueryManager_Delete[] = target = ProtoMeta(QueryManager_Delete)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Delete, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Delete[]
    end
end

mutable struct QueryManager_Update_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Update_Req(; kwargs...)
        obj = new(meta(QueryManager_Update_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Update_Req
const __meta_QueryManager_Update_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Update_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Update_Req)
            __meta_QueryManager_Update_Req[] = target = ProtoMeta(QueryManager_Update_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_Update_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Update_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Update_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Update_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Update_ResPart(; kwargs...)
        obj = new(meta(QueryManager_Update_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Update_ResPart
const __meta_QueryManager_Update_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Update_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Update_ResPart)
            __meta_QueryManager_Update_ResPart[] = target = ProtoMeta(QueryManager_Update_ResPart)
            allflds = Pair{Symbol,Union{Type,String}}[:answers => Base.Vector{ConceptMap}]
            meta(target, QueryManager_Update_ResPart, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Update_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_Update_ResPart, name::Symbol)
    if name === :answers
        return (obj.__protobuf_jl_internal_values[name])::Base.Vector{ConceptMap}
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_ResPart <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_ResPart(; kwargs...)
        obj = new(meta(QueryManager_ResPart), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_ResPart
const __meta_QueryManager_ResPart = Ref{ProtoMeta}()
function meta(::Type{QueryManager_ResPart})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_ResPart)
            __meta_QueryManager_ResPart[] = target = ProtoMeta(QueryManager_ResPart)
            fnum = Int[100,101,102,103,104,105]
            allflds = Pair{Symbol,Union{Type,String}}[:match_res_part => QueryManager_Match_ResPart, :match_group_res_part => QueryManager_MatchGroup_ResPart, :match_group_aggregate_res_part => QueryManager_MatchGroupAggregate_ResPart, :insert_res_part => QueryManager_Insert_ResPart, :update_res_part => QueryManager_Update_ResPart, :explain_res_part => QueryManager_Explain_ResPart]
            oneofs = Int[1,1,1,1,1,1]
            oneof_names = Symbol[Symbol("res")]
            meta(target, QueryManager_ResPart, allflds, ProtoBuf.DEF_REQ, fnum, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, oneofs, oneof_names)
        end
        __meta_QueryManager_ResPart[]
    end
end
function Base.getproperty(obj::QueryManager_ResPart, name::Symbol)
    if name === :match_res_part
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Match_ResPart
    elseif name === :match_group_res_part
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_MatchGroup_ResPart
    elseif name === :match_group_aggregate_res_part
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_MatchGroupAggregate_ResPart
    elseif name === :insert_res_part
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Insert_ResPart
    elseif name === :update_res_part
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Update_ResPart
    elseif name === :explain_res_part
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Explain_ResPart
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Update <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Update(; kwargs...)
        obj = new(meta(QueryManager_Update), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Update
const __meta_QueryManager_Update = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Update})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Update)
            __meta_QueryManager_Update[] = target = ProtoMeta(QueryManager_Update)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Update, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Update[]
    end
end

mutable struct QueryManager_Define_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Define_Req(; kwargs...)
        obj = new(meta(QueryManager_Define_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Define_Req
const __meta_QueryManager_Define_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Define_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Define_Req)
            __meta_QueryManager_Define_Req[] = target = ProtoMeta(QueryManager_Define_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_Define_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Define_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Define_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Define_Res <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Define_Res(; kwargs...)
        obj = new(meta(QueryManager_Define_Res), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Define_Res
const __meta_QueryManager_Define_Res = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Define_Res})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Define_Res)
            __meta_QueryManager_Define_Res[] = target = ProtoMeta(QueryManager_Define_Res)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Define_Res, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Define_Res[]
    end
end

mutable struct QueryManager_Define <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Define(; kwargs...)
        obj = new(meta(QueryManager_Define), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Define
const __meta_QueryManager_Define = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Define})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Define)
            __meta_QueryManager_Define[] = target = ProtoMeta(QueryManager_Define)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Define, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Define[]
    end
end

mutable struct QueryManager_Undefine_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Undefine_Req(; kwargs...)
        obj = new(meta(QueryManager_Undefine_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Undefine_Req
const __meta_QueryManager_Undefine_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Undefine_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Undefine_Req)
            __meta_QueryManager_Undefine_Req[] = target = ProtoMeta(QueryManager_Undefine_Req)
            allflds = Pair{Symbol,Union{Type,String}}[:query => AbstractString]
            meta(target, QueryManager_Undefine_Req, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Undefine_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Undefine_Req, name::Symbol)
    if name === :query
        return (obj.__protobuf_jl_internal_values[name])::AbstractString
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Req <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Req(; kwargs...)
        obj = new(meta(QueryManager_Req), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Req
const __meta_QueryManager_Req = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Req})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Req)
            __meta_QueryManager_Req[] = target = ProtoMeta(QueryManager_Req)
            fnum = Int[1,100,101,102,103,104,105,106,107,108,109]
            allflds = Pair{Symbol,Union{Type,String}}[:options => Options, :define_req => QueryManager_Define_Req, :undefine_req => QueryManager_Undefine_Req, :match_req => QueryManager_Match_Req, :match_aggregate_req => QueryManager_MatchAggregate_Req, :match_group_req => QueryManager_MatchGroup_Req, :match_group_aggregate_req => QueryManager_MatchGroupAggregate_Req, :insert_req => QueryManager_Insert_Req, :delete_req => QueryManager_Delete_Req, :update_req => QueryManager_Update_Req, :explain_req => QueryManager_Explain_Req]
            oneofs = Int[0,1,1,1,1,1,1,1,1,1,1]
            oneof_names = Symbol[Symbol("req")]
            meta(target, QueryManager_Req, allflds, ProtoBuf.DEF_REQ, fnum, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, oneofs, oneof_names)
        end
        __meta_QueryManager_Req[]
    end
end
function Base.getproperty(obj::QueryManager_Req, name::Symbol)
    if name === :options
        return (obj.__protobuf_jl_internal_values[name])::Options
    elseif name === :define_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Define_Req
    elseif name === :undefine_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Undefine_Req
    elseif name === :match_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Match_Req
    elseif name === :match_aggregate_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_MatchAggregate_Req
    elseif name === :match_group_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_MatchGroup_Req
    elseif name === :match_group_aggregate_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_MatchGroupAggregate_Req
    elseif name === :insert_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Insert_Req
    elseif name === :delete_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Delete_Req
    elseif name === :update_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Update_Req
    elseif name === :explain_req
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Explain_Req
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Undefine_Res <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Undefine_Res(; kwargs...)
        obj = new(meta(QueryManager_Undefine_Res), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Undefine_Res
const __meta_QueryManager_Undefine_Res = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Undefine_Res})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Undefine_Res)
            __meta_QueryManager_Undefine_Res[] = target = ProtoMeta(QueryManager_Undefine_Res)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Undefine_Res, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Undefine_Res[]
    end
end

mutable struct QueryManager_Res <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Res(; kwargs...)
        obj = new(meta(QueryManager_Res), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Res
const __meta_QueryManager_Res = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Res})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Res)
            __meta_QueryManager_Res[] = target = ProtoMeta(QueryManager_Res)
            fnum = Int[100,101,102,104]
            allflds = Pair{Symbol,Union{Type,String}}[:define_res => QueryManager_Define_Res, :undefine_res => QueryManager_Undefine_Res, :match_aggregate_res => QueryManager_MatchAggregate_Res, :delete_res => QueryManager_Delete_Res]
            oneofs = Int[1,1,1,1]
            oneof_names = Symbol[Symbol("res")]
            meta(target, QueryManager_Res, allflds, ProtoBuf.DEF_REQ, fnum, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, oneofs, oneof_names)
        end
        __meta_QueryManager_Res[]
    end
end
function Base.getproperty(obj::QueryManager_Res, name::Symbol)
    if name === :define_res
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Define_Res
    elseif name === :undefine_res
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Undefine_Res
    elseif name === :match_aggregate_res
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_MatchAggregate_Res
    elseif name === :delete_res
        return (obj.__protobuf_jl_internal_values[name])::QueryManager_Delete_Res
    else
        getfield(obj, name)
    end
end

mutable struct QueryManager_Undefine <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager_Undefine(; kwargs...)
        obj = new(meta(QueryManager_Undefine), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager_Undefine
const __meta_QueryManager_Undefine = Ref{ProtoMeta}()
function meta(::Type{QueryManager_Undefine})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager_Undefine)
            __meta_QueryManager_Undefine[] = target = ProtoMeta(QueryManager_Undefine)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager_Undefine, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager_Undefine[]
    end
end

mutable struct QueryManager <: ProtoType
    __protobuf_jl_internal_meta::ProtoMeta
    __protobuf_jl_internal_values::Dict{Symbol,Any}
    __protobuf_jl_internal_defaultset::Set{Symbol}

    function QueryManager(; kwargs...)
        obj = new(meta(QueryManager), Dict{Symbol,Any}(), Set{Symbol}())
        values = obj.__protobuf_jl_internal_values
        symdict = obj.__protobuf_jl_internal_meta.symdict
        for nv in kwargs
            fldname, fldval = nv
            fldtype = symdict[fldname].jtyp
            (fldname in keys(symdict)) || error(string(typeof(obj), " has no field with name ", fldname))
            if fldval !== nothing
                values[fldname] = isa(fldval, fldtype) ? fldval : convert(fldtype, fldval)
            end
        end
        obj
    end
end # mutable struct QueryManager
const __meta_QueryManager = Ref{ProtoMeta}()
function meta(::Type{QueryManager})
    ProtoBuf.metalock() do
        if !isassigned(__meta_QueryManager)
            __meta_QueryManager[] = target = ProtoMeta(QueryManager)
            allflds = Pair{Symbol,Union{Type,String}}[]
            meta(target, QueryManager, allflds, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES)
        end
        __meta_QueryManager[]
    end
end

export QueryManager_Req, QueryManager_Res, QueryManager_ResPart, QueryManager_Match_Req, QueryManager_Match_ResPart, QueryManager_Match, QueryManager_MatchAggregate_Req, QueryManager_MatchAggregate_Res, QueryManager_MatchAggregate, QueryManager_MatchGroup_Req, QueryManager_MatchGroup_ResPart, QueryManager_MatchGroup, QueryManager_MatchGroupAggregate_Req, QueryManager_MatchGroupAggregate_ResPart, QueryManager_MatchGroupAggregate, QueryManager_Explain_Req, QueryManager_Explain_ResPart, QueryManager_Explain, QueryManager_Insert_Req, QueryManager_Insert_ResPart, QueryManager_Insert, QueryManager_Delete_Req, QueryManager_Delete_Res, QueryManager_Delete, QueryManager_Update_Req, QueryManager_Update_ResPart, QueryManager_Update, QueryManager_Define_Req, QueryManager_Define_Res, QueryManager_Define, QueryManager_Undefine_Req, QueryManager_Undefine_Res, QueryManager_Undefine, QueryManager


text:
## 03.jl
# 円周率

str = "Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics."
counts = [length(word) for word in split(str," ")]
println(counts)

ext: jl


text:
using JuMP, EAGO

                     m = Model()

                     EAGO.register_eago_operators!(m)

                     @variable(m, -1 <= x[i=1:3] <= 1)

                     @variable(m, -16.957145096415093 <= q <= 17.94995800016443)

                     add_NL_constraint(m, :(softplus(0.510608367415756 + 0.13576703913191768*softplus(-0.023366318069798275 + -0.6972645804796413*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + 0.623708383159082*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.5526763214522168*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3]))) + 0.3585964327428499*softplus(-0.17574028037161238 + -0.933468976339102*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + -0.824606977579692*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.3761458682864913*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3]))) + 0.2511872166134532*softplus(0.9643857894710246 + 0.9348568947078797*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + -0.4027229019076284*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.6455757662896615*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3])))) + softplus(-0.7493006135688143 + 0.2483293387413994*softplus(-0.023366318069798275 + -0.6972645804796413*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + 0.623708383159082*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.5526763214522168*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3]))) + -0.7456041150082044*softplus(-0.17574028037161238 + -0.933468976339102*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + -0.824606977579692*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.3761458682864913*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3]))) + 0.49415154189847854*softplus(0.9643857894710246 + 0.9348568947078797*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + -0.4027229019076284*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.6455757662896615*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3])))) + softplus(0.3105901915386422 + 0.5384893864274902*softplus(-0.023366318069798275 + -0.6972645804796413*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + 0.623708383159082*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.5526763214522168*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3]))) + 0.5405413918049242*softplus(-0.17574028037161238 + -0.933468976339102*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + -0.824606977579692*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.3761458682864913*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3]))) + -0.18067211353899282*softplus(0.9643857894710246 + 0.9348568947078797*softplus(-0.6865389686816434 + 0.7515314314281274*$(x[1]) + -0.6334263786214325*$(x[2]) + -0.023277189078302563*$(x[3])) + -0.4027229019076284*softplus(0.5286761878087685 + -0.9557352407199864*$(x[1]) + -0.7485274707208927*$(x[2]) + -0.13145677322460392*$(x[3])) + -0.6455757662896615*softplus(0.7131777426657733 + -0.00917591460146161*$(x[1]) + -0.5192676904312425*$(x[2]) + 0.597536428647615*$(x[3])))) - $q <= 0.0))

                     @objective(m, Min, q)

                     return m

max_stars_repo_name: PSORLab/RSActivationFunctions

max_issues_repo_name: PSORLab/RSActivationFunctions

max_forks_repo_name: PSORLab/RSActivationFunctions


text:
module PolygonOps

export inpolygon, HormannAgathos, HaoSun

include("validity_checks.jl")
include("inpolygon.jl")
include("area.jl")

end # module


text:
# https://adventofcode.com/2021/day/14
using AdventOfCode
using StatsBase
input = readlines("2021/data/day_14.txt")
growrules = Dict('"'.*replace.(input[3:end], " -> "=>"""\"=>\"""").*'"' .|> parse)

indicatorvec(x::Integer, n::Integer)= (1:n).==x
singlecodes=Dict((join(keys(growrules))|>collect|>unique) .=> indicatorvec.(1:10,10))
paircodes=sort(Dict(keys(growrules).=>1:length(growrules)),byvalue=true)
countcodes=Dict(values(paircodes).=>[getindex.(Ref(singlecodes), pc)|>sum for pc in collect.(keys(paircodes))])
input = (template=input[1], growrules = growrules, paircodes=paircodes, singlecodes=singlecodes,countcodes=countcodes)

function ngm(input)
    growpair=collect(input.growrules)
    codes=[join.((gp[1],[gp[1][1:1],gp[2]],[gp[2],gp[1][2:2]])).|> Base.Fix1(getindex,input.paircodes) for gp in input.growrules]|>sort
    ngmat=zeros(Int,length(codes),length(codes))
    for i in 1:length(codes)
        ngmat[codes[i][2],i]+=1
        ngmat[codes[i][3],i]+=1
    end
    ngmat
end
function grow(chain, rules)
    pairchars = [chain[i:i+1] for i in 1:length(chain)-1]
    insets = [getindex.(Ref(input.growrules),pairchars);""]
    hcat(split(chain,""),insets)|>permutedims|>vec|>join
end
function part_1(input)
    res=reduce(grow,(input.growrules for t in 1:10),init=input.template)
    sorted=sort(countmap(res),byvalue=true)|>collect
    sorted[end][2]-sorted[begin][2]
end

function part_2(input)
    pairchars = [input.template[i:i+1] for i in 1:length(input.template)-1]
    inivec=count.((==(x) for x in 1:length(input.paircodes)),Ref(getindex.(Ref(input.paircodes),pairchars)))
    grownpairs=ngm(input)^40*inivec
    countres=(sum(getindex.(Ref(input.countcodes),1:length(grownpairs)).*grownpairs)+
        input.singlecodes[input.template[begin]]+input.singlecodes[input.template[end]]).÷2
    maximum(countres)-minimum(countres)
end


text:
module EconPDEs
using LinearAlgebra: Tridiagonal, norm
using SparseArrays: sparse
using NLsolve: OnceDifferentiable, nlsolve, mcpsolve
using OrderedCollections: OrderedDict
using BlockBandedMatrices: BandedBlockBandedMatrix, Ones
using SparseDiffTools: ForwardColorJacCache, matrix_colors, forwarddiff_color_jacobian!
using FiniteDiff: finite_difference_jacobian!
using Printf: @printf
##############################################################################
##
## Load files
##
##############################################################################

include("finiteschemesolve.jl")
include("utils.jl")

struct EconPDEResult
	zero 			# solution
	residual_norm   # norm of ydot for solution
	optional        # Optional terms returned in the third argument of the function passed to pdesolve
end

function Base.show(io::IO, x::EconPDEResult)
    println(io, "Residual_norm: ",  x.residual_norm)
    println(io, "Zero: ", x.zero)
end

Base.show(io::IO, m::MIME"text/plain", x::EconPDEResult) = show(io, x)

function Base.iterate(x::EconPDEResult, state = 1)
	if state == 1
		return (x.zero, 2)
	elseif state == 2
		return (x.residual_norm, 3)
	elseif state == 3
		return (x.optional, 4)
	end
end

include("pdesolve.jl")

##############################################################################
##
## Exported methods and types
##
##############################################################################
export OrderedDict,
finiteschemesolve,
pdesolve
end


text:
function SeisPatchProcess(in,out,functions,param_patch=Dict(),param_f=Dict();patch_file="patch",	patch_out="patch_function",rm=1)

# read data from disk, split into multidimensional overlapping patches,
    # apply processes, merge patches with tapers, and write to disk.
    # Processing of patches can be done in parallel by running the code using
    # (for example): julia -p 2 script_name.jl
    #
	# in is the file name of the input file to be patched
	# out is the file name of the unpatched output file

    #
    # f is an array of functions that have the following syntax:
    # d2 = f(d1;param_f...), where
    # param_f is a dictionary (Dict) of parameters for the function.
    #
    # param_patch is a dictionary of parameters for the patching and Unpatching process.

	#rm is optional, if rm=1 it will remove files containing patches.
    # to execute the code type:  julia -p 4 my_code.jl where 4 can be replaced
    # with the number of processors you wish to use.

extent = Seismic.ReadTextHeader(in)
println(extent.n1)

    patches,npatch = SeisPatch(in,patch_file;param_patch...)

	list=patch_list[]
	patches_out = AbstractString[]

	for i=1:npatch

 		p_out=join([patch_out i])
		push!(list, patch_list(patches[i],p_out,param_f,functions))
		push!(patches_out,p_out)
	end

	a = pmap(MyProcess,list)

    SeisUnPatch(patches_out,out;nt=extent.n1,param_patch...)

	if rm==1
		for ipatch = 1 : npatch
		SeisRemove(patches[ipatch])
		SeisRemove(patches_out[ipatch])
		end
	end

end

function MyProcess(params)

	f = params.functions
	p = params.param_f

	d1,h1,e1 = SeisRead(params.p_file)

	for ifunc = 1 : length(f)
		func = f[ifunc]
		d2 = func(d1;p[ifunc]...)
		d1 = copy(d2)
	#h1 = copy(h2)
	end

	SeisWrite(params.p_out,d1,h1,e1)
	return(1)

end

type patch_list
       p_file
       p_out
       param_f
       functions
end

max_stars_repo_name: fercarozzi/myseismicjulia

max_issues_repo_name: fercarozzi/myseismicjulia

max_forks_repo_name: fercarozzi/myseismicjulia


text:
export iauAtioq
"""
Quick CIRS to observed place transformation.

Use of this function is appropriate when efficiency is important and
where many star positions are all to be transformed for one date.
The star-independent astrometry parameters can be obtained by
calling iauApio[13] or iauApco[13].

This function is part of the International Astronomical Union's
SOFA (Standards of Fundamental Astronomy) software collection.

Status:  support function.

Given:
    ri     double     CIRS right ascension
    di     double     CIRS declination
    astrom iauASTROM* star-independent astrometry parameters:
        pmt    double       PM time interval (SSB, Julian years)
        eb     double[3]    SSB to observer (vector, au)
        eh     double[3]    Sun to observer (unit vector)
        em     double       distance from Sun to observer (au)
        v      double[3]    barycentric observer velocity (vector, c)
        bm1    double       sqrt(1-|v|^2): reciprocal of Lorenz factor
        bpn    double[3][3] bias-precession-nutation matrix
        along  double       longitude + s' (radians)
        xpl    double       polar motion xp wrt local meridian (radians)
        ypl    double       polar motion yp wrt local meridian (radians)
        sphi   double       sine of geodetic latitude
        cphi   double       cosine of geodetic latitude
        diurab double       magnitude of diurnal aberration vector
        eral   double       "local" Earth rotation angle (radians)
        refa   double       refraction constant A (radians)
        refb   double       refraction constant B (radians)

Returned:
    aob    double*    observed azimuth (radians: N=0,E=90)
    zob    double*    observed zenith distance (radians)
    hob    double*    observed hour angle (radians)
    dob    double*    observed declination (radians)
    rob    double*    observed right ascension (CIO-based, radians)

Notes:

    1. This function returns zenith distance rather than altitude in
    order to reflect the fact that no allowance is made for
    depression of the horizon.

    2. The accuracy of the result is limited by the corrections for
    refraction, which use a simple A*tan(z) + B*tan^3(z) model.
    Providing the meteorological parameters are known accurately and
    there are no gross local effects, the predicted observed
    coordinates should be within 0.05 arcsec (optical) or 1 arcsec
    (radio) for a zenith distance of less than 70 degrees, better
    than 30 arcsec (optical or radio) at 85 degrees and better
    than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.

    Without refraction, the complementary functions iauAtioq and
    iauAtoiq are self-consistent to better than 1 microarcsecond all
    over the celestial sphere.  With refraction included, consistency
    falls off at high zenith distances, but is still better than
    0.05 arcsec at 85 degrees.

    3. It is advisable to take great care with units, as even unlikely
    values of the input parameters are accepted and processed in
    accordance with the models used.

    4. The CIRS RA,Dec is obtained from a star catalog mean place by
    allowing for space motion, parallax, the Sun's gravitational lens
    effect, annual aberration and precession-nutation.  For star
    positions in the ICRS, these effects can be applied by means of
    the iauAtci13 (etc.) functions.  Starting from classical "mean
    place" systems, additional transformations will be needed first.

    5. "Observed" Az,El means the position that would be seen by a
    perfect geodetically aligned theodolite.  This is obtained from
    the CIRS RA,Dec by allowing for Earth orientation and diurnal
    aberration, rotating from equator to horizon coordinates, and
    then adjusting for refraction.  The HA,Dec is obtained by
    rotating back into equatorial coordinates, and is the position
    that would be seen by a perfect equatorial with its polar axis
    aligned to the Earth's axis of rotation.  Finally, the RA is
    obtained by subtracting the HA from the local ERA.

    6. The star-independent CIRS-to-observed-place parameters in ASTROM
    may be computed with iauApio[13] or iauApco[13].  If nothing has
    changed significantly except the time, iauAper[13] may be used to
    perform the requisite adjustment to the astrom structure.

Called:
    iauS2c       spherical coordinates to unit vector
    iauC2s       p-vector to spherical
    iauAnp       normalize angle into range 0 to 2pi

This revision:   2016 March 9

SOFA release 2018-01-30

Copyright (C) 2018 IAU SOFA Board.  See notes at end.
"""

# void iauAtioq(double ri, double di, iauASTROM *astrom,
#               double *aob, double *zob,
#               double *hob, double *dob, double *rob)

function iauAtioq(ri::Real, di::Real, astrom::iauASTROM)

    # Allocate return values
    ref_astrom = Ref{iauASTROM}(astrom)
    ref_aob    = Ref{Float64}(0.0)
    ref_zob    = Ref{Float64}(0.0)
    ref_hob    = Ref{Float64}(0.0)
    ref_dob    = Ref{Float64}(0.0)
    ref_rob    = Ref{Float64}(0.0)

     ccall((:iauAtioq, libsofa_c), Cvoid,
            (Cdouble, Cdouble, Ref{iauASTROM},
            Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble},
            Ref{Cdouble}, Ref{Cdouble}),
            convert(Float64, ri), convert(Float64, di), ref_astrom,
            ref_aob, ref_zob, ref_hob, ref_dob, ref_rob)

    return ref_aob[], ref_zob[], ref_hob[], ref_dob[], ref_rob[]
end


text:
#=========================Test different text lengths.=========================#
using JavaCoreNLP
include("./data/texts.jl")
#using Base.Test

#UNCOMMENT ONE TO SELECT AN ANNOTATION PIPELINE.
    ##pipeline = StanfordCoreNLP("tokenize")                #ok
    ##pipeline = StanfordCoreNLP("ssplit")                  #ok
    ##pipeline = StanfordCoreNLP("pos")                     #ok
    ##pipeline = StanfordCoreNLP("lemma")                   #ok
    ##pipeline = StanfordCoreNLP("parse")                   #ok
    ##pipeline = StanfordCoreNLP("ner")                     #ok
    ##pipeline = StanfordCoreNLP("depparse")                #ok
    pipeline = StanfordCoreNLP("coref")                   #ok
    ##pipeline = StanfordCoreNLP("mention")                 #ok
    ##pipeline = StanfordCoreNLP("ner", "coref", "openie")  #ok

##UNCOMMENT ONE TO SELECT A TEXT.
    ##text = short_text     #21 words
    text = medium_text    #106 words
    ##text = long_text      #553 words

#Main function call.
    demo(pipeline, text)

#Report time consumed by each annotator in the pipeline.
    println("\n", timinginformation(pipeline))

#Report done.
    println("\nComplete.")


text:
"""
    GQLLocation

Struct to contain the location of GraphQL errors.
"""
struct GQLLocation
    line::Int
    column::Int
end
StructTypes.StructType(::Type{GQLLocation}) = StructTypes.Struct()

Base.show(io::IO, ::MIME"text/plain", loc::GQLLocation) = print(io, "Line $(loc.line) Column $(loc.column)")
Base.show(io::IO, loc::GQLLocation) = print(io, "Line $(loc.line) Column $(loc.column)") # for string interpolation

"""
    GQLError

Struct to contain information for errors recieved from the GraphQL server.
"""
Base.@kwdef struct GQLError
    message::String
    locations::Union{Vector{GQLLocation}, Nothing} = nothing
    # path
end
StructTypes.StructType(::Type{GQLError}) = StructTypes.Struct()

function Base.show(io::IO, ::MIME"text/plain", err::GQLError)
    printstyled(io, "GQLError", color=Base.error_color())
    printstyled(io, "\n      message: ", err.message, color=Base.error_color())
    if !isnothing(err.locations)
        printstyled(io, "\n  location(s): $(err.locations[1])", color=Base.error_color())
        for i in 2:length(err.locations)
            printstyled(io, "\n               $(err.locations[i])", color=Base.error_color())
        end
    end
end

"""
    GQLResponse{T}

Output format for GraphQL queries, mutations and subscriptions.

# Accessing data

The `data` field of a `GQLResponse` object is a `Union{Nothing, Dict{String, Union{Nothing, T}}}`,
where the key is the query, mutation or subscription name (or `Alias`) and `T` is specified in the
`output_type` argument of `query`, `mutate`, `open_subscription` and `execute`. If this argument
is not supplied, it will default to `Any`. Typically this results in combinations of dictionaries
and vectors which can be accessed intuitively, following the GraphQL server schema. Alternatively, if
execution of a particular query fails, the value for that query will be `nothing`.

It is, however, possible to provide types with a StructTypes definition and GraphQLClient
will attempt to build the object from the response. This must be done carefully, however,
as if the response is not as expected (for example, missing fields or unexpected nulls) then
the deserialisation of the response into the struct can fail. If this occurs it should be
indicated by the warnings and errors outputted by GraphQLClient.

The fields of the type to deserialise can be modified to be a `Union` of `Nothing` and their
original type, as the deserialisation will input `Nothing` if the field is missing or null.

# Comparison with GraphQL Response Specification

The GraphQL specification specifies that the response can contain `data`, `errors`
and `extensions` fields. It is important to note that in a `GQLResponse` object,
both `data` and `errors` fields will always be present, regardless of whether or not
they are returned in the server response. This is to ensure queries can be type
stable. If `errors` is `nothing`, then no errors occurred.  If `data`
is `null` this indicates an error occurred either during or before execution.
"""
struct GQLResponse{T}
    errors::Union{Nothing, Vector{GQLError}}
    data::Union{Nothing, Dict{String, Union{Nothing, T}}}
    # extensions::String # to implement
end
StructTypes.StructType(::Type{<:GQLResponse}) = StructTypes.Struct()

function Base.show(io::IO, ::MIME"text/plain", resp::GQLResponse)
    print(io, typeof(resp))
    if !isnothing(resp.errors)
        printstyled(io, "\n  errors: ",length(resp.errors), color=Base.error_color())
    end
    if isnothing(resp.data)
        print(io, "\n  data: null")
    elseif !isempty(resp.data)
        names = keys(resp.data)
        max_length = maximum(length.(names))
        print(io, "\n  data: $(typeof(resp.data))")
        for (key,val) in resp.data
            print(io, "\n$(lpad(key, max_length+10)): $(typeof(val))")
        end
    else
        print(io, "\n  data: empty")
    end
end

"""
    GQLSubscriptionResponse{T}

Struct for subsriptions that wraps a `GQLReponse{T}` alongside various metadata.
"""
struct GQLSubscriptionResponse{T}
    id::String
    type::String
    payload::GQLResponse{T}
end
StructTypes.StructType(::Type{<:GQLSubscriptionResponse}) = StructTypes.Struct()

function Base.show(io::IO, ::MIME"text/plain", resp::GQLSubscriptionResponse)
    print(io, typeof(resp))
    print(io, "\n  id: ", resp.id)
    print(io, "\n  type: ", resp.type)
    print(io, "\n  payload: ", typeof(resp.payload))
end


text:
mutable struct Volume
    id::String
    region::Region
    droplet_ids::Array{Integer,1}
    name::String
    description::String
    sizegigabytes::Real
    created_at::DateTime

    function Volume(data::Dict{String})
        data["region"] = Region(data["region"])

        # we assume all DO datetimes are in UTC
        data["created_at"] = DateTime(data["created_at"][1:end-1])

        new(
            data["id"],
            data["region"],
            data["droplet_ids"],
            data["name"],
            data["description"],
            data["size_gigabytes"],
            data["created_at"]
        )
    end
end

function show(io::IO, v::Volume)
    print(io, "Volume ($(v.name))")
end

struct VolumeSnapshot
    id::String
    name::String
    created_at::DateTime
    regions::Array{String, 1}
    resourceid::String
    resourcetype::String
    mindisksize::Real
    sizegigabytes::Real

    function VolumeSnapshot(data::Dict{String})
        data["created_at"] = DateTime(data["created_at"][1:end-1])

        new(
            data["id"],
            data["name"],
            data["created_at"],
            data["regions"],
            data["resource_id"],
            data["resource_type"],
            data["min_disk_size"],
            data["size_gigabytes"]
        )
    end
end

function show(io::IO, s::VolumeSnapshot)
    print(io, "$(s.name)")
end

# List all volumes
function getallvolumes!(client::AbstractClient; kwargs...)
    # check if a request for all volumes in a region
    if haskey(kwargs, "region")
        if isa(kwargs["region"], String)
            region = kwargs["region"]
        elseif isa(kwargs["region"], Region)
            region = kwargs["region"].slug
        else
            error("type not recognized for region: $(typeof(kwargs["region"]))")
        end
        query = "&region=$(region)"
    else
        query = ""
    end

    uri = joinpath(ENDPOINT, "volumes?per_page=$MAXOBJECTS$query")
    getalldata!(client, uri, Volume)
end

# Create a new volume
function createvolume!(client::AbstractClient; name::String, size_gigabytes::Integer, kwargs...)
    postbody = Dict{String, Any}("name" => name, "size_gigabytes" => size_gigabytes)
    merge!(postbody, Dict{String, Any}([String(k[1]) => k[2] for k in kwargs]))

    uri = joinpath(ENDPOINT, "volumes")
    Volume(postdata!(client, uri, postbody))
end

# Retrieve an existing volume
function getvolume!(client::AbstractClient, volumeid::String)
    uri = joinpath(ENDPOINT, "volumes", volumeid)
    Volume(getdata!(client, uri))
end

function getvolume!(client::AbstractClient, volume::Volume)
    getvolume!(client, volume.id)
end

# Retrieve an existing volume by name
function getvolume!(client::AbstractClient; name::String, region::Union{String, Region})
    if isa(region, Region)
        region = region.slug
    end

    uri = joinpath(ENDPOINT, "volumes?name=$(name)&region=$(region)")
    getalldata!(client, uri, Volume)[1]
end

# List snapshots for a volume
function getallvolumesnapshots!(client::AbstractClient, volumeid::String)
    uri = joinpath(ENDPOINT, "volumes", volumeid, "snapshots?per_page=$MAXOBJECTS")
    getalldata!(client, uri, VolumeSnapshot)
end

function getallvolumesnapshots!(client::AbstractClient, volume::Volume)
    getallvolumesnapshots!(client, volume.id)
end

# Create a snapshot from a volume
function snapshotvolume!(client::AbstractClient, volumeid::String; name::String, kwargs...)
    postbody = Dict{String, Any}("name" => name)
    merge!(postbody, Dict{String, Any}([String(k[1]) => k[2] for k in kwargs]))

    uri = joinpath(ENDPOINT, "volumes", volumeid, "snapshots")
    VolumeSnapshot(postdata!(client, uri, postbody))
end

# Delete a volume
function deletevolume!(client::AbstractClient, volumeid::String)
    uri = joinpath(ENDPOINT, "volumes", volumeid)
    deletedata!(client, uri)
end

function deletevolume!(client::AbstractClient, volume::Volume)
    deletevolume!(client, volume.id)
end

# Delete a volume by name
function deletevolume!(client::AbstractClient; name::String, region::String)
    uri = joinpath(ENDPOINT, "volumes?name=$(name)&region=$(region)")
    deletedata!(client, uri)
end

# Delete a volume snapshot
function deletevolumesnapshot!(client::AbstractClient, snapshotid::Integer)
    uri = joinpath(ENDPOINT, "snapshots", "$(snapshotid)")
    deletedata!(client, uri)
end

function deletevolumesnapshot!(client::AbstractClient, snapshot::VolumeSnapshot)
    deletedata!(client, snapshot.id)
end

# Attach a volume to a droplet
# Attach a volume to a droplet by name (provide volume_name in kwargs)
function attachvolume!(client::AbstractClient, volumeid::String; droplet_id::Integer, kwargs...)
    postbody = Dict{String, Any}("type" => "attach", "droplet_id" => droplet_id)
    merge!(postbody, Dict{String, Any}([String(k[1]) => k[2] for k in kwargs]))

    uri = joinpath(ENDPOINT, "volumes", volumeid, "actions")
    Action(postdata!(client, uri, postbody))
end

function attachvolume!(client::AbstractClient, volume::Volume; droplet_id::Integer, kwargs...)
    attachvolume!(client, volume.id; droplet_id=droplet_id, kwargs...)
end

# Remove a volume from a droplet
# Remove a volume from a droplet by name (provide volume_name in kwargs)
function removevolume!(client::AbstractClient, volumeid::String; droplet_id::Integer, kwargs...)
    postbody = Dict{String, Any}("type" => "detach", "droplet_id" => droplet_id)
    merge!(postbody, Dict{String, Any}([String(k[1]) => k[2] for k in kwargs]))

    uri = joinpath(ENDPOINT, "volumes", volumeid, "actions")
    Action(postdata!(client, uri, postbody))
end

function removevolume!(client::AbstractClient, volume::Volume; droplet_id::Integer, kwargs...)
    removevolume!(client, volume.id; droplet_id=droplet_id, kwargs...)
end

# Resize a volume
function resizevolume!(client::AbstractClient, volumeid::String; size_gigabytes::Integer, kwargs...)
    postbody = Dict{String, Any}("type" => "resize", "size_gigabytes" => size_gigabytes)
    merge!(postbody, Dict{String, Any}([String(k[1]) => k[2] for k in kwargs]))

    uri = joinpath(ENDPOINT, "volumes", volumeid, "actions")
    Action(postdata!(client, uri, postbody))
end

function resizevolume!(client::AbstractClient, volume::Volume; size_gigabytes::Integer, kwargs...)
    data = resizevolume!(client, volume.id; kwargs...)
    volume.size_gigabytes = size_gigabytes # update volume size while we're here
    Action(data)
end

# List all actions for a volume
function getallvolumeactions!(client::AbstractClient, volumeid::String)
    uri = joinpath(ENDPOINT, "volumes", volumeid, "actions?per_page=$MAXOBJECTS")
    getalldata!(client, uri, Action)
end

function getallvolumeactions!(client::AbstractClient, volume::Volume)
    getallvolumeactions!(client, volume.id)
end

# Retrieve an existing volume action
function getvolumeaction!(client::AbstractClient, volumeid::String, actionid::Integer)
    uri = joinpath(ENDPOINT, "volumes", volumeid, "actions", "$(actionid)")
    Action(getdata!(client, uri))
end

function getvolumeaction!(client::AbstractClient, volume::Volume, actionid::Integer)
    getvolumeaction!(client, volume.id, actionid)
end

function getvolumeaction!(client::AbstractClient, volumeid::String, action::Action)
    getvolumeaction!(client, volumeid, action.id)
end

function getvolumeaction!(client::AbstractClient, volume::Volume, action::Action)
    getvolumeaction!(client, volume.id, action.id)
end


text:
# module Bukdu

import JSON

function render(T::Type{Val{:JSON}}, obj::Any)::Conn
    filtering(render,T,obj) do
        Conn(200, Dict("Content-Type"=>"application/json"), JSON.json(obj))
    end
end


text:
include("stage.jl")
include("planting.jl")
include("emergence.jl")
include("germination.jl")
include("floralinitiation.jl")
include("leafinitiation.jl")
include("leafappearance.jl")
# include("bulbappearance.jl")
# include("scapegrowth.jl")
include("death.jl")

#TODO make a common class to be shared by Garlic and MAIZSIM
@system Phenology(
    Planting,
    Emergence,
    Germination,
    FloralInitiation,
    LeafInitiation,
    LeafAppearance,
    # BulbAppearance,
    # ScapeGrowth,
    # ScapeAppearance,
    # ScapeRemoval,
    # FlowerAppearance,
    # BulbilAppearance,
    Death
) begin
    calendar ~ ::Calendar(override)
    weather ~ ::Weather(override)
    sun ~ ::Sun(override)
    soil ~ ::Soil(override)

    planting_date ~ preserve::datetime(parameter)
    DAP(t0=planting_date, t=calendar.time): day_after_planting => (t - t0) ~ track::int(u"d", min=0, round=:floor)

    leaves_generic => 10 ~ preserve::int(parameter)
    leaves_potential(leaves_total) ~ track::int(min=leaves_generic)
    leaves_total(leaves_initiated) ~ track::int

    T(leaves_appeared, T_air=weather.T_air): temperature => begin
        if leaves_appeared < 9
            #FIXME soil module is not implemented yet
            #T = T_soil
            #HACK garlic model does not use soil temperature
            T = T_air
        else
            T = T_air
        end
        #FIXME T_cur doesn't go below zero, but is it fair assumption?
        #max(T, 0.0u"°C")
    end ~ track(u"°C")
    #growing_temperature(r="gst_recorder.rate") => r ~ track
    T_opt: optimal_temperature => 22.28 ~ preserve(u"°C", parameter)
    T_ceil: ceiling_temperature => 34.23 ~ preserve(u"°C", parameter)

    #TODO support species/cultivar specific temperature parameters (i.e. Tb => 8, Tx => 43.3)
    GD(context, T, Tb=4.0u"°C", Tx=40.0u"°C"): growing_degree ~ ::GrowingDegree
    BF(context, T, To=T_opt', Tx=T_ceil'): beta_function ~ ::BetaFunction
    Q10(context, T, To=T_opt'): q10_function ~ ::Q10Function

    # garlic

    #FIXME clear definition of bulb maturing
    #bulb_maturing(scape_removed, bulbil_appeared) => (scape_removed || bulbil_appeared) ~ flag

    # common

    # # GDDsum
    # gdd_after_emergence(emerged, r=gdd_recorder.rate) => begin
    #     #HACK tracker is reset when emergence is over
    #     emerged ? r : 0
    # end ~ track
    #
    # current_stage(emerged, dead) => begin
    #     if emerged
    #         "Emerged"
    #     elseif dead
    #         "Inactive"
    #     else
    #         "none"
    #     end
    # end ~ track::str

#     development_phase(germinated, floral_initiated, dead, scape_removed, scape_appeared) => begin
#         if !germinated
#             :seed
#         elseif !floral_initiated
#             :vegetative
#         elseif dead
#             :dead
#         elseif !scape_removed
#             if !scape_appeared
#                 :bulb_growth_before_scape_appearance
#             else
#                 :bulb_growth_after_scape_appearance
#             end
#         else
#             :bulb_growth_after_scape_removal
#         end
#     end ~ track::sym
# end

### Jim modification of development_phase
    development_phase(germinated, floral_initiated, dead) => begin
        if !germinated
            :seed
        elseif !floral_initiated
            :vegetative
        elseif dead
            :dead
        end
    end ~ track::sym
end

@system PhenologyController(Controller) begin
    calendar(context) ~ ::Calendar
    weather(context, calendar) ~ ::Weather
    sun(context, calendar, weather) ~ ::Sun
    soil(context) ~ ::Soil
    phenology(context, calendar, weather, sun, soil): p ~ ::Phenology
end

plot_pheno(v, d=300u"d") = begin
    o = (
        :Calendar => (:init => ZonedDateTime(2007, 9, 1, tz"Asia/Seoul")),
        :Weather => (:store => loadwea(datapath("2007.wea"), tz"Asia/Seoul")),
        :Phenology => (:planting_date => ZonedDateTime(2007, 11, 1, tz"Asia/Seoul")),
    )
    r = simulate(PhenologyController, stop=d, config=o, base=:phenology)
    visualize(r, :time, v)
end


text:
if occursin(r"RvSpectMLEcoSystem$", pwd())
    cd("NeidSolarScripts")
    using Pkg
    Pkg.activate(".")
elseif occursin(r"NeidSolarScripts$", pwd())
   using Pkg
   Pkg.activate(".")
 elseif occursin(r"examples$", pwd())
    cd("..")
    using Pkg
    Pkg.activate(".")
 end

using JLD2, FileIO
using CSV, DataFrames, Query
#using StatsBase, Statistics
using Dates, NaNMath
using RvSpectMLBase
using EchelleInstruments

using Plots

target_subdir = "good_days/DRPv0.7"   # USER: Replace with directory of your choice
  fits_target_str = "Sun"
  output_dir = "output/continuum"
  #outputs = Dict{String,Any}()
  paths_to_search_for_param = [pwd(),"examples",joinpath(pkgdir(RvSpectMLBase),"..","RvSpectML","examples"), "/gpfs/scratch/jpn23/"]
  # NOTE: make_manifest does not update its paths_to_search when default_paths_to_search is defined here, so if you change the line above, you must also include "paths_to_search=default_paths_to_search" in the make_manifest() function call below
  pipeline_plan = PipelinePlan()
  dont_make_plot!(pipeline_plan, :movie)

verbose = false
reset_all_needs!(pipeline_plan)
#if need_to(pipeline_plan,:read_spectra)
if verbose println("# Finding what data files are avaliable.")  end
if isfile("manifest.csv")
    df_files  = CSV.read("manifest.csv", DataFrame)
    @assert size(df_files,1) >= 1
    @assert hasproperty(df_files,:Filename)
    @assert hasproperty(df_files,:target)
    @assert hasproperty(df_files,:bjd)
    @assert hasproperty(df_files,:ssbz)
    @assert hasproperty(df_files,:exptime)
else
    eval(read_data_paths(paths_to_search=paths_to_search_for_param))
    @assert isdefined(Main,:neid_data_path)
    df_files = make_manifest(neid_data_path, target_subdir, NEID )
    CSV.write("manifest.csv", df_files)
end

idx_day_to_use = 1
if verbose println("# Reading in customized parameters from param.jl.")  end
   if !@isdefined(idx_day_to_use)
       idx_day_to_use = 1
   end
   eval(code_to_include_param_jl(paths_to_search=paths_to_search_for_param))
   #=
   if match(r"neidL1_(\d+)[T_](\d+)\.fits$", first(df_files_use.Filename))[1] ==  match(r"neidL1_(\d+)[T_](\d+)\.fits$", last(df_files_use.Filename))[1]
      match(r"neidL1_(\d+)[T_](\d+)\.fits$", first(df_files_use.Filename))[1]date_str = match(r"neidL1_(\d+)[T_](\d+)\.fits$", first(df_files_use.Filename))[1]
    else
      date_str = string(match(r"neidL1_(\d+)[T_](\d+)\.fits$", first(df_files_use.Filename))[1]) * "-" * string(match(r"neidL1_(\d+)[T_](\d+)\.fits$", last(df_files_use.Filename))[1])
   end
   outputs["df_files_use"] = df_files_use

   outputs_filename = joinpath(output_dir,"solar_" * date_str * "_new.jld2")
   if isfile(outputs_filename) && false
     times_already_processed = load(outputs_filename, "times")
     files_in_day_to_process = size(df_files_solar_by_day.data[idx_day_to_use],1)
      if files_in_day_to_process == length(times_already_processed)
         println("# Already processed all ", length(times_already_processed), " files for ", date_str)
         exit()
      end
   end
   =#

continua = Vector{Array{Float32,2}}()
 for row in eachrow(df_files_use)
    m = match(r"(neidL1_\d+[T_]\d+)\.fits$", row.Filename)
    continuum_filename = joinpath(output_dir, m.captures[1] * ".jld2")
    jldopen(continuum_filename,"r") do file
        push!(continua,file["continuum"])
    end
 end

using Plots
using StatsBase

ord = 90
 pix = get_pixel_range(NEID2D(),ord)
 plt = plot()
 for obs in vcat(100:105,150:155,200:205)
    plot!(continua[obs][pix,ord], label=string(obs) )
 end
 display(plt)

 nobs = size(df_files_use,1)
 mean_continuum = mapreduce(obs->continua[obs][get_pixel_range(NEID2D(),ord),ord],.+,1:nobs) ./ nobs

 plt = plot()#legend=:none)
 mean_mean_continuum = Float64[]
 for obs in 1:nobs
    #plot!(continua[obs][pix,ord]./mean_continuum, label=string(obs) )
    push!(mean_mean_continuum,NaNMath.mean((continua[obs][pix,ord]./mean_continuum)[1000:end-1000] ))
 end
 scatter!(plt, 1:nobs,mean_mean_continuum)
 #display(plt)

 plt = plot(legend=:none)
  for obs in 1:nobs# vcat(100:105,150:155,200:205)
     pix = get_pixel_range(NEID2D(),ord)
     plot!(continua[obs][pix,ord]./(mean_continuum.*mean_mean_continuum[obs]), label=string(obs) )
  end
  display(plt)

ylims!(plt,0.99,1.01)
ylims!(plt,0.9,1.1)


text:
using Pollen
using Pollen: changehrefextension, referencetype, Reference, FileBuilder
using Pollen: XTree, XNode, tag, attributes, children, XLeaf, cata, catafold, foldleaves
using Pollen: matches, Selector, SelectOr, SelectAnd, SelectNode, SelectLeaf,
    SelectNot, SelectAttrEq, SelectHasAttr, SelectTag
using Pollen: catafirst, replace, replacefirst, insert, insertfirst, NthChild, After, Before
using Pollen: Markdown, HTML, createsources!, geteventsource, Server, ServeFiles, ServeFilesLazy
using Test
using TestSetExtensions
using FilePathsBase

using Pollen: addsource!, addrewrite!, addbuild!, applyupdates!, FileServer, createsources!
using Pollen: start, stop

function testproject()
    dir = Path(mktempdir())
    write(joinpath(dir, "hi.md"), "Hello")
    proj = Project([DocumentFolder(dir)])
    return proj
end

function testbuilder()
    dir = Path(mktempdir())
    return FileBuilder(HTML(), dir)
end

testserver() = Server(testproject(), testbuilder())