# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.

struct MigrationApi <: SwaggerApi
    client::Swagger.Client
end

function _swaggerinternal_migrationExchange(_api::MigrationApi, users::String; team_id=nothing, to_old=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/migration.exchange", ["slackAuth"])
    Swagger.set_param(_ctx.query, "users", users)  # type String
    Swagger.set_param(_ctx.query, "team_id", team_id)  # type String
    Swagger.set_param(_ctx.query, "to_old", to_old)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded"] : [_mediaType])
    return _ctx
end

"""

For Enterprise Grid workspaces, map local user IDs to global user IDs
Param: users::String (required)
Param: team_id::String
Param: to_old::Bool
Return: Dict{String, Any}
"""
function migrationExchange(_api::MigrationApi, users::String; team_id=nothing, to_old=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_migrationExchange(_api, users; team_id=team_id, to_old=to_old, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function migrationExchange(_api::MigrationApi, response_stream::Channel, users::String; team_id=nothing, to_old=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_migrationExchange(_api, users; team_id=team_id, to_old=to_old, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export migrationExchange
