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

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

function _swaggerinternal_adminInviteRequestsApprove(_api::AdminInviteRequestsApi, invite_request_id::String; team_id=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/admin.inviteRequests.approve", ["slackAuth"])
    Swagger.set_param(_ctx.form, "team_id", team_id)  # type String
    Swagger.set_param(_ctx.form, "invite_request_id", invite_request_id)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded", "application/json"] : [_mediaType])
    return _ctx
end

"""

Approve a workspace invite request.
Param: invite_request_id::String (required)
Param: team_id::String
Return: Dict{String, Any}
"""
function adminInviteRequestsApprove(_api::AdminInviteRequestsApi, invite_request_id::String; team_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminInviteRequestsApprove(_api, invite_request_id; team_id=team_id, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminInviteRequestsApprove(_api::AdminInviteRequestsApi, response_stream::Channel, invite_request_id::String; team_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminInviteRequestsApprove(_api, invite_request_id; team_id=team_id, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_adminInviteRequestsDeny(_api::AdminInviteRequestsApi, invite_request_id::String; team_id=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/admin.inviteRequests.deny", ["slackAuth"])
    Swagger.set_param(_ctx.form, "team_id", team_id)  # type String
    Swagger.set_param(_ctx.form, "invite_request_id", invite_request_id)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded", "application/json"] : [_mediaType])
    return _ctx
end

"""

Deny a workspace invite request.
Param: invite_request_id::String (required)
Param: team_id::String
Return: Dict{String, Any}
"""
function adminInviteRequestsDeny(_api::AdminInviteRequestsApi, invite_request_id::String; team_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminInviteRequestsDeny(_api, invite_request_id; team_id=team_id, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminInviteRequestsDeny(_api::AdminInviteRequestsApi, response_stream::Channel, invite_request_id::String; team_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminInviteRequestsDeny(_api, invite_request_id; team_id=team_id, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_adminInviteRequestsList(_api::AdminInviteRequestsApi; team_id=nothing, cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/admin.inviteRequests.list", ["slackAuth"])
    Swagger.set_param(_ctx.query, "team_id", team_id)  # type String
    Swagger.set_param(_ctx.query, "cursor", cursor)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded", "application/json"] : [_mediaType])
    return _ctx
end

"""

List all pending workspace invite requests.
Param: team_id::String
Param: cursor::String
Param: limit::Int32
Return: Dict{String, Any}
"""
function adminInviteRequestsList(_api::AdminInviteRequestsApi; team_id=nothing, cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminInviteRequestsList(_api; team_id=team_id, cursor=cursor, limit=limit, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminInviteRequestsList(_api::AdminInviteRequestsApi, response_stream::Channel; team_id=nothing, cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminInviteRequestsList(_api; team_id=team_id, cursor=cursor, limit=limit, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export adminInviteRequestsApprove, adminInviteRequestsDeny, adminInviteRequestsList
