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

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

function _swaggerinternal_adminEmojiAdd(_api::AdminEmojiApi, name::String, url::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/admin.emoji.add", ["slackAuth"])
    Swagger.set_param(_ctx.form, "name", name)  # type String
    Swagger.set_param(_ctx.form, "url", url)  # 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

"""

Add an emoji.
Param: name::String (required)
Param: url::String (required)
Return: Dict{String, Any}
"""
function adminEmojiAdd(_api::AdminEmojiApi, name::String, url::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiAdd(_api, name, url; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminEmojiAdd(_api::AdminEmojiApi, response_stream::Channel, name::String, url::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiAdd(_api, name, url; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_adminEmojiAddAlias(_api::AdminEmojiApi, name::String, alias_for::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/admin.emoji.addAlias", ["slackAuth"])
    Swagger.set_param(_ctx.form, "name", name)  # type String
    Swagger.set_param(_ctx.form, "alias_for", alias_for)  # 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

"""

Add an emoji alias.
Param: name::String (required)
Param: alias_for::String (required)
Return: Dict{String, Any}
"""
function adminEmojiAddAlias(_api::AdminEmojiApi, name::String, alias_for::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiAddAlias(_api, name, alias_for; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminEmojiAddAlias(_api::AdminEmojiApi, response_stream::Channel, name::String, alias_for::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiAddAlias(_api, name, alias_for; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_adminEmojiList(_api::AdminEmojiApi; cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/admin.emoji.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

"""

List emoji for an Enterprise Grid organization.
Param: cursor::String
Param: limit::Int32
Return: Dict{String, Any}
"""
function adminEmojiList(_api::AdminEmojiApi; cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiList(_api; cursor=cursor, limit=limit, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminEmojiList(_api::AdminEmojiApi, response_stream::Channel; cursor=nothing, limit=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiList(_api; cursor=cursor, limit=limit, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_adminEmojiRemove(_api::AdminEmojiApi, name::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/admin.emoji.remove", ["slackAuth"])
    Swagger.set_param(_ctx.form, "name", name)  # 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

"""

Remove an emoji across an Enterprise Grid organization
Param: name::String (required)
Return: Dict{String, Any}
"""
function adminEmojiRemove(_api::AdminEmojiApi, name::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiRemove(_api, name; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminEmojiRemove(_api::AdminEmojiApi, response_stream::Channel, name::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiRemove(_api, name; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_adminEmojiRename(_api::AdminEmojiApi, name::String, new_name::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/admin.emoji.rename", ["slackAuth"])
    Swagger.set_param(_ctx.form, "name", name)  # type String
    Swagger.set_param(_ctx.form, "new_name", new_name)  # 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

"""

Rename an emoji.
Param: name::String (required)
Param: new_name::String (required)
Return: Dict{String, Any}
"""
function adminEmojiRename(_api::AdminEmojiApi, name::String, new_name::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiRename(_api, name, new_name; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function adminEmojiRename(_api::AdminEmojiApi, response_stream::Channel, name::String, new_name::String; _mediaType=nothing)
    _ctx = _swaggerinternal_adminEmojiRename(_api, name, new_name; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export adminEmojiAdd, adminEmojiAddAlias, adminEmojiList, adminEmojiRemove, adminEmojiRename
