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

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

function _swaggerinternal_workflowsStepCompleted(_api::WorkflowsApi, workflow_step_execute_id::String; outputs=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/workflows.stepCompleted", ["slackAuth"])
    Swagger.set_param(_ctx.query, "workflow_step_execute_id", workflow_step_execute_id)  # type String
    Swagger.set_param(_ctx.query, "outputs", outputs)  # 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

"""

Indicate that an app's step in a workflow completed execution.
Param: workflow_step_execute_id::String (required)
Param: outputs::String
Return: Dict{String, Any}
"""
function workflowsStepCompleted(_api::WorkflowsApi, workflow_step_execute_id::String; outputs=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_workflowsStepCompleted(_api, workflow_step_execute_id; outputs=outputs, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function workflowsStepCompleted(_api::WorkflowsApi, response_stream::Channel, workflow_step_execute_id::String; outputs=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_workflowsStepCompleted(_api, workflow_step_execute_id; outputs=outputs, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_workflowsStepFailed(_api::WorkflowsApi, workflow_step_execute_id::String, error::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/workflows.stepFailed", ["slackAuth"])
    Swagger.set_param(_ctx.query, "workflow_step_execute_id", workflow_step_execute_id)  # type String
    Swagger.set_param(_ctx.query, "error", error)  # 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

"""

Indicate that an app's step in a workflow failed to execute.
Param: workflow_step_execute_id::String (required)
Param: error::String (required)
Return: Dict{String, Any}
"""
function workflowsStepFailed(_api::WorkflowsApi, workflow_step_execute_id::String, error::String; _mediaType=nothing)
    _ctx = _swaggerinternal_workflowsStepFailed(_api, workflow_step_execute_id, error; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function workflowsStepFailed(_api::WorkflowsApi, response_stream::Channel, workflow_step_execute_id::String, error::String; _mediaType=nothing)
    _ctx = _swaggerinternal_workflowsStepFailed(_api, workflow_step_execute_id, error; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_workflowsUpdateStep(_api::WorkflowsApi, workflow_step_edit_id::String; inputs=nothing, outputs=nothing, step_name=nothing, step_image_url=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/workflows.updateStep", ["slackAuth"])
    Swagger.set_param(_ctx.query, "workflow_step_edit_id", workflow_step_edit_id)  # type String
    Swagger.set_param(_ctx.query, "inputs", inputs)  # type String
    Swagger.set_param(_ctx.query, "outputs", outputs)  # type String
    Swagger.set_param(_ctx.query, "step_name", step_name)  # type String
    Swagger.set_param(_ctx.query, "step_image_url", step_image_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

"""

Update the configuration for a workflow extension step.
Param: workflow_step_edit_id::String (required)
Param: inputs::String
Param: outputs::String
Param: step_name::String
Param: step_image_url::String
Return: Dict{String, Any}
"""
function workflowsUpdateStep(_api::WorkflowsApi, workflow_step_edit_id::String; inputs=nothing, outputs=nothing, step_name=nothing, step_image_url=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_workflowsUpdateStep(_api, workflow_step_edit_id; inputs=inputs, outputs=outputs, step_name=step_name, step_image_url=step_image_url, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function workflowsUpdateStep(_api::WorkflowsApi, response_stream::Channel, workflow_step_edit_id::String; inputs=nothing, outputs=nothing, step_name=nothing, step_image_url=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_workflowsUpdateStep(_api, workflow_step_edit_id; inputs=inputs, outputs=outputs, step_name=step_name, step_image_url=step_image_url, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export workflowsStepCompleted, workflowsStepFailed, workflowsUpdateStep
