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

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

function _swaggerinternal_filesRemoteAdd(_api::FilesRemoteApi; external_id=nothing, title=nothing, filetype=nothing, external_url=nothing, preview_image=nothing, indexable_file_contents=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/files.remote.add", ["slackAuth"])
    Swagger.set_param(_ctx.form, "external_id", external_id)  # type String
    Swagger.set_param(_ctx.form, "title", title)  # type String
    Swagger.set_param(_ctx.form, "filetype", filetype)  # type String
    Swagger.set_param(_ctx.form, "external_url", external_url)  # type String
    Swagger.set_param(_ctx.form, "preview_image", preview_image)  # type String
    Swagger.set_param(_ctx.form, "indexable_file_contents", indexable_file_contents)  # 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

"""

Adds a file from a remote service
Param: external_id::String
Param: title::String
Param: filetype::String
Param: external_url::String
Param: preview_image::String
Param: indexable_file_contents::String
Return: Dict{String, Any}
"""
function filesRemoteAdd(_api::FilesRemoteApi; external_id=nothing, title=nothing, filetype=nothing, external_url=nothing, preview_image=nothing, indexable_file_contents=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteAdd(_api; external_id=external_id, title=title, filetype=filetype, external_url=external_url, preview_image=preview_image, indexable_file_contents=indexable_file_contents, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function filesRemoteAdd(_api::FilesRemoteApi, response_stream::Channel; external_id=nothing, title=nothing, filetype=nothing, external_url=nothing, preview_image=nothing, indexable_file_contents=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteAdd(_api; external_id=external_id, title=title, filetype=filetype, external_url=external_url, preview_image=preview_image, indexable_file_contents=indexable_file_contents, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_filesRemoteInfo(_api::FilesRemoteApi; file=nothing, external_id=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/files.remote.info", ["slackAuth"])
    Swagger.set_param(_ctx.query, "file", file)  # type String
    Swagger.set_param(_ctx.query, "external_id", external_id)  # 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 information about a remote file added to Slack
Param: file::String
Param: external_id::String
Return: Dict{String, Any}
"""
function filesRemoteInfo(_api::FilesRemoteApi; file=nothing, external_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteInfo(_api; file=file, external_id=external_id, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function filesRemoteInfo(_api::FilesRemoteApi, response_stream::Channel; file=nothing, external_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteInfo(_api; file=file, external_id=external_id, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_filesRemoteList(_api::FilesRemoteApi; channel=nothing, ts_from=nothing, ts_to=nothing, limit=nothing, cursor=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/files.remote.list", ["slackAuth"])
    Swagger.set_param(_ctx.query, "channel", channel)  # type String
    Swagger.set_param(_ctx.query, "ts_from", ts_from)  # type Float32
    Swagger.set_param(_ctx.query, "ts_to", ts_to)  # 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"] : [_mediaType])
    return _ctx
end

"""

Retrieve information about a remote file added to Slack
Param: channel::String
Param: ts_from::Float32
Param: ts_to::Float32
Param: limit::Int32
Param: cursor::String
Return: Dict{String, Any}
"""
function filesRemoteList(_api::FilesRemoteApi; channel=nothing, ts_from=nothing, ts_to=nothing, limit=nothing, cursor=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteList(_api; channel=channel, ts_from=ts_from, ts_to=ts_to, limit=limit, cursor=cursor, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function filesRemoteList(_api::FilesRemoteApi, response_stream::Channel; channel=nothing, ts_from=nothing, ts_to=nothing, limit=nothing, cursor=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteList(_api; channel=channel, ts_from=ts_from, ts_to=ts_to, limit=limit, cursor=cursor, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_filesRemoteRemove(_api::FilesRemoteApi; file=nothing, external_id=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/files.remote.remove", ["slackAuth"])
    Swagger.set_param(_ctx.form, "file", file)  # type String
    Swagger.set_param(_ctx.form, "external_id", external_id)  # 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 a remote file.
Param: file::String
Param: external_id::String
Return: Dict{String, Any}
"""
function filesRemoteRemove(_api::FilesRemoteApi; file=nothing, external_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteRemove(_api; file=file, external_id=external_id, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function filesRemoteRemove(_api::FilesRemoteApi, response_stream::Channel; file=nothing, external_id=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteRemove(_api; file=file, external_id=external_id, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_filesRemoteShare(_api::FilesRemoteApi; file=nothing, external_id=nothing, channels=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/files.remote.share", ["slackAuth"])
    Swagger.set_param(_ctx.query, "file", file)  # type String
    Swagger.set_param(_ctx.query, "external_id", external_id)  # type String
    Swagger.set_param(_ctx.query, "channels", channels)  # 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

"""

Share a remote file into a channel.
Param: file::String
Param: external_id::String
Param: channels::String
Return: Dict{String, Any}
"""
function filesRemoteShare(_api::FilesRemoteApi; file=nothing, external_id=nothing, channels=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteShare(_api; file=file, external_id=external_id, channels=channels, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function filesRemoteShare(_api::FilesRemoteApi, response_stream::Channel; file=nothing, external_id=nothing, channels=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteShare(_api; file=file, external_id=external_id, channels=channels, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_filesRemoteUpdate(_api::FilesRemoteApi; file=nothing, external_id=nothing, title=nothing, filetype=nothing, external_url=nothing, preview_image=nothing, indexable_file_contents=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", Dict{String, Any}, "/files.remote.update", ["slackAuth"])
    Swagger.set_param(_ctx.form, "file", file)  # type String
    Swagger.set_param(_ctx.form, "external_id", external_id)  # type String
    Swagger.set_param(_ctx.form, "title", title)  # type String
    Swagger.set_param(_ctx.form, "filetype", filetype)  # type String
    Swagger.set_param(_ctx.form, "external_url", external_url)  # type String
    Swagger.set_param(_ctx.form, "preview_image", preview_image)  # type String
    Swagger.set_param(_ctx.form, "indexable_file_contents", indexable_file_contents)  # 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

"""

Updates an existing remote file.
Param: file::String
Param: external_id::String
Param: title::String
Param: filetype::String
Param: external_url::String
Param: preview_image::String
Param: indexable_file_contents::String
Return: Dict{String, Any}
"""
function filesRemoteUpdate(_api::FilesRemoteApi; file=nothing, external_id=nothing, title=nothing, filetype=nothing, external_url=nothing, preview_image=nothing, indexable_file_contents=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteUpdate(_api; file=file, external_id=external_id, title=title, filetype=filetype, external_url=external_url, preview_image=preview_image, indexable_file_contents=indexable_file_contents, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function filesRemoteUpdate(_api::FilesRemoteApi, response_stream::Channel; file=nothing, external_id=nothing, title=nothing, filetype=nothing, external_url=nothing, preview_image=nothing, indexable_file_contents=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_filesRemoteUpdate(_api; file=file, external_id=external_id, title=title, filetype=filetype, external_url=external_url, preview_image=preview_image, indexable_file_contents=indexable_file_contents, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export filesRemoteAdd, filesRemoteInfo, filesRemoteList, filesRemoteRemove, filesRemoteShare, filesRemoteUpdate
