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

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

function _swaggerinternal_appsPermissionsUsersList(_api::AppsPermissionsUsersApi; cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/apps.permissions.users.list", ["slackAuth"])
    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"] : [_mediaType])
    return _ctx
end

"""

Returns list of user grants and corresponding scopes this app has on a team.
Param: cursor::String
Param: limit::Int32
Return: Dict{String, Any}
"""
function appsPermissionsUsersList(_api::AppsPermissionsUsersApi; cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsUsersList(_api; cursor=cursor, limit=limit, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function appsPermissionsUsersList(_api::AppsPermissionsUsersApi, response_stream::Channel; cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsUsersList(_api; cursor=cursor, limit=limit, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_appsPermissionsUsersRequest(_api::AppsPermissionsUsersApi, scopes::String, trigger_id::String, user::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/apps.permissions.users.request", ["slackAuth"])
    Swagger.set_param(_ctx.query, "scopes", scopes)  # type String
    Swagger.set_param(_ctx.query, "trigger_id", trigger_id)  # type String
    Swagger.set_param(_ctx.query, "user", user)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded"] : [_mediaType])
    return _ctx
end

"""

Enables an app to trigger a permissions modal to grant an app access to a user access scope.
Param: scopes::String (required)
Param: trigger_id::String (required)
Param: user::String (required)
Return: Dict{String, Any}
"""
function appsPermissionsUsersRequest(_api::AppsPermissionsUsersApi, scopes::String, trigger_id::String, user::String; _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsUsersRequest(_api, scopes, trigger_id, user; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function appsPermissionsUsersRequest(_api::AppsPermissionsUsersApi, response_stream::Channel, scopes::String, trigger_id::String, user::String; _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsUsersRequest(_api, scopes, trigger_id, user; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export appsPermissionsUsersList, appsPermissionsUsersRequest
