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

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

function _swaggerinternal_chatDelete(_api::ChatApi; ts=nothing, channel=nothing, as_user=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.delete", ["slackAuth"])
    Swagger.set_param(_ctx.form, "ts", ts)  # type Float32
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "as_user", as_user)  # type Bool
    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

"""

Deletes a message.
Param: ts::Float32
Param: channel::String
Param: as_user::Bool
Return: Dict{String, Any}
"""
function chatDelete(_api::ChatApi; ts=nothing, channel=nothing, as_user=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatDelete(_api; ts=ts, channel=channel, as_user=as_user, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatDelete(_api::ChatApi, response_stream::Channel; ts=nothing, channel=nothing, as_user=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatDelete(_api; ts=ts, channel=channel, as_user=as_user, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatDeleteScheduledMessage(_api::ChatApi, channel::String, scheduled_message_id::String; as_user=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.deleteScheduledMessage", ["slackAuth"])
    Swagger.set_param(_ctx.form, "as_user", as_user)  # type Bool
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "scheduled_message_id", scheduled_message_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

"""

Deletes a pending scheduled message from the queue.
Param: channel::String (required)
Param: scheduled_message_id::String (required)
Param: as_user::Bool
Return: Dict{String, Any}
"""
function chatDeleteScheduledMessage(_api::ChatApi, channel::String, scheduled_message_id::String; as_user=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatDeleteScheduledMessage(_api, channel, scheduled_message_id; as_user=as_user, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatDeleteScheduledMessage(_api::ChatApi, response_stream::Channel, channel::String, scheduled_message_id::String; as_user=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatDeleteScheduledMessage(_api, channel, scheduled_message_id; as_user=as_user, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatGetPermalink(_api::ChatApi, channel::String, message_ts::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/chat.getPermalink", ["slackAuth"])
    Swagger.set_param(_ctx.query, "channel", channel)  # type String
    Swagger.set_param(_ctx.query, "message_ts", message_ts)  # 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

"""

Retrieve a permalink URL for a specific extant message
Param: channel::String (required)
Param: message_ts::String (required)
Return: Dict{String, Any}
"""
function chatGetPermalink(_api::ChatApi, channel::String, message_ts::String; _mediaType=nothing)
    _ctx = _swaggerinternal_chatGetPermalink(_api, channel, message_ts; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatGetPermalink(_api::ChatApi, response_stream::Channel, channel::String, message_ts::String; _mediaType=nothing)
    _ctx = _swaggerinternal_chatGetPermalink(_api, channel, message_ts; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatMeMessage(_api::ChatApi; channel=nothing, text=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.meMessage", ["slackAuth"])
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "text", text)  # 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

"""

Share a me message into a channel.
Param: channel::String
Param: text::String
Return: Dict{String, Any}
"""
function chatMeMessage(_api::ChatApi; channel=nothing, text=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatMeMessage(_api; channel=channel, text=text, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatMeMessage(_api::ChatApi, response_stream::Channel; channel=nothing, text=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatMeMessage(_api; channel=channel, text=text, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatPostEphemeral(_api::ChatApi, channel::String, user::String; as_user=nothing, attachments=nothing, blocks=nothing, icon_emoji=nothing, icon_url=nothing, link_names=nothing, parse=nothing, text=nothing, thread_ts=nothing, username=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.postEphemeral", ["slackAuth"])
    Swagger.set_param(_ctx.form, "as_user", as_user)  # type Bool
    Swagger.set_param(_ctx.form, "attachments", attachments)  # type String
    Swagger.set_param(_ctx.form, "blocks", blocks)  # type String
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "icon_emoji", icon_emoji)  # type String
    Swagger.set_param(_ctx.form, "icon_url", icon_url)  # type String
    Swagger.set_param(_ctx.form, "link_names", link_names)  # type Bool
    Swagger.set_param(_ctx.form, "parse", parse)  # type String
    Swagger.set_param(_ctx.form, "text", text)  # type String
    Swagger.set_param(_ctx.form, "thread_ts", thread_ts)  # type String
    Swagger.set_param(_ctx.form, "user", user)  # type String
    Swagger.set_param(_ctx.form, "username", username)  # 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

"""

Sends an ephemeral message to a user in a channel.
Param: channel::String (required)
Param: user::String (required)
Param: as_user::Bool
Param: attachments::String
Param: blocks::String
Param: icon_emoji::String
Param: icon_url::String
Param: link_names::Bool
Param: parse::String
Param: text::String
Param: thread_ts::String
Param: username::String
Return: Dict{String, Any}
"""
function chatPostEphemeral(_api::ChatApi, channel::String, user::String; as_user=nothing, attachments=nothing, blocks=nothing, icon_emoji=nothing, icon_url=nothing, link_names=nothing, parse=nothing, text=nothing, thread_ts=nothing, username=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatPostEphemeral(_api, channel, user; as_user=as_user, attachments=attachments, blocks=blocks, icon_emoji=icon_emoji, icon_url=icon_url, link_names=link_names, parse=parse, text=text, thread_ts=thread_ts, username=username, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatPostEphemeral(_api::ChatApi, response_stream::Channel, channel::String, user::String; as_user=nothing, attachments=nothing, blocks=nothing, icon_emoji=nothing, icon_url=nothing, link_names=nothing, parse=nothing, text=nothing, thread_ts=nothing, username=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatPostEphemeral(_api, channel, user; as_user=as_user, attachments=attachments, blocks=blocks, icon_emoji=icon_emoji, icon_url=icon_url, link_names=link_names, parse=parse, text=text, thread_ts=thread_ts, username=username, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatPostMessage(_api::ChatApi, channel::String; as_user=nothing, attachments=nothing, blocks=nothing, icon_emoji=nothing, icon_url=nothing, link_names=nothing, mrkdwn=nothing, parse=nothing, reply_broadcast=nothing, text=nothing, thread_ts=nothing, unfurl_links=nothing, unfurl_media=nothing, username=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.postMessage", ["slackAuth"])
    Swagger.set_param(_ctx.form, "as_user", as_user)  # type String
    Swagger.set_param(_ctx.form, "attachments", attachments)  # type String
    Swagger.set_param(_ctx.form, "blocks", blocks)  # type String
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "icon_emoji", icon_emoji)  # type String
    Swagger.set_param(_ctx.form, "icon_url", icon_url)  # type String
    Swagger.set_param(_ctx.form, "link_names", link_names)  # type Bool
    Swagger.set_param(_ctx.form, "mrkdwn", mrkdwn)  # type Bool
    Swagger.set_param(_ctx.form, "parse", parse)  # type String
    Swagger.set_param(_ctx.form, "reply_broadcast", reply_broadcast)  # type Bool
    Swagger.set_param(_ctx.form, "text", text)  # type String
    Swagger.set_param(_ctx.form, "thread_ts", thread_ts)  # type String
    Swagger.set_param(_ctx.form, "unfurl_links", unfurl_links)  # type Bool
    Swagger.set_param(_ctx.form, "unfurl_media", unfurl_media)  # type Bool
    Swagger.set_param(_ctx.form, "username", username)  # 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

"""

Sends a message to a channel.
Param: channel::String (required)
Param: as_user::String
Param: attachments::String
Param: blocks::String
Param: icon_emoji::String
Param: icon_url::String
Param: link_names::Bool
Param: mrkdwn::Bool
Param: parse::String
Param: reply_broadcast::Bool
Param: text::String
Param: thread_ts::String
Param: unfurl_links::Bool
Param: unfurl_media::Bool
Param: username::String
Return: Dict{String, Any}
"""
function chatPostMessage(_api::ChatApi, channel::String; as_user=nothing, attachments=nothing, blocks=nothing, icon_emoji=nothing, icon_url=nothing, link_names=nothing, mrkdwn=nothing, parse=nothing, reply_broadcast=nothing, text=nothing, thread_ts=nothing, unfurl_links=nothing, unfurl_media=nothing, username=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatPostMessage(_api, channel; as_user=as_user, attachments=attachments, blocks=blocks, icon_emoji=icon_emoji, icon_url=icon_url, link_names=link_names, mrkdwn=mrkdwn, parse=parse, reply_broadcast=reply_broadcast, text=text, thread_ts=thread_ts, unfurl_links=unfurl_links, unfurl_media=unfurl_media, username=username, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatPostMessage(_api::ChatApi, response_stream::Channel, channel::String; as_user=nothing, attachments=nothing, blocks=nothing, icon_emoji=nothing, icon_url=nothing, link_names=nothing, mrkdwn=nothing, parse=nothing, reply_broadcast=nothing, text=nothing, thread_ts=nothing, unfurl_links=nothing, unfurl_media=nothing, username=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatPostMessage(_api, channel; as_user=as_user, attachments=attachments, blocks=blocks, icon_emoji=icon_emoji, icon_url=icon_url, link_names=link_names, mrkdwn=mrkdwn, parse=parse, reply_broadcast=reply_broadcast, text=text, thread_ts=thread_ts, unfurl_links=unfurl_links, unfurl_media=unfurl_media, username=username, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatScheduleMessage(_api::ChatApi; channel=nothing, text=nothing, post_at=nothing, parse=nothing, as_user=nothing, link_names=nothing, attachments=nothing, blocks=nothing, unfurl_links=nothing, unfurl_media=nothing, thread_ts=nothing, reply_broadcast=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.scheduleMessage", ["slackAuth"])
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "text", text)  # type String
    Swagger.set_param(_ctx.form, "post_at", post_at)  # type String
    Swagger.set_param(_ctx.form, "parse", parse)  # type String
    Swagger.set_param(_ctx.form, "as_user", as_user)  # type Bool
    Swagger.set_param(_ctx.form, "link_names", link_names)  # type Bool
    Swagger.set_param(_ctx.form, "attachments", attachments)  # type String
    Swagger.set_param(_ctx.form, "blocks", blocks)  # type String
    Swagger.set_param(_ctx.form, "unfurl_links", unfurl_links)  # type Bool
    Swagger.set_param(_ctx.form, "unfurl_media", unfurl_media)  # type Bool
    Swagger.set_param(_ctx.form, "thread_ts", thread_ts)  # type Float32
    Swagger.set_param(_ctx.form, "reply_broadcast", reply_broadcast)  # type Bool
    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

"""

Schedules a message to be sent to a channel.
Param: channel::String
Param: text::String
Param: post_at::String
Param: parse::String
Param: as_user::Bool
Param: link_names::Bool
Param: attachments::String
Param: blocks::String
Param: unfurl_links::Bool
Param: unfurl_media::Bool
Param: thread_ts::Float32
Param: reply_broadcast::Bool
Return: Dict{String, Any}
"""
function chatScheduleMessage(_api::ChatApi; channel=nothing, text=nothing, post_at=nothing, parse=nothing, as_user=nothing, link_names=nothing, attachments=nothing, blocks=nothing, unfurl_links=nothing, unfurl_media=nothing, thread_ts=nothing, reply_broadcast=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatScheduleMessage(_api; channel=channel, text=text, post_at=post_at, parse=parse, as_user=as_user, link_names=link_names, attachments=attachments, blocks=blocks, unfurl_links=unfurl_links, unfurl_media=unfurl_media, thread_ts=thread_ts, reply_broadcast=reply_broadcast, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatScheduleMessage(_api::ChatApi, response_stream::Channel; channel=nothing, text=nothing, post_at=nothing, parse=nothing, as_user=nothing, link_names=nothing, attachments=nothing, blocks=nothing, unfurl_links=nothing, unfurl_media=nothing, thread_ts=nothing, reply_broadcast=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatScheduleMessage(_api; channel=channel, text=text, post_at=post_at, parse=parse, as_user=as_user, link_names=link_names, attachments=attachments, blocks=blocks, unfurl_links=unfurl_links, unfurl_media=unfurl_media, thread_ts=thread_ts, reply_broadcast=reply_broadcast, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatScheduledMessagesList(_api::ChatApi; channel=nothing, latest=nothing, oldest=nothing, limit=nothing, cursor=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/chat.scheduledMessages.list", ["slackAuth"])
    Swagger.set_param(_ctx.query, "channel", channel)  # type String
    Swagger.set_param(_ctx.query, "latest", latest)  # type Float32
    Swagger.set_param(_ctx.query, "oldest", oldest)  # type Float32
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "cursor", cursor)  # 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

"""

Returns a list of scheduled messages.
Param: channel::String
Param: latest::Float32
Param: oldest::Float32
Param: limit::Int32
Param: cursor::String
Return: Dict{String, Any}
"""
function chatScheduledMessagesList(_api::ChatApi; channel=nothing, latest=nothing, oldest=nothing, limit=nothing, cursor=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatScheduledMessagesList(_api; channel=channel, latest=latest, oldest=oldest, limit=limit, cursor=cursor, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatScheduledMessagesList(_api::ChatApi, response_stream::Channel; channel=nothing, latest=nothing, oldest=nothing, limit=nothing, cursor=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatScheduledMessagesList(_api; channel=channel, latest=latest, oldest=oldest, limit=limit, cursor=cursor, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatUnfurl(_api::ChatApi, channel::String, ts::String; unfurls=nothing, user_auth_message=nothing, user_auth_required=nothing, user_auth_url=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.unfurl", ["slackAuth"])
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "ts", ts)  # type String
    Swagger.set_param(_ctx.form, "unfurls", unfurls)  # type String
    Swagger.set_param(_ctx.form, "user_auth_message", user_auth_message)  # type String
    Swagger.set_param(_ctx.form, "user_auth_required", user_auth_required)  # type Bool
    Swagger.set_param(_ctx.form, "user_auth_url", user_auth_url)  # 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

"""

Provide custom unfurl behavior for user-posted URLs
Param: channel::String (required)
Param: ts::String (required)
Param: unfurls::String
Param: user_auth_message::String
Param: user_auth_required::Bool
Param: user_auth_url::String
Return: Dict{String, Any}
"""
function chatUnfurl(_api::ChatApi, channel::String, ts::String; unfurls=nothing, user_auth_message=nothing, user_auth_required=nothing, user_auth_url=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatUnfurl(_api, channel, ts; unfurls=unfurls, user_auth_message=user_auth_message, user_auth_required=user_auth_required, user_auth_url=user_auth_url, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatUnfurl(_api::ChatApi, response_stream::Channel, channel::String, ts::String; unfurls=nothing, user_auth_message=nothing, user_auth_required=nothing, user_auth_url=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatUnfurl(_api, channel, ts; unfurls=unfurls, user_auth_message=user_auth_message, user_auth_required=user_auth_required, user_auth_url=user_auth_url, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_chatUpdate(_api::ChatApi, channel::String, ts::String; as_user=nothing, attachments=nothing, blocks=nothing, link_names=nothing, parse=nothing, text=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/chat.update", ["slackAuth"])
    Swagger.set_param(_ctx.form, "as_user", as_user)  # type String
    Swagger.set_param(_ctx.form, "attachments", attachments)  # type String
    Swagger.set_param(_ctx.form, "blocks", blocks)  # type String
    Swagger.set_param(_ctx.form, "channel", channel)  # type String
    Swagger.set_param(_ctx.form, "link_names", link_names)  # type String
    Swagger.set_param(_ctx.form, "parse", parse)  # type String
    Swagger.set_param(_ctx.form, "text", text)  # type String
    Swagger.set_param(_ctx.form, "ts", ts)  # 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

"""

Updates a message.
Param: channel::String (required)
Param: ts::String (required)
Param: as_user::String
Param: attachments::String
Param: blocks::String
Param: link_names::String
Param: parse::String
Param: text::String
Return: Dict{String, Any}
"""
function chatUpdate(_api::ChatApi, channel::String, ts::String; as_user=nothing, attachments=nothing, blocks=nothing, link_names=nothing, parse=nothing, text=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatUpdate(_api, channel, ts; as_user=as_user, attachments=attachments, blocks=blocks, link_names=link_names, parse=parse, text=text, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function chatUpdate(_api::ChatApi, response_stream::Channel, channel::String, ts::String; as_user=nothing, attachments=nothing, blocks=nothing, link_names=nothing, parse=nothing, text=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_chatUpdate(_api, channel, ts; as_user=as_user, attachments=attachments, blocks=blocks, link_names=link_names, parse=parse, text=text, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export chatDelete, chatDeleteScheduledMessage, chatGetPermalink, chatMeMessage, chatPostEphemeral, chatPostMessage, chatScheduleMessage, chatScheduledMessagesList, chatUnfurl, chatUpdate
